|
SPH
|
Non-owning view of particles belonging to the same body. More...
#include <Initial.h>
Public Types | |
| enum class | RotationOrigin { FRAME_ORIGIN , CENTER_OF_MASS } |
| Predefined types of center point. More... | |
Public Member Functions | |
| BodyView (Storage &storage, const Size bodyIndex) | |
| BodyView & | displace (const Vector &dr) |
| Moves the particles of the body in given direction. More... | |
| BodyView & | addVelocity (const Vector &v) |
| Adds a velocity vector to all particles of the body. More... | |
| BodyView & | addRotation (const Vector &omega, const RotationOrigin origin) |
| Adds an angular velocity to all particles of the body. More... | |
| BodyView & | addRotation (const Vector &omega, const Vector &origin) |
| Adds an angular velocity to all particles of the body. More... | |
Non-owning view of particles belonging to the same body.
Object allows to access, modify and setup additional properties of the particles created by InitialConditions.
|
strong |
| NAMESPACE_SPH_BEGIN BodyView::BodyView | ( | Storage & | storage, |
| const Size | bodyIndex | ||
| ) |
Definition at line 19 of file Initial.cpp.
| BodyView & BodyView::addRotation | ( | const Vector & | omega, |
| const RotationOrigin | origin | ||
| ) |
Adds an angular velocity to all particles of the body.
The new velocities are added to velocities previously assigned to the particles.
| omega | Angular velocity (in radians/s), the direction of the vector is the axis of rotation. |
| origin | Center point of the rotation, see RotationOrigin enum. |
Definition at line 72 of file Initial.cpp.
Adds an angular velocity to all particles of the body.
The new velocities are added to velocities previously assigned to the particles.
| omega | Angular velocity (in radians/s), the direction of the vector is the axis of rotation. |
| origin | Vector defining the center point of the rotation. |
Definition at line 49 of file Initial.cpp.
Adds a velocity vector to all particles of the body.
If the particles previously had nonzero velocities, the velocities are added; the previous velocities are not erased.
| v | Velocity vector added to all particles. |
Definition at line 38 of file Initial.cpp.
Moves the particles of the body in given direction.
The particles are moved relative to the current position.
| dr | Displacement vector. |
Definition at line 23 of file Initial.cpp.