NuTo
Numerics Tool
|
class for spherical collidables More...
#include <CollidableParticleSphere.h>
Public Member Functions | |
CollidableParticleSphere (Eigen::Vector3d rPosition, Eigen::Vector3d rVelocity, double rRadius, double rGrowthRate, int rIndex) | |
constructor. More... | |
void | MoveAndGrow (double rTime) override |
move spheres and apply growth, mTimeOfLastCollision update More... | |
double | GetKineticEnergy () const override |
calculates and returns the kinetic energy of the sphere More... | |
double | GetVolume () const override |
calculates and returns the volume of the sphere More... | |
void | PerformCollision (CollidableBase &rCollidable) override |
collision between CollidableSphere and CollidableBase, resolve double dispatch, forward *this More... | |
void | PerformCollision (CollidableParticleSphere &rSphere) override |
collision between CollidableSphere and CollidableSphere, physics here. More... | |
void | PerformCollision (CollidableWallBase &rWall) override |
collision between CollidableSphere and CollidableWall, forward to CollidableWall. More... | |
double | PredictCollision (CollidableBase &rCollidable, int &rType) override |
collision check between this and a CollidableBase, resolve double dispatch, forward *this More... | |
double | PredictCollision (CollidableParticleSphere &rSphere, int &rType) override |
collision check between this and another CollidableSphere: Physics lead to quadratic equation. More... | |
double | PredictCollision (CollidableWallBase &rWall, int &rType) override |
collision check between CollidableSphere and CollidableWall, forward to CollidableWall. More... | |
void | GetLocalEventsToDelete (LocalEvents &rEventsToDelete) const override |
returns all old events, that need to be deleted More... | |
Eigen::MatrixXd | ExportRow (bool rInitialRadius=false) const |
exports the sphere position and its radius to as a row in a Nx4-matrix More... | |
void | VisualizationDynamic (Visualize::UnstructuredGrid &rVisualizer, bool rFinal) const |
visualize all moving collidables More... | |
void | ResetVelocity () |
resets the sphere velocity to 0.0 More... | |
void | SetGrowthRate (double rGrowthRateFactor, double rTime) |
sets a new growth rate More... | |
const Eigen::Vector3d & | GetPosition () const |
getter for sphere position More... | |
double | GetRadius () const |
getter for sphere radius More... | |
double | GetRadius0 () const |
getter for initial sphere radius More... | |
Public Member Functions inherited from NuTo::CollidableParticleBase | |
CollidableParticleBase (Eigen::Vector3d rPosition, Eigen::Vector3d rVelocity, int rIndex) | |
constructor, every particle needs a position, a velocity and an identifier More... | |
Public Member Functions inherited from NuTo::CollidableBase | |
CollidableBase (int rIndex) | |
constructor, initialized with an index More... | |
virtual | ~CollidableBase () |
destructor More... | |
int | GetIndex () const |
getter for collidable index More... | |
void | AddBox (SubBox &rBox) |
adds a SubBox to this collidable More... | |
void | RemoveBox (SubBox &rBox) |
removes a SubBox from this collidable More... | |
void | PrintLocalEvents () const |
prints the local event list More... | |
const std::vector< SubBox * > & | GetSubBoxes () const |
returns all the SubBoxes of this collidable More... | |
Friends | |
class | CollidableWallPhysical |
provides faster access for collision checks with walls More... | |
class | CollidableWallVirtual |
class | CollidableWallCylinder |
class | CollidableWallBase |
Additional Inherited Members | |
Public Types inherited from NuTo::CollidableBase | |
typedef std::vector< CollidableParticleSphere * > | ParticleContainer |
Protected Attributes inherited from NuTo::CollidableParticleBase | |
Eigen::Vector3d | mPosition |
particle position More... | |
Eigen::Vector3d | mVelocity |
particle velocity More... | |
Protected Attributes inherited from NuTo::CollidableBase | |
int | mIndex |
index, just a name for each collidable, multiple collidables with the same index possible More... | |
std::vector< SubBox * > | mBoxes |
list of SubBoxes in which this collidable is inside if the collidable is passing a virutal sub box wall, multiple mBoxes are possible More... | |
LocalEvents | mLocalEvents |
local event list adding single event: through EventBase::AddLocalEvents() remove single event: through EventBase::~EventBase() clear everything: on collision More... | |
class for spherical collidables
NuTo::CollidableParticleSphere::CollidableParticleSphere | ( | Eigen::Vector3d | rPosition, |
Eigen::Vector3d | rVelocity, | ||
double | rRadius, | ||
double | rGrowthRate, | ||
int | rIndex | ||
) |
constructor.
Create CollidableSphere
rPosition | sphere position |
rVelocity | sphere velocity |
rRadius | sphere radius > 0 |
rGrowthRate | sphere growth rate > 0 |
rIndex | name |
Eigen::MatrixXd NuTo::CollidableParticleSphere::ExportRow | ( | bool | rInitialRadius = false | ) | const |
exports the sphere position and its radius to as a row in a Nx4-matrix
rInitialRadius | switch to export mRadius or mRadius0 |
|
overridevirtual |
calculates and returns the kinetic energy of the sphere
Implements NuTo::CollidableParticleBase.
|
overridevirtual |
returns all old events, that need to be deleted
rEventsToDelete | return argument |
Implements NuTo::CollidableBase.
const Eigen::Vector3d & NuTo::CollidableParticleSphere::GetPosition | ( | ) | const |
getter for sphere position
double NuTo::CollidableParticleSphere::GetRadius | ( | ) | const |
getter for sphere radius
double NuTo::CollidableParticleSphere::GetRadius0 | ( | ) | const |
getter for initial sphere radius
|
overridevirtual |
calculates and returns the volume of the sphere
Implements NuTo::CollidableParticleBase.
|
overridevirtual |
move spheres and apply growth, mTimeOfLastCollision update
rTime | new global time. |
Implements NuTo::CollidableBase.
|
overridevirtual |
collision between CollidableSphere and CollidableBase, resolve double dispatch, forward *this
rCollidable | collision partner |
Implements NuTo::CollidableBase.
|
overridevirtual |
collision between CollidableSphere and CollidableSphere, physics here.
rSphere | collision partner |
Implements NuTo::CollidableBase.
|
overridevirtual |
collision between CollidableSphere and CollidableWall, forward to CollidableWall.
rWall | collision partner |
Implements NuTo::CollidableBase.
|
overridevirtual |
collision check between this and a CollidableBase, resolve double dispatch, forward *this
rCollidable | possible collision partner |
rType | return argument, element of enum CollidableBase::EventType |
Implements NuTo::CollidableBase.
|
overridevirtual |
collision check between this and another CollidableSphere: Physics lead to quadratic equation.
rSphere | possible collision partner |
rType | return argument, element of enum CollidableBase::EventType |
Implements NuTo::CollidableBase.
|
overridevirtual |
collision check between CollidableSphere and CollidableWall, forward to CollidableWall.
rWall | possible collision partner |
rType | return argument, element of enum CollidableBase::EventType |
Implements NuTo::CollidableBase.
void NuTo::CollidableParticleSphere::ResetVelocity | ( | ) |
resets the sphere velocity to 0.0
void NuTo::CollidableParticleSphere::SetGrowthRate | ( | double | rGrowthRateFactor, |
double | rTime | ||
) |
sets a new growth rate
rGrowthRateFactor | growthrate *= rGRFactor |
rTime | global time |
void NuTo::CollidableParticleSphere::VisualizationDynamic | ( | Visualize::UnstructuredGrid & | rVisualizer, |
bool | rFinal | ||
) | const |
visualize all moving collidables
rVisualizer | NuTo object for ascii-export |
|
friend |
|
friend |
|
friend |
provides faster access for collision checks with walls
|
friend |