![]() |
PeriDEM 0.3.0
PeriDEM -- Peridynamics-based high-fidelity model for granular media
|
A struct that stores transformation parameters and provides method to transform the particle. Basically, given a reference particle, this provides method to translate, rotate, and scale the reference particle. More...
#include <particleTransform.h>
Public Member Functions | |
| ParticleTransform () | |
| Constructor. | |
| ParticleTransform (util::Point translate, util::Point axis, double theta, double scale=1.) | |
| Constructor with pivot at origin (reference mesh centered at origin). | |
| ParticleTransform (util::Point translate, util::Point axis, double theta, double scale, util::Point rotation_point) | |
Constructor with explicit rotation pivot (consistent with GeomObject::transform). | |
| ParticleTransform (const ParticleTransform &t) | |
| Copy constructor. | |
| util::Point | apply (const util::Point &v) const |
Maps a reference-configuration point \(\mathbf v\) to world coordinates using the same rule as geom::mapSimilarity / GeomObject::transform: \(\mathbf y = \mathbf p + s\,\mathbf R(\mathbf v-\mathbf p) + \mathbf t\). | |
| std::string | printStr (int nt=0, int lvl=0) const |
| Returns the string containing printable information about the object. | |
| void | print (int nt=0, int lvl=0) const |
| Prints the information about the object. | |
Data Fields | |
| util::Point | d_translation |
Rigid translation \(\mathbf t\) after rotate+scale about the pivot (matches GeomObject::transform). | |
| util::Point | d_axis |
| Unit axis of rotation. | |
| double | d_theta |
| Angle of rotation (radians) | |
| double | d_scale |
| Uniform scale factor. | |
| util::Point | d_rotationPoint |
Pivot \(\mathbf p\) for rotation and scale (same role as rotationPoint in GeomObject::transform). Default origin for legacy meshes centered at zero. | |
A struct that stores transformation parameters and provides method to transform the particle. Basically, given a reference particle, this provides method to translate, rotate, and scale the reference particle.
Definition at line 26 of file particleTransform.h.
|
inline |
Constructor.
Default constructor creates identity transformation, i.e. transform(x) = x.
Definition at line 48 of file particleTransform.h.
|
inline |
Constructor with pivot at origin (reference mesh centered at origin).
| translate | Translation vector \(\mathbf t\) |
| axis | Axis of rotation |
| theta | Angle of rotation |
| scale | Uniform scale |
Definition at line 60 of file particleTransform.h.
|
inline |
Constructor with explicit rotation pivot (consistent with GeomObject::transform).
Definition at line 68 of file particleTransform.h.
|
inline |
Copy constructor.
| t | Another ParticleTransform object |
Definition at line 77 of file particleTransform.h.
|
inline |
Maps a reference-configuration point \(\mathbf v\) to world coordinates using the same rule as geom::mapSimilarity / GeomObject::transform: \(\mathbf y = \mathbf p + s\,\mathbf R(\mathbf v-\mathbf p) + \mathbf t\).
When \(\mathbf p = \mathbf 0\), this reduces to \(\mathbf y = s\,\mathbf R(\mathbf v) + \mathbf t\) (legacy reference-mesh-at-origin case).
| v | Node position in reference particle frame |
Definition at line 92 of file particleTransform.h.
References d_axis, d_rotationPoint, d_scale, d_theta, d_translation, and util::rotate().
Referenced by particle::BaseParticle::BaseParticle().
|
inline |
Prints the information about the object.
| nt | Number of tabs to append before printing |
| lvl | Information level (higher means more information) |
Definition at line 126 of file particleTransform.h.
References printStr().
|
inline |
Returns the string containing printable information about the object.
| nt | Number of tabs to append before printing |
| lvl | Information level (higher means more information) |
Definition at line 105 of file particleTransform.h.
References d_axis, d_rotationPoint, d_scale, d_theta, d_translation, util::io::getTabS(), and util::Point::printStr().
Referenced by print().
| util::Point geom::ParticleTransform::d_axis |
Unit axis of rotation.
Definition at line 32 of file particleTransform.h.
Referenced by apply(), and printStr().
| util::Point geom::ParticleTransform::d_rotationPoint |
Pivot \(\mathbf p\) for rotation and scale (same role as rotationPoint in GeomObject::transform). Default origin for legacy meshes centered at zero.
Definition at line 41 of file particleTransform.h.
Referenced by apply(), and printStr().
| double geom::ParticleTransform::d_scale |
Uniform scale factor.
Definition at line 38 of file particleTransform.h.
Referenced by apply(), particle::BaseParticle::BaseParticle(), and printStr().
| double geom::ParticleTransform::d_theta |
Angle of rotation (radians)
Definition at line 35 of file particleTransform.h.
Referenced by apply(), and printStr().
| util::Point geom::ParticleTransform::d_translation |
Rigid translation \(\mathbf t\) after rotate+scale about the pivot (matches GeomObject::transform).
Definition at line 29 of file particleTransform.h.
Referenced by apply(), and printStr().