NuTo
Numerics Tool
Public Member Functions | Protected Attributes | List of all members
NuTo::CollidableParticleBase Class Referenceabstract

base class for all particles TODO: Idea: implement an interface that somehow every particle knows how to interact with every wall without explicit coding More...

#include <CollidableParticleBase.h>

Inheritance diagram for NuTo::CollidableParticleBase:
NuTo::CollidableBase NuTo::CollidableParticleSphere

Public Member Functions

 CollidableParticleBase (Eigen::Vector3d rPosition, Eigen::Vector3d rVelocity, int rIndex)
 constructor, every particle needs a position, a velocity and an identifier More...
 
virtual double GetVolume () const =0
 getter for the particle volume More...
 
virtual double GetKineticEnergy () const =0
 getter for the kinetic energy of the particle 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...
 
virtual void PerformCollision (CollidableBase &rCollidable)=0
 collision handling, resolve double dispatch More...
 
virtual void PerformCollision (CollidableParticleSphere &rSphere)=0
 collision handling, resolve double dispatch More...
 
virtual void PerformCollision (CollidableWallBase &rWall)=0
 collision handling, resolve double dispatch More...
 
virtual double PredictCollision (CollidableBase &rCollidable, int &rType)=0
 collision prediction between (this) and collision partner More...
 
virtual double PredictCollision (CollidableParticleSphere &rSphere, int &rType)=0
 collision prediction between (this) and collision partner More...
 
virtual double PredictCollision (CollidableWallBase &rWall, int &rType)=0
 collision prediction between (this) and collision partner More...
 
void AddBox (SubBox &rBox)
 adds a SubBox to this collidable More...
 
void RemoveBox (SubBox &rBox)
 removes a SubBox from this collidable More...
 
virtual void MoveAndGrow (double rTime)=0
 updates this collidable in time More...
 
virtual void GetLocalEventsToDelete (LocalEvents &rEventsToDelete) const =0
 returns all old events, that need to be deleted More...
 
void PrintLocalEvents () const
 prints the local event list More...
 
const std::vector< SubBox * > & GetSubBoxes () const
 returns all the SubBoxes of this collidable More...
 
virtual void Print (std::ostream &rReturnStream) const =0
 prints information based on derived class type. More...
 

Protected Attributes

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...
 

Additional Inherited Members

- Public Types inherited from NuTo::CollidableBase
typedef std::vector< CollidableParticleSphere * > ParticleContainer
 

Detailed Description

base class for all particles TODO: Idea: implement an interface that somehow every particle knows how to interact with every wall without explicit coding

Constructor & Destructor Documentation

NuTo::CollidableParticleBase::CollidableParticleBase ( Eigen::Vector3d  rPosition,
Eigen::Vector3d  rVelocity,
int  rIndex 
)

constructor, every particle needs a position, a velocity and an identifier

Parameters
rPositionposition
rVelocityvelocity
rIndexindex, multiple particles with same index are allowed

Member Function Documentation

virtual double NuTo::CollidableParticleBase::GetKineticEnergy ( ) const
pure virtual

getter for the kinetic energy of the particle

Implemented in NuTo::CollidableParticleSphere.

virtual double NuTo::CollidableParticleBase::GetVolume ( ) const
pure virtual

getter for the particle volume

Implemented in NuTo::CollidableParticleSphere.

Member Data Documentation

Eigen::Vector3d NuTo::CollidableParticleBase::mPosition
protected

particle position

Eigen::Vector3d NuTo::CollidableParticleBase::mVelocity
protected

particle velocity


The documentation for this class was generated from the following files: