revision: v0.14
BaseParticle Class Referenceabstract

#include <BaseParticle.h>

+ Inheritance diagram for BaseParticle:

Public Member Functions

 BaseParticle ()
 Basic Particle constructor, creates an Particle at (0,0,0) with radius, mass and inertia equal to 1. More...
 
 BaseParticle (const BaseParticle &p)
 Particle copy constructor, which accepts as input a reference to a Particle. It creates a copy of this Particle and all it's information. Usually it is better to use the copy() function for polymorphism. More...
 
 BaseParticle (const ParticleSpecies *s)
 
 ~BaseParticle () override
 Particle destructor, needs to be implemented and checked if it removes tangential spring information. More...
 
virtual BaseParticlecopy () const =0
 Particle copy method. It calls to copy constructor of this Particle, useful for polymorphism. More...
 
virtual Mdouble getVolume () const
 Get Particle volume function, which required a reference to the Species vector. It returns the volume of the Particle. More...
 
void fixParticle ()
 Fix Particle function. It fixes a Particle by setting its inverse mass and inertia and velocities to zero. More...
 
bool isFixed () const override
 Is fixed Particle function. It returns whether a Particle is fixed or not, by checking its inverse Mass. More...
 
bool isMPIParticle () const
 Indicates if this particle is a ghost in the MPI domain. More...
 
void setMPIParticle (bool flag)
 Flags the mpi particle status. More...
 
bool isInMPIDomain ()
 Indicates if the particle is in the communication zone of the mpi domain. More...
 
void setInMPIDomain (bool flag)
 Flags the status of the particle if wether it is in the communication zone or not. More...
 
bool isInPeriodicDomain () const
 Indicates if the particle is in the periodic boundary communication zone. More...
 
void setInPeriodicDomain (bool flag)
 Flags the status of the particle wether it is in the periodic communication zone or not. More...
 
bool isPeriodicGhostParticle () const
 Indicates if this particle is a ghost in the periodic boundary. More...
 
void setPeriodicGhostParticle (bool flag)
 Flags the status of the particle to be a ghost in periodic boundary or not. More...
 
bool isMaserParticle () const
 Indicates if this particle belongs to the maser boundary. More...
 
void setMaserParticle (bool flag)
 Flags the status of the particle if it belongs to the maser boundary or not. More...
 
void setCommunicationComplexity (unsigned complexity)
 Set the communication complexity of the particle. More...
 
unsigned getCommunicationComplexity ()
 Obtains the communication complexity of the particle. More...
 
void setPeriodicComplexity (std::vector< int > complexity)
 Set the periodic communication complexity of the particle. More...
 
void setPeriodicComplexity (int index, int value)
 Set the periodic communication complexity of the particle. More...
 
const std::vector< int > & getPeriodicComplexity ()
 Obtains the periodic communication complexity of the particle. More...
 
void setPreviousPeriodicComplexity (std::vector< int > complexity)
 Set the previous periodic communication complexity of the paritcle. More...
 
const std::vector< int > & getPreviousPeriodicComplexity () const
 Sets the previous periodic communication complexity of the particle. More...
 
int getPeriodicComplexity (int index)
 Gets the periodic communication complexity of a certain boundary. More...
 
void unfix ()
 Unfix Particle function, which required a reference to the Species vector. It unfixes a Particle by computing the Particles mass and inertia. More...
 
void read (std::istream &is) override
 Particle read function, which accepts an std::istream as input. More...
 
virtual void oldRead (std::istream &is)
 
void write (std::ostream &os) const override
 Particle print function, which accepts an std::ostream as input. More...
 
std::string getName () const override
 Returns the name of the object. More...
 
virtual void setInfo (Mdouble info)
 Sets some user-defined information about this object (by default, species ID). More...
 
virtual Mdouble getInfo () const
 Returns some user-defined information about this object (by default, species ID). More...
 
void printHGrid (std::ostream &os) const
 Adds particle's HGrid level and cell coordinates to an ostream. More...
 
unsigned int getHGridLevel () const
 Returns particle's HGrid level. More...
 
BaseParticlegetHGridNextObject () const
 Returns pointer to next object in particle's HGrid level & cell. More...
 
BaseParticlegetHGridPrevObject () const
 Returns pointer to previous object in particle's HGrid level & cell. More...
 
int getHGridX () const
 Returns particle's HGrid cell X-coordinate. More...
 
int getHGridY () const
 Returns particle's HGrid cell Y-coordinate. More...
 
int getHGridZ () const
 Returns particle's HGrid cell Z-coordinate. More...
 
MatrixSymmetric3D getInvInertia () const
 Returns the inverse of the particle's inertia tensor. More...
 
Mdouble getInvMass () const override
 Returns the inverse of the particle's mass. More...
 
Mdouble getCurvature (const Vec3D &labFixedCoordinates) const override
 
Mdouble getKineticEnergy () const
 Calculates the particle's translational kinetic energy. More...
 
Mdouble getRotationalEnergy () const
 Calculates the particle's rotational kinetic energy. More...
 
Mdouble getGravitationalEnergy () const
 Calculates the particle's gravitational energy. More...
 
Mdouble getMass () const
 Returns the particle's mass. More...
 
Mdouble getSurfaceArea () const
 
Vec3D getMomentum () const
 
MatrixSymmetric3D getInertia () const
 
Vec3D getAngularMomentum () const
 
BaseParticlegetPeriodicFromParticle () const
 Returns the 'original' particle this one's a periodic copy of. More...
 
Mdouble getRadius () const
 Returns the particle's radius. More...
 
Mdouble getMaxInteractionRadius () const
 Returns the particle's interaction radius, which might be different from radius_ (e.g., when dealing with wet particles) More...
 
Mdouble getInteractionDistance (const BaseInteractable *i) const
 Returns the interactionDistance_ of the mixed species of this particle and the particle or wall i. More...
 
Mdouble getSumOfInteractionRadii (const BaseParticle *particle) const
 returns the sum of the radii plus the interactionDistance More...
 
Mdouble getWallInteractionRadius (const BaseWall *wall) const
 returns the radius plus the interactionDistance More...
 
const Vec3DgetDisplacement () const
 Returns the particle's displacement relative to the previous time step. More...
 
const Vec3DgetPreviousPosition () const
 Returns the particle's position in the previous time step. More...
 
const Vec3D getDisplacement2 (Mdouble xmin, Mdouble xmax, Mdouble ymin, Mdouble ymax, Mdouble zmin, Mdouble zmax, Mdouble t) const
 
virtual void setInertia ()
 
void setInertia (MatrixSymmetric3D inertia)
 Sets the particle's inertia_ (and adjusts invInertia_ accordingly) More...
 
void setInverseInertia (MatrixSymmetric3D inverseInertia)
 Sets the particle's inertia_ (and adjusts invInertia_ accordingly) More...
 
void setInfiniteInertia ()
 Sets the particle's inertia_ to 'infinite' (1e20) and its invInertia_ to 0. More...
 
void setPeriodicFromParticle (BaseParticle *p)
 Assigns the pointer to the 'original' particle this one's a periodic copy of (used in periodic boundary condition implementations). More...
 
void setHGridX (const int x)
 Sets the particle's HGrid cell X-coordinate. More...
 
void setHGridY (const int y)
 Sets the particle's HGrid cell Y-coordinate. More...
 
void setHGridZ (const int z)
 Sets the particle's HGrid cell Z-coordinate. More...
 
void setHGridLevel (const unsigned int level)
 Sets the particle's HGrid level. More...
 
void setHGridNextObject (BaseParticle *p)
 Sets the pointer to the next object in the particle's HGrid cell & level. More...
 
void setHGridPrevObject (BaseParticle *p)
 Sets the pointer to the previous object in the particle's HGrid cell & level. More...
 
virtual void setRadius (Mdouble radius)
 Sets the particle's radius_ (and adjusts the mass_ accordingly, based on the particle's species) More...
 
virtual Vec3D getAxes () const
 Only ustilised in case of superquadric particles. Had to create a virtual function to allow function access in writeVTK function in the particle handler. More...
 
virtual Mdouble getExponentEps1 () const
 Only ustilised in case of superquadric particles. Had to create a virtual function to allow function access in writeVTK function in the particle handler. More...
 
virtual Mdouble getExponentEps2 () const
 Only ustilised in case of superquadric particles. Had to create a virtual function to allow function access in writeVTK function in the particle handler. More...
 
virtual void setAxes (const Vec3D &axes)
 Only ustilised in case of superquadric particles. More...
 
virtual void setExponents (const Mdouble &eps1, const Mdouble &eps2)
 Only ustilised in case of superquadric particles. More...
 
MERCURY_DEPRECATED void setMass (Mdouble mass)
 Sets the particle's mass. More...
 
void setMassForP3Statistics (Mdouble mass)
 Sets the particle's mass This function should not be used, but is necessary to extend the CG toolbox to non-spherical particles. More...
 
void setDisplacement (const Vec3D &disp)
 Sets the particle's displacement (= difference between current position and that of the previous time step) More...
 
void setPreviousPosition (const Vec3D &pos)
 Sets the particle's position in the previous time step. More...
 
void movePrevious (const Vec3D &posMove)
 Adds a vector to the particle's previousPosition_. More...
 
void accelerate (const Vec3D &vel)
 Increases the particle's velocity_ by the given vector. More...
 
void angularAccelerate (const Vec3D &angVel)
 Increases the particle's angularVelocity_ by the given vector. More...
 
void addDisplacement (const Vec3D &addDisp)
 Adds a vector to the particle's displacement_. More...
 
void setHandler (ParticleHandler *handler)
 Sets the pointer to the particle's ParticleHandler. More...
 
ParticleHandlergetHandler () const
 Returns pointer to the particle's ParticleHandler. More...
 
BaseInteractiongetInteractionWith (BaseParticle *P, unsigned timeStamp, InteractionHandler *interactionHandler) override
 Checks if particle is in interaction with given particle P, and if so, returns vector of pointer to the associated BaseInteraction object (else returns empty vector). More...
 
virtual bool isInContactWith (const BaseParticle *P) const
 Get whether or not this particle is in contact with the given particle. More...
 
void integrateBeforeForceComputation (double time, double timeStep)
 First step of Velocity Verlet integration. More...
 
void integrateAfterForceComputation (double time, double timeStep)
 Second step of Velocity Verlet integration. More...
 
unsigned int getParticleDimensions () const
 Returns the particle's dimensions (either 2 or 3). More...
 
MERCURY_DEPRECATED void setIndSpecies (unsigned int indSpecies) override
 
void setSpecies (const ParticleSpecies *species)
 
virtual unsigned getNumberOfFieldsVTK () const
 
virtual std::string getTypeVTK (unsigned i) const
 
virtual std::string getNameVTK (unsigned i) const
 
virtual std::vector< MdoublegetFieldVTK (unsigned i) const
 
virtual void actionsAfterTimeStep ()
 
virtual bool isSphericalParticle () const
 
const HGridCellgetHGridCell () const
 
virtual void computeMass (const ParticleSpecies &s)
 Computes the particle's (inverse) mass and inertia. More...
 
- Public Member Functions inherited from BaseInteractable
 BaseInteractable ()
 Default BaseInteractable constructor. More...
 
 BaseInteractable (const BaseInteractable &p)
 Copy constructor. More...
 
 ~BaseInteractable () override
 Destructor, it simply destructs the BaseInteractable and all the objects it contains. More...
 
unsigned int getIndSpecies () const
 Returns the index of the species associated with the interactable object. More...
 
const ParticleSpeciesgetSpecies () const
 Returns a pointer to the species of this BaseInteractable. More...
 
void setSpecies (const ParticleSpecies *species)
 Sets the species of this BaseInteractable. More...
 
const Vec3DgetForce () const
 Returns the force on this BaseInteractable. More...
 
const Vec3DgetTorque () const
 Returns the torque on this BaseInteractable. More...
 
void setForce (const Vec3D &force)
 Sets the force on this BaseInteractable. More...
 
void setTorque (const Vec3D &torque)
 Sets the torque on this BaseInteractable. More...
 
void addForce (const Vec3D &addForce)
 Adds an amount to the force on this BaseInteractable. More...
 
void addTorque (const Vec3D &addTorque)
 Adds an amount to the torque on this BaseInteractable. More...
 
void resetForceTorque (int numberOfOMPthreads)
 
void sumForceTorqueOMP ()
 
const Vec3DgetPosition () const
 Returns the position of this BaseInteractable. More...
 
const QuaterniongetOrientation () const
 Returns the orientation of this BaseInteractable. More...
 
void setPosition (const Vec3D &position)
 Sets the position of this BaseInteractable. More...
 
void setOrientationViaNormal (Vec3D normal)
 Sets the orientation of this BaseInteractable by defining the vector that results from the rotation of the (1,0,0) vector. More...
 
void setOrientationViaEuler (Vec3D eulerAngle)
 Sets the orientation of this BaseInteractable by defining the euler angles. More...
 
void setOrientation (const Quaternion &orientation)
 Sets the orientation of this BaseInteractable. More...
 
virtual void move (const Vec3D &move)
 Moves this BaseInteractable by adding an amount to the position. More...
 
virtual void rotate (const Vec3D &angularVelocityDt)
 Rotates this BaseInteractable. More...
 
const std::vector< BaseInteraction * > & getInteractions () const
 Returns a list of interactions which belong to this interactable. More...
 
void addInteraction (BaseInteraction *I)
 Adds an interaction to this BaseInteractable. More...
 
bool removeInteraction (BaseInteraction *I)
 Removes an interaction from this BaseInteractable. More...
 
void copyInteractionsForPeriodicParticles (const BaseInteractable &p)
 Copies interactions to this BaseInteractable whenever a periodic copy made. More...
 
void setVelocity (const Vec3D &velocity)
 set the velocity of the BaseInteractable. More...
 
void setAngularVelocity (const Vec3D &angularVelocity)
 set the angular velocity of the BaseInteractble. More...
 
void addVelocity (const Vec3D &velocity)
 adds an increment to the velocity. More...
 
void addAngularVelocity (const Vec3D &angularVelocity)
 add an increment to the angular velocity. More...
 
virtual const Vec3DgetVelocity () const
 Returns the velocity of this interactable. More...
 
virtual const Vec3DgetAngularVelocity () const
 Returns the angular velocity of this interactable. More...
 
void setPrescribedPosition (const std::function< Vec3D(double)> &prescribedPosition)
 Allows the position of an infinite mass interactable to be prescribed. More...
 
void applyPrescribedPosition (double time)
 Computes the position from the user defined prescribed position function. More...
 
void setPrescribedVelocity (const std::function< Vec3D(double)> &prescribedVelocity)
 Allows the velocity of an infinite mass interactable to be prescribed. More...
 
void applyPrescribedVelocity (double time)
 Computes the velocity from the user defined prescribed velocity function. More...
 
void setPrescribedOrientation (const std::function< Quaternion(double)> &prescribedOrientation)
 Allows the orientation of the infinite mass interactbale to be prescribed. More...
 
void applyPrescribedOrientation (double time)
 Computes the orientation from the user defined prescribed orientation function. More...
 
void setPrescribedAngularVelocity (const std::function< Vec3D(double)> &prescribedAngularVelocity)
 Allows the angular velocity of the infinite mass interactable to be prescribed. More...
 
void applyPrescribedAngularVelocity (double time)
 Computes the angular velocity from the user defined prescribed angular velocity. More...
 
virtual const Vec3D getVelocityAtContact (const Vec3D &contact) const
 Returns the velocity at the contact point, use by many force laws. More...
 
void integrateBeforeForceComputation (double time, double timeStep)
 This is part of integrate routine for objects with infinite mass. More...
 
void integrateAfterForceComputation (double time, double timeStep)
 This is part of the integration routine for objects with infinite mass. More...
 
- Public Member Functions inherited from BaseObject
 BaseObject ()=default
 Default constructor. More...
 
 BaseObject (const BaseObject &p)=default
 Copy constructor, copies all the objects BaseObject contains. More...
 
virtual ~BaseObject ()=default
 virtual destructor More...
 
virtual void moveInHandler (unsigned int index)
 Except that it is virtual, it does the same thing as setIndex() does. More...
 
void setIndex (unsigned int index)
 Allows one to assign an index to an object in the handler/container. More...
 
void setId (unsigned long id)
 Assigns a unique identifier to each object in the handler (container) which remains constant even after the object is deleted from the container/handler. More...
 
unsigned int getIndex () const
 Returns the index of the object in the handler. More...
 
unsigned int getId () const
 Returns the unique identifier of any particular object. More...
 
void setGroupId (unsigned groupId)
 
unsigned getGroupId () const
 

Protected Attributes

Mdouble radius_
 
Mdouble invMass_
 Particle radius_. More...
 
MatrixSymmetric3D invInertia_
 Inverse Particle mass (for computation optimization) More...
 

Private Attributes

ParticleHandlerhandler_
 Inverse Particle inverse inertia (for computation optimization) More...
 
HGridCell hGridCell
 
BaseParticlehGridNextObject_
 
BaseParticlehGridPrevObject_
 Pointer to the next Particle in the same HGrid cell. More...
 
BaseParticleperiodicFromParticle_
 Pointer to the previous Particle in the same HGrid cell. More...
 
bool isMPIParticle_
 Pointer to originating Particle. More...
 
bool isInMPIDomain_
 returns true if the particle acts as an MPI particle instead of a real particle More...
 
unsigned communicationComplexity_
 returns true if it flagged as being in MPI domain More...
 
bool isInPeriodicDomain_
 
bool isPeriodicGhostParticle_
 bool that indicates if a particle is in the periodic domain of any boundary More...
 
std::vector< intpreviousPeriodicComplexity_
 Indicates if the particle is a ghost particle of a periodic particle. More...
 
std::vector< intperiodicComplexity_
 Indicates the periodic complexity at previous time step. More...
 
bool isMaserParticle_
 Indicates the periodic complexity at current time step. Used to update periodic status. More...
 
Vec3D displacement_
 Indicates if this particle belongs to the maser boundary or is released into the wide open world. More...
 
Vec3D previousPosition_
 Displacement (only used in StatisticsVector, StatisticsPoint) More...
 
Mdouble info_
 

Friends

void ParticleSpecies::computeMass (BaseParticle *) const
 Particle's position at previous time step. More...
 

Detailed Description

Since r3648, BaseParticle is an abstract class. Use SphericalParticle for a 'basic' particle.

Constructor & Destructor Documentation

◆ BaseParticle() [1/3]

BaseParticle::BaseParticle ( )

Basic Particle constructor, creates an Particle at (0,0,0) with radius, mass and inertia equal to 1.

default constructor, creates an Particle at (0,0,0) with radius, mass and inertia equal to 1

35 {
36  handler_ = nullptr;
38  radius_ = 1.0;
39  invMass_ = 1.0;
40  invInertia_ = MatrixSymmetric3D(1, 0, 0, 1, 0, 1);
41 
42  periodicFromParticle_ = nullptr;
43  isMPIParticle_ = false;
44  isInMPIDomain_ = false;
45  isInPeriodicDomain_ = false;
47  isMaserParticle_ = false;
49  periodicComplexity_ = std::vector<int>(0);
50  previousPeriodicComplexity_ = std::vector<int>(0);
51 #ifdef CONTACT_LIST_HGRID
52  firstPossibleContact = nullptr;
53 #endif
54  hGridNextObject_ = nullptr;
55  hGridPrevObject_ = nullptr;
56 
57  hGridCell.setHGridLevel(99999);
58  hGridCell.setHGridX(99999);
59  hGridCell.setHGridY(99999);
60  hGridCell.setHGridZ(99999);
61 
62  info_ = std::numeric_limits<double>::quiet_NaN();
63 
64  logger(DEBUG, "BaseParticle::BaseParticle() finished");
65 }

References communicationComplexity_, displacement_, FATAL, handler_, hGridCell, hGridNextObject_, hGridPrevObject_, info_, invInertia_, invMass_, isInMPIDomain_, isInPeriodicDomain_, isMaserParticle_, isMPIParticle_, isPeriodicGhostParticle_, logger, periodicComplexity_, periodicFromParticle_, previousPeriodicComplexity_, radius_, HGridCell::setHGridLevel(), HGridCell::setHGridX(), HGridCell::setHGridY(), HGridCell::setHGridZ(), and Vec3D::setZero().

◆ BaseParticle() [2/3]

BaseParticle::BaseParticle ( const BaseParticle p)

Particle copy constructor, which accepts as input a reference to a Particle. It creates a copy of this Particle and all it's information. Usually it is better to use the copy() function for polymorphism.

Constructor that copies most of the properties of the given particle. Please note that not everything is copied, for example the position in the HGrid is not determined yet by the end of this constructor. It also does not copy the interactions and the pointer to the handler that handles this particle. Use with care.

Parameters
[in,out]pReference to the BaseParticle this one should become a copy of.
76  : BaseInteractable(p)
77 {
78  handler_ = nullptr;
80  radius_ = p.radius_;
81  invMass_ = p.getInvMass();
83 
84  hGridNextObject_ = nullptr;
85  hGridPrevObject_ = nullptr;
86 
88  hGridCell.setHGridX(99999);
89  hGridCell.setHGridY(99999);
90  hGridCell.setHGridZ(99999);
91 
99  //periodicComplexity_ = p.periodicComplexity_;
100  //previousPeriodicComplexity_ = p.previousPeriodicComplexity_;
101 #ifdef CONTACT_LIST_HGRID
102  firstPossibleContact = nullptr;
103 #endif
104 
105  info_ = p.info_;
106  logger(DEBUG, "BaseParticle::BaseParticle(BaseParticle &p) finished");
107 }

References communicationComplexity_, displacement_, FATAL, getHGridLevel(), getInvInertia(), getInvMass(), handler_, hGridCell, hGridNextObject_, hGridPrevObject_, info_, invInertia_, invMass_, isInMPIDomain_, isInPeriodicDomain_, isMaserParticle_, isMPIParticle_, isPeriodicGhostParticle_, logger, periodicFromParticle_, radius_, HGridCell::setHGridLevel(), HGridCell::setHGridX(), HGridCell::setHGridY(), and HGridCell::setHGridZ().

◆ BaseParticle() [3/3]

BaseParticle::BaseParticle ( const ParticleSpecies s)
explicit
110  : BaseParticle()
111 {
112  setSpecies(s);
113 #ifdef CONTACT_LIST_HGRID
114  firstPossibleContact = nullptr;
115 #endif
116  logger(DEBUG, "BaseParticle::BaseParticle(BaseSpecies &s) finished");
117 }

References FATAL, logger, and setSpecies().

◆ ~BaseParticle()

BaseParticle::~BaseParticle ( )
override

Particle destructor, needs to be implemented and checked if it removes tangential spring information.

Destructor. It asks the ParticleHandler to check if this was the smallest or largest particle and adjust itself accordingly.

124 {
125 
126  if (getHandler() != nullptr)
127  {
129  if (isFixed())
131  }
132  logger(DEBUG, "BaseParticle::~BaseParticle() of particle % finished.", getId());
133 
134 }

References ParticleHandler::checkExtremaOnDelete(), FATAL, getHandler(), BaseObject::getId(), isFixed(), logger, and ParticleHandler::removedFixedParticle().

Member Function Documentation

◆ accelerate()

void BaseParticle::accelerate ( const Vec3D vel)

Increases the particle's velocity_ by the given vector.

increases the the particle's velocity_ (BaseInteractable member) by adding the given vector.

Parameters
[in]velvector to be added to the velocity_
623 {
624  addVelocity(vel);
625 }

References BaseInteractable::addVelocity().

Referenced by integrateAfterForceComputation(), integrateBeforeForceComputation(), MovingIntersectionOfWallsUnitTest_MovingReferenceFrame::setupInitialConditions(), AngledPeriodicBoundary::shiftPosition(), test1(), and test2().

◆ actionsAfterTimeStep()

virtual void BaseParticle::actionsAfterTimeStep ( )
inlinevirtual

Reimplemented in ThermalParticle, and HeatFluidCoupledParticle.

643  {};

◆ addDisplacement()

void BaseParticle::addDisplacement ( const Vec3D addDisp)

Adds a vector to the particle's displacement_.

Lets you add a vector to the particle's displacement_ vector.

Parameters
[in]addDispvector to be added.
642 {
643  displacement_ += addDisp;
644 }

References displacement_.

◆ angularAccelerate()

void BaseParticle::angularAccelerate ( const Vec3D angVel)

Increases the particle's angularVelocity_ by the given vector.

increases the particle's angularVelocity_ (BaseInteractable member) by adding the given vector.

Parameters
[in]angVelvector to be added to the angularVelocity_
633 {
634  addAngularVelocity(angVel);
635 }

References BaseInteractable::addAngularVelocity().

Referenced by integrateAfterForceComputation(), integrateBeforeForceComputation(), AngledPeriodicBoundary::shiftPosition(), test1(), and test2().

◆ computeMass()

void BaseParticle::computeMass ( const ParticleSpecies s)
virtual

Computes the particle's (inverse) mass and inertia.

Reimplemented in SuperQuadricParticle.

862  {
863  if (isFixed()) return;
864  if (getParticleDimensions()==3) {
865  invMass_ = 1.0 / (4.0 / 3.0 * constants::pi * getRadius() * getRadius() * getRadius() * s.getDensity());
866  invInertia_ = MatrixSymmetric3D(1, 0, 0, 1, 0, 1) / (.4 * getMass() * mathsFunc::square(getRadius()));
867  } else {
868  invMass_ = 1.0 / (constants::pi * getRadius() * getRadius() * s.getDensity());
869  invInertia_ = MatrixSymmetric3D(1, 0, 0, 1, 0, 1) / (.5 * getMass() * mathsFunc::square(getRadius()));
870  }
871 };

References ParticleSpecies::getDensity(), getMass(), getParticleDimensions(), getRadius(), invInertia_, invMass_, isFixed(), constants::pi, and mathsFunc::square().

Referenced by ParticleSpecies::computeMass(), and ChuteWithContraction::create_inflow_particle().

◆ copy()

virtual BaseParticle* BaseParticle::copy ( ) const
pure virtual

Particle copy method. It calls to copy constructor of this Particle, useful for polymorphism.

Implemented in ThermalParticle, SuperQuadricParticle, SphericalParticle, LiquidFilmParticle, and HeatFluidCoupledParticle.

Referenced by ChuteWithPeriodicInflow::AddContinuingBottom(), PolydisperseInsertionBoundary::addGenerandum(), CircularPeriodicBoundary::checkBoundaryAfterParticleMoved(), ConstantMassFlowMaserBoundary::checkBoundaryAfterParticleMoved(), SubcriticalMaserBoundary::checkBoundaryAfterParticleMoved(), SubcriticalMaserBoundaryTEST::checkBoundaryAfterParticleMoved(), DPMBase::checkParticleForInteractionLocalPeriodic(), ContractionWithPeriodicInflow::ContractionWithPeriodicInflow(), CurvyChute::createBottom(), ConstantMassFlowMaserBoundary::createGhostCopy(), SubcriticalMaserBoundary::createGhostCopy(), PeriodicBoundary::createGhostParticle(), TimeDependentPeriodicBoundary::createGhostParticle(), LeesEdwardsBoundary::createHorizontalPeriodicParticles(), ShearBoxBoundary::createHorizontalPeriodicParticles(), AngledPeriodicBoundary::createPeriodicParticle(), CircularPeriodicBoundary::createPeriodicParticle(), LeesEdwardsBoundary::createVerticalPeriodicParticles(), ShearBoxBoundary::createVerticalPeriodicParticles(), ChuteWithPeriodicInflow::ExtendInWidth(), BidisperseCubeInsertionBoundary::generateParticle(), PeriodicBoundaryHandler::processLocalGhostParticles(), DPMBase::readNextDataFile(), CurvyChute::setBasalPrototype(), PolydisperseInsertionBoundary::setGenerandum(), and InsertionBoundary::setParticleToCopy().

◆ fixParticle()

◆ getAngularMomentum()

◆ getAxes()

Vec3D BaseParticle::getAxes ( ) const
virtual

Only ustilised in case of superquadric particles. Had to create a virtual function to allow function access in writeVTK function in the particle handler.

Reimplemented in SuperQuadricParticle.

843 { return Vec3D(0, 0, 0); }

Referenced by MPISuperQuadric::copyDataFromParticleToMPIParticle(), and BaseWall::getInteractionWith().

◆ getCommunicationComplexity()

unsigned BaseParticle::getCommunicationComplexity ( )

Obtains the communication complexity of the particle.

196 {
198 }

References communicationComplexity_.

Referenced by MPISphericalParticle::copyDataFromParticleToMPIParticle(), and Domain::updateParticles().

◆ getCurvature()

Mdouble BaseParticle::getCurvature ( const Vec3D labFixedCoordinates) const
inlineoverridevirtual

returns the inverse radius, or curvature, of the surface. This value is zero for walls and gets overridden for particles that have finite radius

Todo:
should be wall-type dependent

Reimplemented from BaseInteractable.

Reimplemented in SuperQuadricParticle.

297  { return 1.0/radius_; }

References radius_.

◆ getDisplacement()

const Vec3D& BaseParticle::getDisplacement ( ) const
inline

Returns the particle's displacement relative to the previous time step.

Returns the particle's displacement_, which is the difference between the current particle's position and its position in the previous time step.

Returns
(reference to) the particle displacement vector
396  { return displacement_; }

References displacement_.

Referenced by CircularPeriodicBoundary::checkBoundaryAfterParticleMoved(), and FluxBoundary::checkBoundaryAfterParticleMoved().

◆ getDisplacement2()

const Vec3D BaseParticle::getDisplacement2 ( Mdouble  xmin,
Mdouble  xmax,
Mdouble  ymin,
Mdouble  ymax,
Mdouble  zmin,
Mdouble  zmax,
Mdouble  t 
) const
Todo:
see .cc file. \TWH
Todo:
Rewrite, redefine (TW). Is only used in StatisticsVector.hcc, consider moving to that class.
467 {
469  if (xmax > xmin && fabs(disp.X) > .5 * (xmax - xmin))
470  {
471  if (disp.X > 0)
472  disp.X -= xmax - xmin;
473  else
474  disp.X += xmax - xmin;
475  }
476  if (ymax > ymin && fabs(disp.Y) > .5 * (ymax - ymin))
477  {
478  if (disp.Y > 0)
479  disp.Y -= ymax - ymin;
480  else
481  disp.Y += ymax - ymin;
482  }
483  if (zmax > zmin && fabs(disp.Z) > .5 * (zmax - zmin))
484  {
485  if (disp.Z > 0)
486  disp.Z -= zmax - zmin;
487  else
488  disp.Z += zmax - zmin;
489  }
490  disp /= t;
491  return disp;
492 }

References BaseInteractable::getPosition(), getPreviousPosition(), Vec3D::X, Vec3D::Y, and Vec3D::Z.

◆ getExponentEps1()

double BaseParticle::getExponentEps1 ( ) const
virtual

Only ustilised in case of superquadric particles. Had to create a virtual function to allow function access in writeVTK function in the particle handler.

Reimplemented in SuperQuadricParticle.

846 { return 0; }

Referenced by MPISuperQuadric::copyDataFromParticleToMPIParticle(), and BaseWall::getInteractionWith().

◆ getExponentEps2()

double BaseParticle::getExponentEps2 ( ) const
virtual

Only ustilised in case of superquadric particles. Had to create a virtual function to allow function access in writeVTK function in the particle handler.

Reimplemented in SuperQuadricParticle.

849 { return 0; }

Referenced by MPISuperQuadric::copyDataFromParticleToMPIParticle(), and BaseWall::getInteractionWith().

◆ getFieldVTK()

std::vector< Mdouble > BaseParticle::getFieldVTK ( unsigned  i) const
virtual

Reimplemented in LiquidFilmParticle, and HeatFluidCoupledParticle.

838 {
839  return std::vector<Mdouble>();
840 }

◆ getGravitationalEnergy()

Mdouble BaseParticle::getGravitationalEnergy ( ) const

Calculates the particle's gravitational energy.

Gravitational energy is the potential energy stored in teh particles position due to the gravity field. This is a relative term, so we need to define what zero energy means: The gravitational energy of a particle is zero when its center of mass is at the origin.

Returns
the particle's gravitational energy

◆ getHandler()

ParticleHandler * BaseParticle::getHandler ( ) const

◆ getHGridCell()

◆ getHGridLevel()

◆ getHGridNextObject()

◆ getHGridPrevObject()

BaseParticle* BaseParticle::getHGridPrevObject ( ) const
inline

Returns pointer to previous object in particle's HGrid level & cell.

Returns the previous object in the particle's HGrid cell

Returns
pointer to the previous object in the particle's HGrid cell
251  { return hGridPrevObject_; }

References hGridPrevObject_.

Referenced by Mercury2D::hGridRemoveParticle(), and Mercury3D::hGridRemoveParticle().

◆ getHGridX()

int BaseParticle::getHGridX ( ) const
inline

Returns particle's HGrid cell X-coordinate.

Returns
the particle's HGrid cell's X-coordinate
266  { return hGridCell.getHGridX(); }

References HGridCell::getHGridX(), and hGridCell.

Referenced by Mercury2D::computeInternalForces(), Mercury3D::computeInternalForces(), Mercury2D::hGridRemoveParticle(), Mercury2D::hGridUpdateParticle(), and Mercury3D::hGridUpdateParticle().

◆ getHGridY()

int BaseParticle::getHGridY ( ) const
inline

Returns particle's HGrid cell Y-coordinate.

Returns
the particle's HGrid cell's Y-coordinate
273  { return hGridCell.getHGridY(); }

References HGridCell::getHGridY(), and hGridCell.

Referenced by Mercury2D::computeInternalForces(), Mercury3D::computeInternalForces(), Mercury2D::hGridRemoveParticle(), Mercury2D::hGridUpdateParticle(), and Mercury3D::hGridUpdateParticle().

◆ getHGridZ()

int BaseParticle::getHGridZ ( ) const
inline

Returns particle's HGrid cell Z-coordinate.

Returns
the particle's HGrid cell's Z-coordinate
280  { return hGridCell.getHGridZ(); }

References HGridCell::getHGridZ(), and hGridCell.

Referenced by Mercury3D::computeInternalForces(), and Mercury3D::hGridUpdateParticle().

◆ getInertia()

MatrixSymmetric3D BaseParticle::getInertia ( ) const
inline

◆ getInfo()

Mdouble BaseParticle::getInfo ( ) const
virtual

Returns some user-defined information about this object (by default, species ID).

353 {
354  if (std::isnan(info_))
355  return getSpecies()->getId();
356  else
357  return info_;
358 }

References BaseObject::getId(), BaseInteractable::getSpecies(), and info_.

Referenced by DPMBase::getInfo().

◆ getInteractionDistance()

Mdouble BaseParticle::getInteractionDistance ( const BaseInteractable i) const
inline

Returns the interactionDistance_ of the mixed species of this particle and the particle or wall i.

370  {
371  //const auto mixedSpecies = getSpecies()->getHandler()->getMixedObject(getSpecies(),particle->getSpecies());
372  //return mixedSpecies->getInteractionDistance();
373  return getSpecies()->getMixedSpecies(i->getSpecies())->getInteractionDistance();
374  }

References BaseSpecies::getInteractionDistance(), ParticleSpecies::getMixedSpecies(), BaseInteractable::getSpecies(), and constants::i.

Referenced by getSumOfInteractionRadii(), and getWallInteractionRadius().

◆ getInteractionWith()

BaseInteraction * BaseParticle::getInteractionWith ( BaseParticle P,
unsigned  timeStamp,
InteractionHandler interactionHandler 
)
overridevirtual

Checks if particle is in interaction with given particle P, and if so, returns vector of pointer to the associated BaseInteraction object (else returns empty vector).

Creates/updates a BaseInteraction object, treating the interaction between this particle and a given one, in case there is an overlap between the two.

Parameters
[in]Pparticle to check the interaction with
[in]timeStamptime stamp to be assigned to the interaction object (i.e., the current time)
[in,out]interactionHandlerBaseInteraction container from where the interaction is retrieved, and to which it is assigned (if it is a new interaction).
Returns
the pointer to the interaction object (if the particles overlap), or 0 (if they don't overlap).
Todo:
We should consider setting the contact point to
Author
weinhartt

Implements BaseInteractable.

Reimplemented in SuperQuadricParticle.

680 {
681  //get the normal (from P away from the contact)
682  const Vec3D branchVector = P->getPosition() - getPosition();
683  //Get the square of the distance between particle i and particle j
684  const Mdouble distanceSquared = Vec3D::getLengthSquared(branchVector);
685  //const auto species = interactionHandler->getDPMBase()->speciesHandler.getMixedObject(getSpecies(),P->getSpecies());
686  const Mdouble sumOfInteractionRadii = getSumOfInteractionRadii(P);
687  if (distanceSquared >= sumOfInteractionRadii * sumOfInteractionRadii) {
688  return nullptr;
689  }
690  BaseInteraction* const C = interactionHandler->getInteraction(P, this, timeStamp);
691  const Mdouble distance = std::sqrt(distanceSquared);
692  C->setNormal(branchVector / distance);
693  C->setOverlap(P->getRadius() + getRadius() - distance);
694  C->setDistance(distance);
695  C->setContactPoint(P->getPosition() - (P->getRadius() - 0.5 * C->getOverlap()) * C->getNormal());
697  //Mdouble ratio=P->getRadius()/(getRadius()+P->getRadius());
698  //C->setContactPoint(P->getPosition() - (P->getRadius() - ratio * C->getOverlap()) * C->getNormal());
699  return C;
700 }

References InteractionHandler::getInteraction(), Vec3D::getLengthSquared(), BaseInteraction::getNormal(), BaseInteraction::getOverlap(), BaseInteractable::getPosition(), getRadius(), getSumOfInteractionRadii(), BaseInteraction::setContactPoint(), BaseInteraction::setDistance(), BaseInteraction::setNormal(), and BaseInteraction::setOverlap().

Referenced by SphericalSuperQuadricCollision::actionsAfterTimeStep(), ContactDetectionRotatedSpheresTest::actionsAfterTimeStep(), DPMBase::computeInternalForce(), PeriodicBoundaryHandler::processLocalInteractionData(), PeriodicBoundaryHandler::processReceivedInteractionData(), Domain::processReceivedInteractionData(), and FileReader::read().

◆ getInvInertia()

MatrixSymmetric3D BaseParticle::getInvInertia ( ) const
inline

Returns the inverse of the particle's inertia tensor.

Returns
the inverse of the particle's inertia tensor
287  { return invInertia_; }

References invInertia_.

Referenced by BaseParticle(), integrateAfterForceComputation(), integrateBeforeForceComputation(), test1(), and test2().

◆ getInvMass()

Mdouble BaseParticle::getInvMass ( ) const
inlineoverridevirtual

Returns the inverse of the particle's mass.

Returns
the inverse of the particle's mass

Reimplemented from BaseInteractable.

294  { return invMass_; }

References invMass_.

Referenced by BaseParticle(), ThermalInteraction< NormalForceInteraction >::computeNormalForce(), integrateAfterForceComputation(), integrateBeforeForceComputation(), test1(), and test2().

◆ getKineticEnergy()

Mdouble BaseParticle::getKineticEnergy ( ) const

Calculates the particle's translational kinetic energy.

Returns
the particle's translational kinetic energy

Calculates the particle's kinetic energy

Returns
the particle's kinetic energy
445 {
446  if (isFixed())
447  return 0.0;
448  else
449  return 0.5 * getMass() * getVelocity().getLengthSquared();
450 }

References Vec3D::getLengthSquared(), getMass(), BaseInteractable::getVelocity(), and isFixed().

◆ getMass()

◆ getMaxInteractionRadius()

Mdouble BaseParticle::getMaxInteractionRadius ( ) const
inline

Returns the particle's interaction radius, which might be different from radius_ (e.g., when dealing with wet particles)

Calculates the interaction radius of the particle (when it comes to interaction with other particles), including the effect of a possible additional 'interaction distance' besides the 'normal' radius. The interaction radius differs from the radius_, for example, when dealing with wet particles (i.e. particles with an additional liquid layer, which is dealt with in the particle's species).

Returns
the particle's interaction radius for particle-particle interaction
362  {
363  return getRadius() + getSpecies()->getMaxInteractionDistance() * 0.5;
364  }

References ParticleSpecies::getMaxInteractionDistance(), getRadius(), and BaseInteractable::getSpecies().

Referenced by ParticleHandler::checkExtrema(), DPMBase::checkParticleForInteractionLocalPeriodic(), Mercury2D::computeInternalForces(), Mercury3D::computeInternalForces(), LeesEdwardsBoundary::createHorizontalPeriodicParticles(), ShearBoxBoundary::createHorizontalPeriodicParticles(), AngledPeriodicBoundary::createPeriodicParticle(), CircularPeriodicBoundary::createPeriodicParticle(), ConstantMassFlowMaserBoundary::createPeriodicParticle(), PeriodicBoundary::createPeriodicParticle(), SubcriticalMaserBoundary::createPeriodicParticle(), SubcriticalMaserBoundaryTEST::createPeriodicParticle(), TimeDependentPeriodicBoundary::createPeriodicParticle(), LeesEdwardsBoundary::createVerticalPeriodicParticles(), ShearBoxBoundary::createVerticalPeriodicParticles(), SuperQuadricParticle::getInteractionWith(), ParticleHandler::getLargestInteractionRadiusLocal(), ParticleHandler::getSmallestInteractionRadiusLocal(), Mercury3D::hGridFindContactsWithTargetCell(), Mercury2D::hGridFindParticleContacts(), Mercury3D::hGridFindParticleContacts(), Mercury2D::hGridGetInteractingParticleList(), Mercury3D::hGridGetInteractingParticleList(), Mercury2D::hGridHasParticleContacts(), MercuryBase::hGridNeedsRebuilding(), HGridOptimiser::initialise(), HGrid::insertParticleToHgrid(), main(), RotatingDrum::setupInitialConditions(), BouncingSuperQuadric::setupInitialConditions(), EllipticalSuperQuadricCollision::setupInitialConditions(), SlidingSpheresUnitTest::setupInitialConditions(), SphericalSuperQuadricCollision::setupInitialConditions(), ContactDetectionNormalSpheresTest::setupInitialConditions(), ContactDetectionRotatedSpheresTest::setupInitialConditions(), VisualisationTest::setupInitialConditions(), BoundingRadiusTester::test(), and DPMBase::updateGhostGrid().

◆ getMomentum()

Vec3D BaseParticle::getMomentum ( ) const
inline
329  { return getVelocity() / invMass_; }

References BaseInteractable::getVelocity(), and invMass_.

◆ getName()

std::string BaseParticle::getName ( ) const
overridevirtual

Returns the name of the object.

Returns the name of the object; in this case 'BaseParticle'.

Returns
The object name.

Implements BaseObject.

Reimplemented in ThermalParticle, SuperQuadricParticle, SphericalParticle, LiquidFilmParticle, and HeatFluidCoupledParticle.

343 {
344  return "BaseParticle";
345 }

Referenced by MeshTriangle::getInteractionWith(), and isInContactWith().

◆ getNameVTK()

std::string BaseParticle::getNameVTK ( unsigned  i) const
virtual

Reimplemented in LiquidFilmParticle, and HeatFluidCoupledParticle.

833 {
834  return "";
835 }

Referenced by ParticleVtkWriter::writeExtraFields().

◆ getNumberOfFieldsVTK()

unsigned BaseParticle::getNumberOfFieldsVTK ( ) const
virtual

Reimplemented in LiquidFilmParticle, and HeatFluidCoupledParticle.

823 {
824  return 0;
825 }

◆ getParticleDimensions()

unsigned int BaseParticle::getParticleDimensions ( ) const

Returns the particle's dimensions (either 2 or 3).

Returns the amount of dimensions of the particle (2 or 3, basically)

Returns
the number of dimension of the particle
771 {
773 }

References BaseHandler< T >::getDPMBase(), getHandler(), and DPMBase::getParticleDimensions().

Referenced by computeMass(), SuperQuadricParticle::computeMass(), and getVolume().

◆ getPeriodicComplexity() [1/2]

const std::vector< int > & BaseParticle::getPeriodicComplexity ( )

Obtains the periodic communication complexity of the particle.

226 {
227  //TODO resolve this hack
228  //hack: generally you'd add particles after declaring the boundaries
229  //but no official programming guildelines rules have been setup for that
230  //So incase that doesnt happen we need to resize this periodicComplexity
231  if (periodicComplexity_.empty())
232  {
233  const unsigned numberOfPeriodicBoundaries = getHandler()->getDPMBase()->periodicBoundaryHandler.getSize();
234  if (numberOfPeriodicBoundaries > 0)
235  {
236  periodicComplexity_.resize(numberOfPeriodicBoundaries, 0);
237  }
238  }
239  return periodicComplexity_;
240 }

References BaseHandler< T >::getDPMBase(), getHandler(), BaseHandler< T >::getSize(), DPMBase::periodicBoundaryHandler, and periodicComplexity_.

Referenced by PeriodicBoundaryHandler::findNewParticle(), SubcriticalMaserBoundaryTEST::modifyGhostAfterCreation(), PeriodicBoundaryHandler::processLocalGhostParticles(), PeriodicBoundaryHandler::shiftParticle(), PeriodicBoundaryHandler::updateMaserParticle(), PeriodicBoundaryHandler::updateParticles(), and PeriodicBoundaryHandler::updateParticleStatus().

◆ getPeriodicComplexity() [2/2]

int BaseParticle::getPeriodicComplexity ( int  index)

Gets the periodic communication complexity of a certain boundary.

Todo:
TW @Marnix, this is indeed a hack; you should call a setter every time you add a value to the periodic boundary handler (this function takes 0.5% cpu time in the speedtest)
243 {
244  //hack: generally you'd add particles after declaring the boundaries
245  //but no official programming guildelines rules have been setup for that
246  //So incase that doesnt happen we need to resize this periodicComplexity
248  if (periodicComplexity_.empty())
249  {
250  const unsigned numberOfPeriodicBoundaries = getHandler()->getDPMBase()->periodicBoundaryHandler.getSize();
251  if (numberOfPeriodicBoundaries > 0)
252  {
253  periodicComplexity_.resize(numberOfPeriodicBoundaries, 0);
254  }
255  }
256 
257  return periodicComplexity_[index];
258 }

References BaseHandler< T >::getDPMBase(), getHandler(), BaseHandler< T >::getSize(), DPMBase::periodicBoundaryHandler, and periodicComplexity_.

◆ getPeriodicFromParticle()

◆ getPreviousPeriodicComplexity()

const std::vector< int > & BaseParticle::getPreviousPeriodicComplexity ( ) const

Sets the previous periodic communication complexity of the particle.

266 {
268 }

References previousPeriodicComplexity_.

Referenced by PeriodicBoundaryHandler::updateParticles(), and PeriodicBoundaryHandler::updateParticleStatus().

◆ getPreviousPosition()

const Vec3D& BaseParticle::getPreviousPosition ( ) const
inline

Returns the particle's position in the previous time step.

Returns the particle's position in the previous time step.

Returns
(reference to) the previous position of the particle
404  { return previousPosition_; }

References previousPosition_.

Referenced by getDisplacement2(), and PeriodicBoundaryHandler::updateParticles().

◆ getRadius()

Mdouble BaseParticle::getRadius ( ) const
inline

Returns the particle's radius.

Returns
the particle's radius
349  { return radius_; }

References radius_.

Referenced by ThermalParticle::actionsAfterTimeStep(), SmoothChute::actionsBeforeTimeStep(), ConstantMassFlowMaserBoundary::activateMaser(), SilbertPeriodic::add_flow_particles(), NautaMixer::addParticlesAtWall(), statistics_while_running< T >::auto_set_domain(), statistics_while_running< T >::auto_set_z(), DeletionBoundary::checkBoundaryAfterParticleMoved(), Funnel::cleanChute(), CGHandler::computeContactPoints(), ChuteWithPeriodicInflow::computeInternalForces(), computeMass(), MercuryLogo::constructTextAsParticles(), MPISphericalParticle::copyDataFromParticleToMPIParticle(), Funnel::create_funnel(), LawinenBox::create_inflow_particle(), ChutePeriodic::create_inflow_particle(), ChuteWithContraction::create_inflow_particle(), AngleOfRepose::create_inflow_particle(), FlowRule::create_inflow_particle(), SilbertPeriodic::create_inflow_particle(), SegregationWithHopper::create_inflow_particle(), Slide::create_rough_wall(), Chute::createBottom(), CurvyChute::createBottom(), Chute::createFlowParticle(), ChuteWithWedge::createFlowParticle(), DPM::DPM(), InsertionBoundary::generateParticle(), NurbsWall::getDistanceAndNormal(), Screw::getDistanceAndNormal(), BasicIntersectionOfWalls::getDistanceAndNormal(), BasicUnionOfWalls::getDistanceAndNormal(), CylindricalWall::getDistanceAndNormal(), InfiniteWallWithHole::getDistanceAndNormal(), IntersectionOfWalls::getDistanceAndNormal(), ParabolaChute::getDistanceAndNormal(), SineWall::getDistanceAndNormal(), BaseWall::getDistanceNormalOverlap(), MeshTriangle::getDistanceNormalOverlapType(), SphericalIndenter::getIndenterHeight(), SuperQuadricParticle::getInteractionRadius(), getInteractionWith(), SuperQuadricParticle::getInteractionWith(), ArcWall::getInteractionWith(), BaseWall::getInteractionWith(), Combtooth::getInteractionWith(), MeshTriangle::getInteractionWith(), SineWall::getInteractionWith(), TriangulatedWall::getInteractionWith(), VChute::getInteractionWith(), getMaxInteractionRadius(), MarbleRun::getParticleMass(), ParticleParticleCollision::getRelativeVelocity(), WallParticleCollision::getRelativeVelocity(), getSumOfInteractionRadii(), getSurfaceArea(), getWallInteractionRadius(), InitialConditions< SpeciesType >::InitialConditions(), HorizontalMixer::introduceParticlesAtWall(), ContactDetectionIntersectionOfWallsTest::introduceParticlesAtWall(), SuperQuadricParticle::isInContactWith(), LawinenBox::LawinenBox(), load(), main(), SphericalIndenter::outputXBallsData(), ChuteWithPeriodicInflow::outputXBallsDataParticlee(), BaseCluster::particleInsertionSuccessful(), ChuteInsertionBoundary::placeParticle(), HopperInsertionBoundary::placeParticle(), SinterPair::printTime(), FileReader::read(), save(), Slide::set_Walls(), CGFields::StandardFields::setFields(), BaseInteraction::setFStatData(), SphericalIndenter::setIndenterHeight(), ClosedCSCWalls::setupInitialConditions(), CSCInit::setupInitialConditions(), CSCWalls::setupInitialConditions(), MembraneDemo::setupInitialConditions(), statistics_while_running< T >::setupInitialConditions(), SmoothChute::setupInitialConditions(), VerticalMixer::setupInitialConditions(), ForceLawsMPI2Test::setupInitialConditions(), LiquidMigrationMPI2Test::setupInitialConditions(), FreeCooling2DinWalls::setupInitialConditions(), HourGlass2D::setupInitialConditions(), HourGlass::setupInitialConditions(), MarbleRun::setupInitialConditions(), StressStrainControl::setupInitialConditions(), NewtonsCradleSelfTest::setupInitialConditions(), ParticleCreation::setupInitialConditions(), ParticleParticleCollision::setupInitialConditions(), WallParticleCollision::setupInitialConditions(), DPM::setupInitialConditions(), UnionOfWalls::setupInitialConditions(), DrumRot::setupInitialConditions(), ScalingTestInitialConditionsRelax::setupInitialConditions(), MercuryProblem::setupInitialConditions(), Tutorial11::setupInitialConditions(), Tutorial9::setupInitialConditions(), Packing::setupInitialConditions(), FreeFall::setupInitialConditions(), MD_demo::setupInitialConditions(), InclinedPlane::setupInitialConditions(), MovingWallTangential::setupInitialConditions(), ChuteBottom::setupInitialConditions(), Slide::Slide(), SuperQuadricParticle::SuperQuadricParticle(), SingleParticle< SpeciesType >::writeEneTimeStep(), and DPMBase::writeFstatHeader().

◆ getRotationalEnergy()

Mdouble BaseParticle::getRotationalEnergy ( ) const

Calculates the particle's rotational kinetic energy.

Returns
the particle's rotational kinetic energy
453 {
454  if (isFixed())
455  return 0.0;
456  else
458 }

References Vec3D::dot(), BaseInteractable::getAngularVelocity(), getInertia(), and isFixed().

◆ getSumOfInteractionRadii()

Mdouble BaseParticle::getSumOfInteractionRadii ( const BaseParticle particle) const
inline

returns the sum of the radii plus the interactionDistance

379  {
380  return getRadius() + particle->getRadius() + getInteractionDistance((const BaseInteractable*)particle);
381  }

References getInteractionDistance(), and getRadius().

Referenced by DPMBase::checkParticleForInteractionLocal(), Domain::findNewMPIInteractions(), SuperQuadricParticle::getInitialGuessForContact(), getInteractionWith(), and isInContactWith().

◆ getSurfaceArea()

Mdouble BaseParticle::getSurfaceArea ( ) const
inline

◆ getTypeVTK()

std::string BaseParticle::getTypeVTK ( unsigned  i) const
virtual

Reimplemented in LiquidFilmParticle, and HeatFluidCoupledParticle.

828 {
829  return "";
830 }

Referenced by ParticleVtkWriter::writeExtraFields().

◆ getVolume()

Mdouble BaseParticle::getVolume ( ) const
virtual

Get Particle volume function, which required a reference to the Species vector. It returns the volume of the Particle.

Returns the volume of the BaseParticle, which is calculated using its number of dimensions and radius.

Returns
The actual volume of this BaseParticle.

Reimplemented in SuperQuadricParticle.

142 {
143  if (handler_ == nullptr)
144  {
145  logger(ERROR, "[BaseParticle::getVolume] no particle handler specified");
146  return 0;
147  }
148  switch (getParticleDimensions())
149  {
150  case 3:
151  return (4.0 / 3.0 * constants::pi * radius_ * radius_ * radius_);
152  case 2:
153  return (constants::pi * radius_ * radius_);
154  case 1:
155  return (2.0 * radius_);
156  default:
157  logger(ERROR, "[BaseParticle::getVolume] dimension of the particle is not set");
158  return 0;
159  }
160 }

References ERROR, getParticleDimensions(), handler_, logger, constants::pi, and radius_.

Referenced by ThermalParticle::actionsAfterTimeStep(), DeletionBoundary::checkBoundaryAfterParticleMoved(), FluxBoundary::checkBoundaryAfterParticleMoved(), DPM::computeLocalVolumeFractionHGrid(), InitialConditions< SpeciesType >::InitialConditions(), LinearViscoelasticNormalSpecies::setCollisionTimeAndRestitutionCoefficient(), CGFields::StandardFields::setFields(), FreeCooling2DinWalls::setupInitialConditions(), and LeesEdwardsSelfTest::setupInitialConditions().

◆ getWallInteractionRadius()

◆ integrateAfterForceComputation()

void BaseParticle::integrateAfterForceComputation ( double  time,
double  timeStep 
)

Second step of Velocity Verlet integration.

Second step of Velocity Verlet integration (see also http://en.wikipedia.org/wiki/Verlet_integration#Velocity_Verlet).

Parameters
[in]timecurrent time
[in]timeStepcurrent time step
749 {
750  if (getInvMass() == 0.0)
751  {
752  //Updates a baseParticle with a prescribed motion
754  }
755  else
756  {
757  accelerate(getForce() * getInvMass() * 0.5 * timeStep);
758  if (getHandler()->getDPMBase()->getRotation())
759  {
761  getOrientation().rotateInverseInertiaTensor(getInvInertia()) * getTorque() * 0.5 * timeStep);
762  }
763  }
764 }

References accelerate(), angularAccelerate(), BaseInteractable::getForce(), getHandler(), getInvInertia(), getInvMass(), BaseInteractable::getOrientation(), BaseInteractable::getTorque(), and BaseInteractable::integrateAfterForceComputation().

Referenced by DPMBase::integrateAfterForceComputation().

◆ integrateBeforeForceComputation()

void BaseParticle::integrateBeforeForceComputation ( double  time,
double  timeStep 
)

First step of Velocity Verlet integration.

First step of Velocity Verlet integration (see also http://en.wikipedia.org/wiki/Verlet_integration#Velocity_Verlet).

Parameters
[in]timecurrent time
[in]timeStepcurrent time step
Todo:
If the position is described by the user, one should also call BaseInteractable::integrateBeforeForceComputation. To check if it works correctly, remove the p0.fixParticle() line from the DrivenParticleUnitTest
Author
irana
709 {
714  if (getInvMass() == 0.0)
715  {
717  }
718  else
719  {
720 #ifdef MERCURY_USE_MPI
721  //For periodic particles in parallel the previous position is required
723 #endif
724  accelerate(getForce() * getInvMass() * 0.5 * timeStep);
725  const Vec3D displacement = getVelocity() * timeStep;
726  move(displacement);
727  DPMBase* const dpm = getHandler()->getDPMBase();
728  if (!dpm->getHGridUpdateEachTimeStep())
729  {
730  dpm->hGridUpdateMove(this, displacement.getLengthSquared());
731  }
732  if (dpm->getRotation())
733  {
735  getOrientation().rotateInverseInertiaTensor(getInvInertia()) * getTorque() * 0.5 * timeStep);
736  //apply to rotation quaternion q: q = normalise(q + \tilde{C}\omega*timeStep) (see Wouter's notes)
737  rotate(getAngularVelocity() * timeStep);
738  }
739  }
740 }

References accelerate(), angularAccelerate(), BaseInteractable::getAngularVelocity(), BaseHandler< T >::getDPMBase(), BaseInteractable::getForce(), getHandler(), DPMBase::getHGridUpdateEachTimeStep(), getInvInertia(), getInvMass(), Vec3D::getLengthSquared(), BaseInteractable::getOrientation(), BaseInteractable::getPosition(), DPMBase::getRotation(), BaseInteractable::getTorque(), BaseInteractable::getVelocity(), DPMBase::hGridUpdateMove(), BaseInteractable::integrateBeforeForceComputation(), BaseInteractable::move(), BaseInteractable::rotate(), and setPreviousPosition().

Referenced by DPMBase::integrateBeforeForceComputation().

◆ isFixed()

bool BaseParticle::isFixed ( ) const
inlineoverridevirtual

Is fixed Particle function. It returns whether a Particle is fixed or not, by checking its inverse Mass.

Checks whether a BaseParticle is fixed or not, by checking its inverse Mass.

Returns
TRUE if particle is fixed, i.e. if the inverse mass (invMass_) is 0.

Implements BaseInteractable.

94  { return (invMass_ == 0.0); }

References invMass_.

Referenced by LawinenBox::actionsBeforeTimeStep(), ChuteWithPeriodicInflow::AddContinuingBottom(), HeaterBoundary::checkBoundaryAfterParticleMoved(), ChuteWithContraction::ChuteWithContraction(), ChuteWithPeriodicInflowAndContinuingBottom::ChuteWithPeriodicInflowAndContinuingBottom(), ChuteWithPeriodicInflowAndContraction::ChuteWithPeriodicInflowAndContraction(), ChuteWithPeriodicInflowAndVariableBottom::ChuteWithPeriodicInflowAndVariableBottom(), DPMBase::computeExternalForces(), SphericalIndenter::computeExternalForces(), AngledPeriodicBoundarySecondUnitTest::computeExternalForces(), DPMBase::computeInternalForce(), ChuteWithPeriodicInflow::computeInternalForces(), computeMass(), SuperQuadricParticle::computeMass(), Mercury3D::computeWallForces(), ContractionWithPeriodicInflow::ContractionWithPeriodicInflow(), MPISphericalParticle::copyDataFromParticleToMPIParticle(), AngleOfRepose::createBaseSpecies(), SilbertPeriodic::createBaseSpecies(), getKineticEnergy(), ParticleHandler::getNumberOfFixedObjectsLocal(), getRotationalEnergy(), ChuteWithPeriodicInflow::printTime(), LawinenBox::printTime(), DPMBase::readNextDataFile(), CSCWalls::saveWalls(), setMass(), setMassForP3Statistics(), SilbertPeriodic::setupInitialConditions(), FlowFrontChute::stretch(), and ~BaseParticle().

◆ isInContactWith()

bool BaseParticle::isInContactWith ( const BaseParticle P) const
virtual

Get whether or not this particle is in contact with the given particle.

Reimplemented in SuperQuadricParticle.

852 {
853  if (P->getName() != "Superquadric")
854  {
857  }
858  return P->isInContactWith(this);
859 }

References Vec3D::getDistanceSquared(), getName(), BaseInteractable::getPosition(), getSumOfInteractionRadii(), isInContactWith(), and mathsFunc::square().

Referenced by DPMBase::areInContact(), and isInContactWith().

◆ isInMPIDomain()

bool BaseParticle::isInMPIDomain ( )

Indicates if the particle is in the communication zone of the mpi domain.

271 {
272  return isInMPIDomain_;
273 }

References isInMPIDomain_.

Referenced by DeletionBoundary::checkBoundaryAfterParticleMoved(), Domain::findNewMPIInteractions(), Domain::findNewMPIParticle(), and PeriodicBoundaryHandler::updateParticleStatus().

◆ isInPeriodicDomain()

bool BaseParticle::isInPeriodicDomain ( ) const

Indicates if the particle is in the periodic boundary communication zone.

282 {
283  return isInPeriodicDomain_;
284 }

References isInPeriodicDomain_.

Referenced by PeriodicBoundaryHandler::checkIfAddNewParticle().

◆ isMaserParticle()

◆ isMPIParticle()

bool BaseParticle::isMPIParticle ( ) const

Indicates if this particle is a ghost in the MPI domain.

176 {
177  //make mpi-dependent so the compiler can optimise
178 #ifdef MERCURY_USE_MPI
179  return isMPIParticle_;
180 #else
181  return false;
182 #endif
183 }

References isMPIParticle_.

Referenced by ParticleHandler::addObject(), InteractionHandler::getLiquidBridgeVolume(), DPMBase::integrateAfterForceComputation(), DPMBase::integrateBeforeForceComputation(), DPMBase::mpiInsertParticleCheck(), DPMBase::outputXBallsData(), ParticleVtkWriter::particleMustBeWritten(), Membrane::saveVertexPositions(), and PeriodicBoundaryHandler::updateParticleStatus().

◆ isPeriodicGhostParticle()

◆ isSphericalParticle()

◆ movePrevious()

void BaseParticle::movePrevious ( const Vec3D posMove)

Adds a vector to the particle's previousPosition_.

Lets you add a vector to the particle's previousPosition_ vector.

Parameters
[in]posMovethe vector to be added to the current previousPosition_ vector.
613 {
614  previousPosition_ += posMove;
615 }

References previousPosition_.

◆ oldRead()

void BaseParticle::oldRead ( std::istream &  is)
virtual

Should NOT BE USED by any user, only used to read old restart files! Is expected to be obsolete by Mercury 2.0. Please use BaseParticle::read() instead.

This is the previously used version of the read function. Now just kept for legacy purposes.

Deprecated:
Should be gone in Mercury 2.0. Use BaseParticle::read() instead.
Todo:
incorporate contact information
381 {
382  logger(DEBUG, "reading particle old-style");
383  static unsigned int id = 0;
384  unsigned int indSpecies = 0;
385  unsigned int numberOfContacts = 0;
386  Vec3D orientation;
387  Vec3D position;
388  Vec3D velocity;
389  Vec3D angularVelocity;
390  double invInertiaScalar;
391  double dummy = 0;
392  is >> position >> velocity >> radius_ >> orientation >> angularVelocity;
393  is >> invMass_ >> invInertiaScalar >> numberOfContacts;
395  for (unsigned int i = 0; i < 12 * numberOfContacts; ++i)
396  {
397  is >> dummy;
398  }
399  is >> indSpecies;
400  setPosition(position);
401  setVelocity(velocity);
402  Quaternion q;
403  q.setEuler(orientation);
404  setOrientation(q);
405  setAngularVelocity(angularVelocity);
406  invInertia_.XX = invInertiaScalar;
407  invInertia_.YY = invInertiaScalar;
408  invInertia_.ZZ = invInertiaScalar;
410  setId(id);
411  setIndex(id);
412  id++;
413 }

References FATAL, constants::i, invInertia_, invMass_, logger, radius_, BaseInteractable::setAngularVelocity(), Quaternion::setEuler(), BaseObject::setId(), BaseObject::setIndex(), BaseInteractable::setIndSpecies(), BaseInteractable::setOrientation(), BaseInteractable::setPosition(), BaseInteractable::setVelocity(), MatrixSymmetric3D::XX, MatrixSymmetric3D::YY, and MatrixSymmetric3D::ZZ.

◆ printHGrid()

void BaseParticle::printHGrid ( std::ostream &  os) const

Adds particle's HGrid level and cell coordinates to an ostream.

Adds the particle's HGridLevel_ and HGRid x/y/z positions to an std::ostream.

Parameters
[in,out]osthe ostream which has the mentioned properties added.
421 {
422  os << "Particle( HGRID_Level:" << hGridCell.getHGridLevel()
423  << ", HGRID_x:" << hGridCell.getHGridX()
424  << ", HGRID_y:" << hGridCell.getHGridY()
425  << ", HGRID_z:" << hGridCell.getHGridZ()
426  << ")";
427 }

References HGridCell::getHGridLevel(), HGridCell::getHGridX(), HGridCell::getHGridY(), HGridCell::getHGridZ(), and hGridCell.

◆ read()

void BaseParticle::read ( std::istream &  is)
overridevirtual

Particle read function, which accepts an std::istream as input.

Particle read function. Has an std::istream as argument, from which it extracts the radius_, invMass_ and invInertia_, respectively. From these the mass and inertia are deduced. An additional set of properties is read through the call to the parent's method BaseInteractable::read().

Parameters
[in,out]isinput stream with particle properties.

Reimplemented from BaseInteractable.

Reimplemented in ThermalParticle, SuperQuadricParticle, LiquidFilmParticle, and HeatFluidCoupledParticle.

369 {
371  std::string dummy;
372  is >> dummy >> radius_ >> dummy >> invMass_;// >> dummy >> invInertia_;
373 }

References invMass_, radius_, and BaseInteractable::read().

Referenced by LiquidFilmParticle::read(), SuperQuadricParticle::read(), ThermalParticle::read(), and ParticleHandler::readAndCreateObject().

◆ setAxes()

virtual void BaseParticle::setAxes ( const Vec3D axes)
inlinevirtual

Only ustilised in case of superquadric particles.

Reimplemented in SuperQuadricParticle.

527 { }

Referenced by MPISuperQuadric::copyDataFromMPIParticleToParticle().

◆ setCommunicationComplexity()

void BaseParticle::setCommunicationComplexity ( unsigned  complexity)

Set the communication complexity of the particle.

191 {
192  communicationComplexity_ = complexity;
193 }

References communicationComplexity_.

Referenced by Domain::addParticlesToLists(), MPISphericalParticle::copyDataFromMPIParticleToParticle(), and Domain::updateParticles().

◆ setDisplacement()

void BaseParticle::setDisplacement ( const Vec3D disp)

Sets the particle's displacement (= difference between current position and that of the previous time step)

This is used to set the particle displacement_

Parameters
[in]dispthe displacement vector
594 {
595  displacement_ = disp;
596 }

References displacement_.

Referenced by CircularPeriodicBoundary::checkBoundaryAfterParticleMoved().

◆ setExponents()

virtual void BaseParticle::setExponents ( const Mdouble eps1,
const Mdouble eps2 
)
inlinevirtual

Only ustilised in case of superquadric particles.

Reimplemented in SuperQuadricParticle.

532 {}

Referenced by MPISuperQuadric::copyDataFromMPIParticleToParticle().

◆ setHandler()

void BaseParticle::setHandler ( ParticleHandler handler)

Sets the pointer to the particle's ParticleHandler.

Assigns the particle to a ParticleHandler, and assigns a species to it based on the particles indSpecies_ (BaseInteractable data member).

Parameters
[in]handlerpointer to the ParticleHandler
652 {
653  handler_ = handler;
654  setSpecies(getHandler()->getDPMBase()->speciesHandler.getObject(getIndSpecies()));
655 }

References getHandler(), BaseInteractable::getIndSpecies(), BaseHandler< T >::getObject(), handler_, and setSpecies().

Referenced by ParticleHandler::addExistingObject(), ParticleHandler::addGhostObject(), ParticleHandler::addObject(), copyDataFromMPIParticleToParticle(), Chute::createBottom(), ParticleHandler::readAndCreateObject(), setSpecies(), SphericalIndenter::setupInitialConditions(), and ChuteBottom::setupInitialConditions().

◆ setHGridLevel()

void BaseParticle::setHGridLevel ( const unsigned int  level)
inline

Sets the particle's HGrid level.

Parameters
[in]levelthe particle's HGrid level
473  { hGridCell.setHGridLevel(level); }

References hGridCell, and HGridCell::setHGridLevel().

Referenced by MPISphericalParticle::copyDataFromMPIParticleToParticle(), and HGrid::insertParticleToHgrid().

◆ setHGridNextObject()

void BaseParticle::setHGridNextObject ( BaseParticle p)
inline

Sets the pointer to the next object in the particle's HGrid cell & level.

Parameters
[in]ppointer to the next object
481  { hGridNextObject_ = p; }

References hGridNextObject_.

Referenced by MPISphericalParticle::copyDataFromMPIParticleToParticle(), Mercury2D::hGridRemoveParticle(), Mercury3D::hGridRemoveParticle(), Mercury2D::hGridUpdateParticle(), and Mercury3D::hGridUpdateParticle().

◆ setHGridPrevObject()

void BaseParticle::setHGridPrevObject ( BaseParticle p)
inline

Sets the pointer to the previous object in the particle's HGrid cell & level.

Parameters
[in]ppointer to the previous object
489  { hGridPrevObject_ = p; }

References hGridPrevObject_.

Referenced by MPISphericalParticle::copyDataFromMPIParticleToParticle(), Mercury2D::hGridRemoveParticle(), Mercury3D::hGridRemoveParticle(), Mercury2D::hGridUpdateParticle(), and Mercury3D::hGridUpdateParticle().

◆ setHGridX()

void BaseParticle::setHGridX ( const int  x)
inline

Sets the particle's HGrid cell X-coordinate.

Set the x-index of the particle's hGrid cell position

Parameters
[in]xx-index of particle's HGrid cell
450  { hGridCell.setHGridX(x); }

References hGridCell, and HGridCell::setHGridX().

Referenced by MPISphericalParticle::copyDataFromMPIParticleToParticle(), Mercury2D::hGridUpdateParticle(), and Mercury3D::hGridUpdateParticle().

◆ setHGridY()

void BaseParticle::setHGridY ( const int  y)
inline

Sets the particle's HGrid cell Y-coordinate.

Set the y-index of the particle's hGrid cell position

Parameters
[in]yy-index of particle's HGrid cell
458  { hGridCell.setHGridY(y); }

References hGridCell, and HGridCell::setHGridY().

Referenced by MPISphericalParticle::copyDataFromMPIParticleToParticle(), Mercury2D::hGridUpdateParticle(), and Mercury3D::hGridUpdateParticle().

◆ setHGridZ()

void BaseParticle::setHGridZ ( const int  z)
inline

Sets the particle's HGrid cell Z-coordinate.

Set the y-index of the particle's hGrid cell position

Parameters
[in]zz-index of particle's HGrid cell
466  { hGridCell.setHGridZ(z); }

References hGridCell, and HGridCell::setHGridZ().

Referenced by MPISphericalParticle::copyDataFromMPIParticleToParticle(), and Mercury3D::hGridUpdateParticle().

◆ setIndSpecies()

void BaseParticle::setIndSpecies ( unsigned int  indSpecies)
overridevirtual
Deprecated:
Please use setSpecies(const ParticleSpecies*) instead.
Todo:
MX: this index is used in the MPI transmission. This should be "undeprecated"

Set the particle's species and species' index. Logs a warning if no ParticleHandler is assigned.

Parameters
[in]indSpeciesThe index of the species in the SpeciesHandler.
Todo:
TW do we have to update the species stored in the interactions here?

Reimplemented from BaseInteractable.

781 {
782  if (handler_ != nullptr)
783  {
784  //BaseInteractable::setIndSpecies(indSpecies);
787  }
788  else
789  {
791  logger(ERROR, "setIndSpecies called on a particle with no particle handler.\n"
792  "Therefore I can't request the given species from the species handler.\n"
793  " PartID = %", getId());
794  }
795 }

References ERROR, BaseHandler< T >::getDPMBase(), BaseObject::getId(), BaseHandler< T >::getObject(), handler_, logger, BaseInteractable::setIndSpecies(), setSpecies(), and DPMBase::speciesHandler.

◆ setInertia() [1/2]

void BaseParticle::setInertia ( )
virtual

◆ setInertia() [2/2]

void BaseParticle::setInertia ( MatrixSymmetric3D  inertia)

Sets the particle's inertia_ (and adjusts invInertia_ accordingly)

Sets the particle's inertia and invInertia_.

Parameters
[in]newInertiathe new inertia to be set.
507 {
509 }

References MatrixSymmetric3D::inverse(), and invInertia_.

◆ setInfiniteInertia()

void BaseParticle::setInfiniteInertia ( )

Sets the particle's inertia_ to 'infinite' (1e20) and its invInertia_ to 0.

Sets the inertia to 1e20 and the invInertia_ (which is actually used in the calculations) to 0.

521 {
523 } //> i.e. no rotations

References invInertia_, and MatrixSymmetric3D::setZero().

Referenced by Slide::actionsBeforeTimeLoop().

◆ setInfo()

void BaseParticle::setInfo ( Mdouble  info)
virtual

Sets some user-defined information about this object (by default, species ID).

348 {
349  info_ = info;
350 }

References info_.

◆ setInMPIDomain()

void BaseParticle::setInMPIDomain ( bool  flag)

Flags the status of the particle if wether it is in the communication zone or not.

276 {
277  isInMPIDomain_ = flag;
278 }

References isInMPIDomain_.

Referenced by Domain::processReceivedBoundaryParticleData(), PeriodicBoundaryHandler::setMPIFlags(), Domain::updateParticles(), and PeriodicBoundaryHandler::updateParticleStatus().

◆ setInPeriodicDomain()

void BaseParticle::setInPeriodicDomain ( bool  flag)

◆ setInverseInertia()

void BaseParticle::setInverseInertia ( MatrixSymmetric3D  inverseInertia)

Sets the particle's inertia_ (and adjusts invInertia_ accordingly)

512 {
513  invInertia_ = inverseInertia;
514 }

References invInertia_.

◆ setMaserParticle()

void BaseParticle::setMaserParticle ( bool  flag)

Flags the status of the particle if it belongs to the maser boundary or not.

307 {
308  isMaserParticle_ = flag;
309 }

References isMaserParticle_.

Referenced by SubcriticalMaserBoundaryTEST::checkBoundaryAfterParticleMoved(), MPISphericalParticle::copyDataFromMPIParticleToParticle(), and PeriodicBoundaryHandler::updateMaserParticle().

◆ setMass()

void BaseParticle::setMass ( Mdouble  mass)

Sets the particle's mass.

Deprecated:
Please do not set the mass yourself, but use ParticleSpecies->computeMass instead. That makes sure

Sets the mass of the particle

Parameters
[in]massthe new particle's mass
557 {
558  logger(WARN, "WARNING: Do not use particle->setMass, instead use "
559  "particleSpecies->computeMass, since this function can cause "
560  "inconsistencies between the mass, density and radius of this particle!");
561  logger.assert_always(mass > 0.0 && !isFixed(),
562  "Error in BaseParticle::setMass, the given mass to be set must be positive.");
563 
564  invMass_ = 1.0 / mass;
565 }

References invMass_, isFixed(), logger, and WARN.

◆ setMassForP3Statistics()

void BaseParticle::setMassForP3Statistics ( Mdouble  mass)

Sets the particle's mass This function should not be used, but is necessary to extend the CG toolbox to non-spherical particles.

Sets the mass of the particle

Parameters
[in]massthe new particle's mass
578 {
579  if (mass > 0.0 && !isFixed())
580  {
581  invMass_ = 1.0 / mass;
582  }
583  else
584  {
585  logger(ERROR, "Error in BaseParticle::setMass, the given mass to be set must be positive.");
586  }
587 }

References ERROR, invMass_, isFixed(), and logger.

◆ setMPIParticle()

void BaseParticle::setMPIParticle ( bool  flag)

◆ setPeriodicComplexity() [1/2]

void BaseParticle::setPeriodicComplexity ( int  index,
int  value 
)

Set the periodic communication complexity of the particle.

207 {
208  //hack: generally you'd add particles after declaring the boundaries
209  //but no official programming guildelines rules have been setup for that
210  //So incase that doesnt happen we need to resize this periodicComplexity
211  if (periodicComplexity_.empty())
212  {
213  int numberOfPeriodicBoundaries = getHandler()->getDPMBase()->periodicBoundaryHandler.getSize();
214  if (numberOfPeriodicBoundaries > 0)
215  {
216  //First initialisation of the periodic complexity assumes the particle is completely
217  //within the real domain
218  periodicComplexity_ = std::vector<int>(numberOfPeriodicBoundaries, 2);
219  }
220  }
221 
222  periodicComplexity_[index] = value;
223 }

References BaseHandler< T >::getDPMBase(), getHandler(), BaseHandler< T >::getSize(), DPMBase::periodicBoundaryHandler, and periodicComplexity_.

◆ setPeriodicComplexity() [2/2]

◆ setPeriodicFromParticle()

◆ setPeriodicGhostParticle()

void BaseParticle::setPeriodicGhostParticle ( bool  flag)

◆ setPreviousPeriodicComplexity()

void BaseParticle::setPreviousPeriodicComplexity ( std::vector< int complexity)

Set the previous periodic communication complexity of the paritcle.

261 {
262  previousPeriodicComplexity_ = complexity;
263 }

References previousPeriodicComplexity_.

Referenced by PeriodicBoundaryHandler::updateParticles().

◆ setPreviousPosition()

void BaseParticle::setPreviousPosition ( const Vec3D pos)

Sets the particle's position in the previous time step.

This is used to set the particle's previous position

Parameters
[in]posthe particle's previous position vector.
603 {
604  previousPosition_ = pos;
605 }

References previousPosition_.

Referenced by integrateBeforeForceComputation(), Domain::processReceivedBoundaryParticleData(), and PeriodicBoundaryHandler::updateParticles().

◆ setRadius()

void BaseParticle::setRadius ( Mdouble  radius)
virtual

Sets the particle's radius_ (and adjusts the mass_ accordingly, based on the particle's species)

Sets the radius of the particle, and from that computes the new mass (using its species) and checks whether it now is either the smallest or biggest particle in its ParticleHandler.

Parameters
[in]radiusthe new radius

Reimplemented in SuperQuadricParticle.

543 {
544  radius_ = radius;
545  if (getHandler())
546  {
547  getSpecies()->computeMass(this);
548  getHandler()->checkExtrema(this);
549  }
550 }

References ParticleHandler::checkExtrema(), ParticleSpecies::computeMass(), getHandler(), BaseInteractable::getSpecies(), and radius_.

Referenced by SmoothChute::actionsBeforeTimeStep(), Chutebelt::actionsOnRestart(), NautaMixer::addParticles(), NautaMixer::addParticlesAtWall(), BaseWall::addParticlesAtWall(), DropletBoundary::checkBoundaryAfterParticlesMove(), BaseCluster::computeInternalStructure(), MPISphericalParticle::copyDataFromMPIParticleToParticle(), Funnel::create_funnel(), LawinenBox::create_inflow_particle(), ChutePeriodic::create_inflow_particle(), ChuteWithContraction::create_inflow_particle(), Funnel::create_inflow_particle(), AngleOfRepose::create_inflow_particle(), FlowRule::create_inflow_particle(), SilbertPeriodic::create_inflow_particle(), SegregationWithHopper::create_inflow_particle(), Slide::create_rough_wall(), Chute::createBottom(), CurvyChute::createBottom(), Chute::createFlowParticle(), ChuteWithWedge::createFlowParticle(), DPM::DPM(), FluxAndPeriodicBoundarySelfTest::FluxAndPeriodicBoundarySelfTest(), InsertionBoundary::generateParticle(), FixedClusterInsertionBoundary::generateParticle(), BasicIntersectionOfWalls::getDistanceAndNormal(), BasicUnionOfWalls::getDistanceAndNormal(), BasicIntersectionOfWalls::getVTK(), BasicUnionOfWalls::getVTK(), InitialConditions< SpeciesType >::InitialConditions(), HorizontalMixer::introduceParticlesAtWall(), ContactDetectionIntersectionOfWallsTest::introduceParticlesAtWall(), HorizontalMixer::introduceParticlesInDomain(), HorizontalMixer::introduceSingleParticle(), load(), helpers::loadingTest(), main(), MercuryCGSelfTest::MercuryCGSelfTest(), helpers::normalAndTangentialLoadingTest(), helpers::objectivenessTest(), ParticleInclusion::ParticleInclusion(), BaseCluster::particleInsertionSuccessful(), FileReader::read(), DPMBase::readNextDataFile(), regimeForceUnitTest::regimeForceUnitTest(), SuperQuadricParticle::setBoundingRadius(), MarbleRun::setParticleRadius(), ClosedCSCWalls::setupInitialConditions(), CSCInit::setupInitialConditions(), CSCWalls::setupInitialConditions(), MembraneDemo::setupInitialConditions(), my_problem::setupInitialConditions(), ShiftingConstantMassFlowMaserBoundarySelfTest::setupInitialConditions(), ShiftingMaserBoundarySelfTest::setupInitialConditions(), Cstatic2d::setupInitialConditions(), Cstatic3D::setupInitialConditions(), ExtremeOverlapUnitTest::setupInitialConditions(), MercuryLogo::setupInitialConditions(), SmoothChute::setupInitialConditions(), RandomClusterInsertionBoundarySelfTest::setupInitialConditions(), NozzleDemo::setupInitialConditions(), VerticalMixer::setupInitialConditions(), Binary::setupInitialConditions(), Chain::setupInitialConditions(), ForceLawsMPI2Test::setupInitialConditions(), InsertionBoundaryMPI2Test::setupInitialConditions(), LiquidMigrationMPI2Test::setupInitialConditions(), MaserRepeatedOutInMPI2Test::setupInitialConditions(), PeriodicBounaryEnteringMPIDomainTest::setupInitialConditions(), SubcriticalMaserBoundaryTESTMPI2Test::setupInitialConditions(), TwoByTwoMPIDomainMPI4Test::setupInitialConditions(), FreeCooling2DinWalls::setupInitialConditions(), FreeCooling2DinWallsDemo::setupInitialConditions(), FreeCooling3DDemoProblem::setupInitialConditions(), FreeCooling3DinWallsDemo::setupInitialConditions(), FreeCoolingDemoProblem::setupInitialConditions(), HeaterBoundaryTest::setupInitialConditions(), HourGlass2D::setupInitialConditions(), HourGlass::setupInitialConditions(), MinimalExampleDrum::setupInitialConditions(), ParameterStudy1DDemo::setupInitialConditions(), ParameterStudy2DDemo::setupInitialConditions(), ParameterStudy3DDemo::setupInitialConditions(), FiveParticles::setupInitialConditions(), GetDistanceAndNormalForIntersectionOfWalls::setupInitialConditions(), GetDistanceAndNormalForScrew::setupInitialConditions(), GetDistanceAndNormalForTriangleWall::setupInitialConditions(), Drum::setupInitialConditions(), HertzSelfTest::setupInitialConditions(), MindlinSelfTest::setupInitialConditions(), Penetration::setupInitialConditions(), Silo::setupInitialConditions(), ConstantMassFlowMaserBoundaryMixedSpeciesSelfTest::setupInitialConditions(), ConstantMassFlowMaserSelfTest::setupInitialConditions(), CubeDeletionBoundarySelfTest::setupInitialConditions(), DeletionBoundarySelfTest::setupInitialConditions(), LeesEdwardsSelfTest::setupInitialConditions(), NozzleSelfTest::setupInitialConditions(), CGBasicSelfTest::setupInitialConditions(), CGHandlerSelfTest::setupInitialConditions(), CGStaticBalanceSelfTest::setupInitialConditions(), NewtonsCradleSelftest::setupInitialConditions(), NewtonsCradleSelfTest::setupInitialConditions(), DPM::setupInitialConditions(), ParticleCreation::setupInitialConditions(), ChargedBondedInteractionSelfTest::setupInitialConditions(), ParticleParticleCollision::setupInitialConditions(), WallParticleCollision::setupInitialConditions(), my_problem_HGRID::setupInitialConditions(), FreeFallInteractionSelfTest::setupInitialConditions(), FreeFallSelfTest::setupInitialConditions(), LiquidMigrationSelfTest::setupInitialConditions(), ObliqueImpactSelfTest::setupInitialConditions(), TwoBondedParticleElasticCollision::setupInitialConditions(), CoilSelfTest::setupInitialConditions(), GetDistanceAndNormalForTriangleWalls::setupInitialConditions(), RollingOverTriangleWalls::setupInitialConditions(), TriangulatedScrewSelfTest::setupInitialConditions(), TriangulatedStepSelfTest::setupInitialConditions(), TriangulatedStepWallSelfTest::setupInitialConditions(), TriangulatedWallSelfTest::setupInitialConditions(), UnionOfWalls::setupInitialConditions(), DrumRot::setupInitialConditions(), RotatingDrum::setupInitialConditions(), SphericalIndenter::setupInitialConditions(), ScalingTestInitialConditionsRelax::setupInitialConditions(), Contact::setupInitialConditions(), Wall::setupInitialConditions(), BouncingSuperQuadric::setupInitialConditions(), SlidingSpheresUnitTest::setupInitialConditions(), MercuryProblem::setupInitialConditions(), Tutorial1::setupInitialConditions(), Tutorial11::setupInitialConditions(), Tutorial12::setupInitialConditions(), Tutorial2::setupInitialConditions(), Tutorial3::setupInitialConditions(), Tutorial4::setupInitialConditions(), Tutorial5::setupInitialConditions(), Tutorial6::setupInitialConditions(), Tutorial7::setupInitialConditions(), Tutorial8::setupInitialConditions(), Tutorial9::setupInitialConditions(), ParticleParticleInteraction::setupInitialConditions(), ParticleParticleInteractionWithPlasticForces::setupInitialConditions(), ParticleWallInteraction::setupInitialConditions(), AngledPeriodicBoundarySecondUnitTest::setupInitialConditions(), AngledPeriodicBoundaryUnitTest::setupInitialConditions(), Packing::setupInitialConditions(), CreateDataAndFStatFiles::setupInitialConditions(), ChargedBondedParticleUnitTest::setupInitialConditions(), EnergyUnitTest::setupInitialConditions(), ExtremeOverlapWithWallsUnitTest::setupInitialConditions(), FreeFallHertzMindlinUnitTest::setupInitialConditions(), FreeFall::setupInitialConditions(), HertzianSinterForceUnitTest::setupInitialConditions(), MD_demo::setupInitialConditions(), InclinedPlane::setupInitialConditions(), MpiMaserChuteTest::setupInitialConditions(), MovingIntersectionOfWallsUnitTest_Basic::setupInitialConditions(), MovingWalls::setupInitialConditions(), MovingWall::setupInitialConditions(), MpiPeriodicBoundaryUnitTest::setupInitialConditions(), PeriodicWallsWithSlidingFrictionUnitTest::setupInitialConditions(), PlasticForceUnitTest::setupInitialConditions(), SeparateFilesSelfTest::setupInitialConditions(), SinterForceUnitTest::setupInitialConditions(), SpeciesTest::setupInitialConditions(), TangentialSpringEnergyConservationUnitTest::setupInitialConditions(), TangentialSpringUnitTest::setupInitialConditions(), WallSpecies::setupInitialConditions(), ChuteBottom::setupInitialConditions(), MembraneDemo::setUpMembrane(), Siegen::Siegen(), SingleParticle< SpeciesType >::SingleParticle(), SinterPair::SinterPair(), test1(), test2(), and viscoElasticUnitTest::viscoElasticUnitTest().

◆ setSpecies()

void BaseParticle::setSpecies ( const ParticleSpecies species)

In addition to the functionality of BaseInteractable::setSpecies, this function sets the pointer to the particleHandler, which is needed to retrieve species information.

Todo:
TW: this function should also check if the particle is the correct particle for the species type

Sets the particle's species. If this particle does not have a handler yet, this function also assigns the ParticleHandler in the same DPMBase as the SpeciesHandler of the given species as its handler.

Parameters
[in]speciespointer to the ParticleSpecies object, to be set as the particle's species.
Todo:
TW should we chaeck here if we have the right kind of species for the right kind of particle?
805 {
808  //set pointer to the ParticleHandler handler_, which is needed to retrieve
809  //species information
810  //\todo maybe these if statements should throw warnings
811  if (handler_ == nullptr)
812  {
813  SpeciesHandler* sH = species->getHandler();
814  DPMBase* dB = sH->getDPMBase();
815  if (dB != nullptr)
816  {
818  }
819  }
820 }

References BaseHandler< T >::getDPMBase(), BaseSpecies::getHandler(), handler_, DPMBase::particleHandler, setHandler(), and BaseInteractable::setSpecies().

Referenced by SmoothChute::actionsBeforeTimeStep(), Chutebelt::actionsOnRestart(), ChuteWithPeriodicInflow::AddContinuingBottom(), NautaMixer::addParticles(), NautaMixer::addParticlesAtWall(), BaseWall::addParticlesAtWall(), ConstantMassFlowMaserBoundary::addParticleToMaser(), SubcriticalMaserBoundary::addParticleToMaser(), BaseParticle(), BoundariesSelfTest::BoundariesSelfTest(), ConstantMassFlowMaserBoundary::checkBoundaryAfterParticleMoved(), SubcriticalMaserBoundary::checkBoundaryAfterParticleMoved(), DropletBoundary::checkBoundaryAfterParticlesMove(), ChuteWithPeriodicInflowAndContinuingBottom::ChuteWithPeriodicInflowAndContinuingBottom(), ChuteWithPeriodicInflowAndContraction::ChuteWithPeriodicInflowAndContraction(), ChuteWithPeriodicInflowAndVariableBottom::ChuteWithPeriodicInflowAndVariableBottom(), BaseCluster::computeInternalStructure(), ContractionWithPeriodicInflow::ContractionWithPeriodicInflow(), copyDataFromMPIParticleToParticle(), ChutePeriodic::create_inflow_particle(), FlowRule::create_inflow_particle(), SilbertPeriodic::create_inflow_particle(), AngleOfRepose::createBaseSpecies(), SilbertPeriodic::createBaseSpecies(), Chute::createBottom(), CurvyChute::createBottom(), Chute::createFlowParticle(), ChuteWithWedge::createFlowParticle(), FluxAndPeriodicBoundarySelfTest::FluxAndPeriodicBoundarySelfTest(), FluxBoundarySelfTest::FluxBoundarySelfTest(), BasicIntersectionOfWalls::getDistanceAndNormal(), BasicUnionOfWalls::getDistanceAndNormal(), BasicIntersectionOfWalls::getVTK(), BasicUnionOfWalls::getVTK(), Hertzian2DUnitTest::Hertzian2DUnitTest(), InitialConditions< SpeciesType >::InitialConditions(), ChuteWithPeriodicInflow::integrateBeforeForceComputation(), HorizontalMixer::introduceParticlesAtWall(), ContactDetectionIntersectionOfWallsTest::introduceParticlesAtWall(), HorizontalMixer::introduceParticlesInDomain(), HorizontalMixer::introduceSingleParticle(), LawinenBox::LawinenBox(), helpers::loadingTest(), main(), MercuryCGSelfTest::MercuryCGSelfTest(), MovingWall::MovingWall(), helpers::normalAndTangentialLoadingTest(), helpers::objectivenessTest(), ParticleInclusion::ParticleInclusion(), BaseCluster::particleInsertionSuccessful(), protectiveWall::protectiveWall(), FileReader::read(), InsertionBoundary::read(), ParticleHandler::readAndCreateObject(), DPMBase::readNextDataFile(), regimeForceUnitTest::regimeForceUnitTest(), ConstantMassFlowMaserBoundary::removeParticleFromMaser(), SubcriticalMaserBoundary::removeParticleFromMaser(), setHandler(), setIndSpecies(), ClosedCSCWalls::setupInitialConditions(), CSCInit::setupInitialConditions(), CSCWalls::setupInitialConditions(), MembraneDemo::setupInitialConditions(), my_problem::setupInitialConditions(), LeesEdwardsDemo::setupInitialConditions(), ShiftingConstantMassFlowMaserBoundarySelfTest::setupInitialConditions(), ShiftingMaserBoundarySelfTest::setupInitialConditions(), TimeDependentPeriodicBoundary3DSelfTest::setupInitialConditions(), TimeDependentPeriodicBoundaryTest::setupInitialConditions(), ExtremeOverlapUnitTest::setupInitialConditions(), MercuryLogo::setupInitialConditions(), SmoothChute::setupInitialConditions(), NozzleDemo::setupInitialConditions(), VerticalMixer::setupInitialConditions(), Binary::setupInitialConditions(), ForceLawsMPI2Test::setupInitialConditions(), InsertionBoundaryMPI2Test::setupInitialConditions(), LiquidMigrationMPI2Test::setupInitialConditions(), MaserRepeatedOutInMPI2Test::setupInitialConditions(), PeriodicBounaryEnteringMPIDomainTest::setupInitialConditions(), SubcriticalMaserBoundaryTESTMPI2Test::setupInitialConditions(), TwoByTwoMPIDomainMPI4Test::setupInitialConditions(), CubicCell::setupInitialConditions(), FreeCooling2DinWalls::setupInitialConditions(), FreeCooling2DinWallsDemo::setupInitialConditions(), FreeCooling3DDemoProblem::setupInitialConditions(), FreeCooling3DinWallsDemo::setupInitialConditions(), FreeCoolingDemoProblem::setupInitialConditions(), HeaterBoundaryTest::setupInitialConditions(), HourGlass2D::setupInitialConditions(), HourGlass::setupInitialConditions(), MinimalExampleDrum::setupInitialConditions(), ParameterStudy1DDemo::setupInitialConditions(), ParameterStudy2DDemo::setupInitialConditions(), ParameterStudy3DDemo::setupInitialConditions(), FiveParticles::setupInitialConditions(), SilbertPeriodic::setupInitialConditions(), GetDistanceAndNormalForIntersectionOfWalls::setupInitialConditions(), GetDistanceAndNormalForScrew::setupInitialConditions(), GetDistanceAndNormalForTriangleWall::setupInitialConditions(), Drum::setupInitialConditions(), HertzSelfTest::setupInitialConditions(), MindlinSelfTest::setupInitialConditions(), Penetration::setupInitialConditions(), Silo::setupInitialConditions(), ConstantMassFlowMaserBoundaryMixedSpeciesSelfTest::setupInitialConditions(), ConstantMassFlowMaserSelfTest::setupInitialConditions(), InsertionBoundarySelfTest::setupInitialConditions(), LeesEdwardsSelfTest::setupInitialConditions(), NozzleSelfTest::setupInitialConditions(), SubcriticalMaserBoundarySelfTest::setupInitialConditions(), CGBasicSelfTest::setupInitialConditions(), CGHandlerSelfTest::setupInitialConditions(), CGStaticBalanceSelfTest::setupInitialConditions(), NewtonsCradleSelftest::setupInitialConditions(), NewtonsCradleSelfTest::setupInitialConditions(), SquarePacking::setupInitialConditions(), DPM::setupInitialConditions(), ParticleCreation::setupInitialConditions(), ChargedBondedInteractionSelfTest::setupInitialConditions(), ParticleParticleCollision::setupInitialConditions(), WallParticleCollision::setupInitialConditions(), my_problem_HGRID::setupInitialConditions(), FreeFallInteractionSelfTest::setupInitialConditions(), FreeFallSelfTest::setupInitialConditions(), LiquidMigrationSelfTest::setupInitialConditions(), ObliqueImpactSelfTest::setupInitialConditions(), TwoBondedParticleElasticCollision::setupInitialConditions(), TwoParticleElasticCollisionInteraction::setupInitialConditions(), TwoParticleElasticCollision::setupInitialConditions(), CoilSelfTest::setupInitialConditions(), GetDistanceAndNormalForTriangleWalls::setupInitialConditions(), RollingOverTriangleWalls::setupInitialConditions(), TriangulatedScrewSelfTest::setupInitialConditions(), TriangulatedStepSelfTest::setupInitialConditions(), TriangulatedStepWallSelfTest::setupInitialConditions(), TriangulatedWallSelfTest::setupInitialConditions(), UnionOfWalls::setupInitialConditions(), DrumRot::setupInitialConditions(), RotatingDrum::setupInitialConditions(), SphericalIndenter::setupInitialConditions(), Contact::setupInitialConditions(), Wall::setupInitialConditions(), BouncingSuperQuadric::setupInitialConditions(), EllipsoidsBouncingOnWallDemo::setupInitialConditions(), EllipticalSuperQuadricCollision::setupInitialConditions(), GranularCollapse::setupInitialConditions(), SlidingSpheresUnitTest::setupInitialConditions(), SphericalSuperQuadricCollision::setupInitialConditions(), ContactDetectionNormalSpheresTest::setupInitialConditions(), ContactDetectionRotatedSpheresTest::setupInitialConditions(), ShapesDemo::setupInitialConditions(), VisualisationTest::setupInitialConditions(), MercuryProblem::setupInitialConditions(), Tutorial1::setupInitialConditions(), Tutorial11::setupInitialConditions(), Tutorial12::setupInitialConditions(), Tutorial2::setupInitialConditions(), Tutorial3::setupInitialConditions(), Tutorial4::setupInitialConditions(), Tutorial5::setupInitialConditions(), Tutorial6::setupInitialConditions(), Tutorial7::setupInitialConditions(), Tutorial8::setupInitialConditions(), Tutorial9::setupInitialConditions(), ParticleParticleInteraction::setupInitialConditions(), ParticleParticleInteractionWithPlasticForces::setupInitialConditions(), ParticleWallInteraction::setupInitialConditions(), AngledPeriodicBoundarySecondUnitTest::setupInitialConditions(), AngledPeriodicBoundaryUnitTest::setupInitialConditions(), ArcWallUnitTest::setupInitialConditions(), Packing::setupInitialConditions(), TwoParticles::setupInitialConditions(), CreateDataAndFStatFiles::setupInitialConditions(), ChargedBondedParticleUnitTest::setupInitialConditions(), DrivenParticleClass::setupInitialConditions(), EnergyUnitTest::setupInitialConditions(), ExtremeOverlapWithWallsUnitTest::setupInitialConditions(), RandomClusterInsertionBoundarySelfTest::setupInitialConditions(), FreeFallHertzMindlinUnitTest::setupInitialConditions(), FreeFall::setupInitialConditions(), FullRestartTest::setupInitialConditions(), HertzContactRestitutionUnitTest::setupInitialConditions(), HertzianSinterForceUnitTest::setupInitialConditions(), MD_demo::setupInitialConditions(), InclinedPlane::setupInitialConditions(), MpiMaserChuteTest::setupInitialConditions(), MovingIntersectionOfWallsUnitTest_Basic::setupInitialConditions(), MovingWalls::setupInitialConditions(), MpiPeriodicBoundaryUnitTest::setupInitialConditions(), PeriodicWalls::setupInitialConditions(), PeriodicWallsWithSlidingFrictionUnitTest::setupInitialConditions(), PlasticForceUnitTest::setupInitialConditions(), SeparateFilesSelfTest::setupInitialConditions(), SinterForceUnitTest::setupInitialConditions(), SpeciesTest::setupInitialConditions(), TangentialSpringEnergyConservationUnitTest::setupInitialConditions(), TangentialSpringUnitTest::setupInitialConditions(), WallSpecies::setupInitialConditions(), Chute::setupInitialConditions(), ChuteBottom::setupInitialConditions(), ChuteWithHopper::setupInitialConditions(), MembraneDemo::setUpMembrane(), ContactDetectionWithWallTester::setupParticleAndWall(), ContactDetectionTester::setupParticles(), SilbertPeriodic::SilbertPeriodic(), SingleParticle< SpeciesType >::SingleParticle(), SinterPair::SinterPair(), T_protectiveWall::T_protectiveWall(), BoundingRadiusTester::test(), InertiaTensorTester::test(), VolumeTest::test(), ShapeGradientHessianTester::testCushion(), ShapeGradientHessianTester::testEllipsoid(), ShapeGradientHessianTester::testRoundedBeam(), ShapeGradientHessianTester::testSphere(), and viscoElasticUnitTest::viscoElasticUnitTest().

◆ unfix()

void BaseParticle::unfix ( )

Unfix Particle function, which required a reference to the Species vector. It unfixes a Particle by computing the Particles mass and inertia.

Unfixes the particle by computing the Particles mass and inertia, using the species and radius.

317 {
318  invMass_ = 1.0;
319  getSpecies()->computeMass(this);
320  if (getHandler())
322 }

References ParticleSpecies::computeMass(), getHandler(), BaseInteractable::getSpecies(), invMass_, and ParticleHandler::removedFixedParticle().

Referenced by DPMBase::readNextDataFile(), and FiveParticles::setupInitialConditions().

◆ write()

void BaseParticle::write ( std::ostream &  os) const
overridevirtual

Particle print function, which accepts an std::ostream as input.

BaseParticle print method, which accepts an os std::ostream as input. It prints human readable BaseParticle information to the std::ostream.

Parameters
[in,out]osstream to which the info is written

Reimplemented from BaseInteractable.

Reimplemented in ThermalParticle, SuperQuadricParticle, LiquidFilmParticle, and HeatFluidCoupledParticle.

331 {
333  os << " radius " << radius_
334  << " invMass " << invMass_;
335  //invMass_ is a computed value, but needs to be stored to see if a particle is fixed
336 }

References invMass_, radius_, and BaseInteractable::write().

Referenced by LiquidFilmParticle::write(), SuperQuadricParticle::write(), and ThermalParticle::write().

Friends And Related Function Documentation

◆ ParticleSpecies::computeMass

void ParticleSpecies::computeMass ( BaseParticle ) const
friend

Particle's position at previous time step.

Since ParticleSpecies is allowed to set the mass of a BaseParticle, it is a friend of this class.

Member Data Documentation

◆ communicationComplexity_

unsigned BaseParticle::communicationComplexity_
private

returns true if it flagged as being in MPI domain

Referenced by BaseParticle(), getCommunicationComplexity(), and setCommunicationComplexity().

◆ displacement_

Vec3D BaseParticle::displacement_
private

Indicates if this particle belongs to the maser boundary or is released into the wide open world.

Referenced by addDisplacement(), BaseParticle(), getDisplacement(), and setDisplacement().

◆ handler_

ParticleHandler* BaseParticle::handler_
private

Inverse Particle inverse inertia (for computation optimization)

Pointer to the particle's ParticleHandler container

Referenced by BaseParticle(), getHandler(), getVolume(), setHandler(), setIndSpecies(), and setSpecies().

◆ hGridCell

HGridCell BaseParticle::hGridCell
private

All hGrid-information: the cell (x,y,z,level), and the previous and next particle in this cell compared to this particle

Referenced by BaseParticle(), getHGridCell(), getHGridLevel(), getHGridX(), getHGridY(), getHGridZ(), printHGrid(), setHGridLevel(), setHGridX(), setHGridY(), and setHGridZ().

◆ hGridNextObject_

BaseParticle* BaseParticle::hGridNextObject_
private

◆ hGridPrevObject_

BaseParticle* BaseParticle::hGridPrevObject_
private

Pointer to the next Particle in the same HGrid cell.

Referenced by BaseParticle(), getHGridPrevObject(), and setHGridPrevObject().

◆ info_

Mdouble BaseParticle::info_
private

Referenced by BaseParticle(), getInfo(), and setInfo().

◆ invInertia_

◆ invMass_

◆ isInMPIDomain_

bool BaseParticle::isInMPIDomain_
private

returns true if the particle acts as an MPI particle instead of a real particle

Referenced by BaseParticle(), isInMPIDomain(), and setInMPIDomain().

◆ isInPeriodicDomain_

bool BaseParticle::isInPeriodicDomain_
private

◆ isMaserParticle_

bool BaseParticle::isMaserParticle_
private

Indicates the periodic complexity at current time step. Used to update periodic status.

Referenced by BaseParticle(), isMaserParticle(), and setMaserParticle().

◆ isMPIParticle_

bool BaseParticle::isMPIParticle_
private

Pointer to originating Particle.

Referenced by BaseParticle(), isMPIParticle(), and setMPIParticle().

◆ isPeriodicGhostParticle_

bool BaseParticle::isPeriodicGhostParticle_
private

bool that indicates if a particle is in the periodic domain of any boundary

Referenced by BaseParticle(), isPeriodicGhostParticle(), and setPeriodicGhostParticle().

◆ periodicComplexity_

std::vector<int> BaseParticle::periodicComplexity_
private

Indicates the periodic complexity at previous time step.

Referenced by BaseParticle(), getPeriodicComplexity(), and setPeriodicComplexity().

◆ periodicFromParticle_

BaseParticle* BaseParticle::periodicFromParticle_
private

Pointer to the previous Particle in the same HGrid cell.

Particle attributes

Referenced by BaseParticle(), getPeriodicFromParticle(), and setPeriodicFromParticle().

◆ previousPeriodicComplexity_

std::vector<int> BaseParticle::previousPeriodicComplexity_
private

Indicates if the particle is a ghost particle of a periodic particle.

Referenced by BaseParticle(), getPreviousPeriodicComplexity(), and setPreviousPeriodicComplexity().

◆ previousPosition_

Vec3D BaseParticle::previousPosition_
private

Displacement (only used in StatisticsVector, StatisticsPoint)

Referenced by getPreviousPosition(), movePrevious(), and setPreviousPosition().

◆ radius_


The documentation for this class was generated from the following files:
MatrixSymmetric3D::inverse
MatrixSymmetric3D inverse() const
Computes the inverse of a matrix; exits if the inverse doesn't exist.
Definition: MatrixSymmetric.cc:298
BaseParticle::handler_
ParticleHandler * handler_
Inverse Particle inverse inertia (for computation optimization)
Definition: BaseParticle.h:665
BaseParticle::isPeriodicGhostParticle_
bool isPeriodicGhostParticle_
bool that indicates if a particle is in the periodic domain of any boundary
Definition: BaseParticle.h:691
BaseInteractable::getAngularVelocity
virtual const Vec3D & getAngularVelocity() const
Returns the angular velocity of this interactable.
Definition: BaseInteractable.cc:341
mathsFunc::square
T square(const T val)
squares a number
Definition: ExtendedMath.h:106
BaseParticle::periodicFromParticle_
BaseParticle * periodicFromParticle_
Pointer to the previous Particle in the same HGrid cell.
Definition: BaseParticle.h:682
ParticleHandler::checkExtrema
void checkExtrema(BaseParticle *P)
Checks if the extrema of this ParticleHandler needs updating.
Definition: ParticleHandler.cc:1163
BaseInteractable::getSpecies
const ParticleSpecies * getSpecies() const
Returns a pointer to the species of this BaseInteractable.
Definition: BaseInteractable.h:108
BaseParticle::setHandler
void setHandler(ParticleHandler *handler)
Sets the pointer to the particle's ParticleHandler.
Definition: BaseParticle.cc:651
DPMBase::getParticleDimensions
unsigned int getParticleDimensions() const
Returns the particle dimensionality.
Definition: DPMBase.cc:1458
BaseParticle::invInertia_
MatrixSymmetric3D invInertia_
Inverse Particle mass (for computation optimization)
Definition: BaseParticle.h:657
BaseInteractable::rotate
virtual void rotate(const Vec3D &angularVelocityDt)
Rotates this BaseInteractable.
Definition: BaseInteractable.cc:230
Vec3D::setZero
void setZero()
Sets all elements to zero.
Definition: Vector.cc:43
HGridCell::getHGridZ
int getHGridZ() const
Definition: HGridCell.h:76
constants::pi
const Mdouble pi
Definition: ExtendedMath.h:45
BaseSpecies::getInteractionDistance
Mdouble getInteractionDistance() const
returns the largest separation distance at which adhesive short-range forces can occur.
Definition: BaseSpecies.h:146
BaseParticle::accelerate
void accelerate(const Vec3D &vel)
Increases the particle's velocity_ by the given vector.
Definition: BaseParticle.cc:622
BaseParticle::getHGridLevel
unsigned int getHGridLevel() const
Returns particle's HGrid level.
Definition: BaseParticle.h:234
BaseSpecies::getHandler
SpeciesHandler * getHandler() const
Returns the pointer to the handler to which this species belongs.
Definition: BaseSpecies.cc:99
HGridCell::getHGridLevel
unsigned int getHGridLevel() const
Definition: HGridCell.h:86
BaseParticle::getName
std::string getName() const override
Returns the name of the object.
Definition: BaseParticle.cc:342
BaseInteractable::setPosition
void setPosition(const Vec3D &position)
Sets the position of this BaseInteractable.
Definition: BaseInteractable.h:239
logger
Logger< MERCURY_LOGLEVEL > logger("MercuryKernel")
Definition of different loggers with certain modules. A user can define its own custom logger here.
BaseInteractable::getForce
const Vec3D & getForce() const
Returns the force on this BaseInteractable.
Definition: BaseInteractable.h:126
BaseInteractable::getTorque
const Vec3D & getTorque() const
Returns the torque on this BaseInteractable.
Definition: BaseInteractable.h:138
Vec3D::X
Mdouble X
the vector components
Definition: Vector.h:65
ParticleSpecies::getMixedSpecies
const BaseSpecies * getMixedSpecies(const ParticleSpecies *s) const
Definition: ParticleSpecies.cc:237
DPMBase::periodicBoundaryHandler
PeriodicBoundaryHandler periodicBoundaryHandler
Internal handler that deals with periodic boundaries, especially in a parallel build.
Definition: DPMBase.h:1415
Vec3D::dot
static Mdouble dot(const Vec3D &a, const Vec3D &b)
Calculates the dot product of two Vec3D: .
Definition: Vector.cc:76
HGridCell::getHGridY
int getHGridY() const
Definition: HGridCell.h:66
BaseParticle::getInteractionDistance
Mdouble getInteractionDistance(const BaseInteractable *i) const
Returns the interactionDistance_ of the mixed species of this particle and the particle or wall i.
Definition: BaseParticle.h:369
BaseParticle::hGridCell
HGridCell hGridCell
Definition: BaseParticle.h:676
BaseHandler::getSize
unsigned int getSize() const
Gets the size of the particleHandler (including mpi and periodic particles)
Definition: BaseHandler.h:655
BaseParticle::communicationComplexity_
unsigned communicationComplexity_
returns true if it flagged as being in MPI domain
Definition: BaseParticle.h:687
BaseInteractable::BaseInteractable
BaseInteractable()
Default BaseInteractable constructor.
Definition: BaseInteractable.cc:42
BaseInteractable::getOrientation
const Quaternion & getOrientation() const
Returns the orientation of this BaseInteractable.
Definition: BaseInteractable.h:230
BaseParticle::isInPeriodicDomain_
bool isInPeriodicDomain_
Definition: BaseParticle.h:690
BaseInteractable::getIndSpecies
unsigned int getIndSpecies() const
Returns the index of the species associated with the interactable object.
Definition: BaseInteractable.h:88
BaseInteractable::move
virtual void move(const Vec3D &move)
Moves this BaseInteractable by adding an amount to the position.
Definition: BaseInteractable.cc:215
BaseInteractable::setIndSpecies
virtual void setIndSpecies(unsigned int indSpecies)
Sets the index of the Species of this BaseInteractable.
Definition: BaseInteractable.h:98
BaseInteractable
Defines the basic properties that a interactable object can have.
Definition: BaseInteractable.h:55
BaseParticle::getInertia
MatrixSymmetric3D getInertia() const
Definition: BaseParticle.h:331
BaseParticle::getParticleDimensions
unsigned int getParticleDimensions() const
Returns the particle's dimensions (either 2 or 3).
Definition: BaseParticle.cc:770
DPMBase::hGridUpdateMove
virtual void hGridUpdateMove(BaseParticle *, Mdouble)
Definition: DPMBase.cc:1924
BaseInteractable::getVelocity
virtual const Vec3D & getVelocity() const
Returns the velocity of this interactable.
Definition: BaseInteractable.cc:329
Vec3D
Definition: Vector.h:50
ParticleSpecies::getDensity
Mdouble getDensity() const
Allows density_ to be accessed.
Definition: ParticleSpecies.cc:117
BaseInteraction::setDistance
void setDistance(Mdouble distance)
Sets the interaction distance between the two interacting objects.
Definition: BaseInteraction.cc:219
BaseInteractable::setOrientation
void setOrientation(const Quaternion &orientation)
Sets the orientation of this BaseInteractable.
Definition: BaseInteractable.h:260
BaseParticle::isInMPIDomain_
bool isInMPIDomain_
returns true if the particle acts as an MPI particle instead of a real particle
Definition: BaseParticle.h:686
BaseInteraction
Stores information about interactions between two interactable objects; often particles but could be ...
Definition: BaseInteraction.h:60
BaseObject::setId
void setId(unsigned long id)
Assigns a unique identifier to each object in the handler (container) which remains constant even aft...
Definition: BaseObject.cc:72
Mdouble
double Mdouble
Definition: GeneralDefine.h:34
BaseParticle::hGridNextObject_
BaseParticle * hGridNextObject_
Definition: BaseParticle.h:678
MatrixSymmetric3D::setZero
void setZero()
Sets all elements to zero.
Definition: MatrixSymmetric.cc:70
ParticleHandler::addedFixedParticle
void addedFixedParticle()
Increment of the number of fixed particles.
Definition: ParticleHandler.cc:1224
BaseParticle::getRadius
Mdouble getRadius() const
Returns the particle's radius.
Definition: BaseParticle.h:348
BaseParticle::invMass_
Mdouble invMass_
Particle radius_.
Definition: BaseParticle.h:656
BaseInteractable::setVelocity
void setVelocity(const Vec3D &velocity)
set the velocity of the BaseInteractable.
Definition: BaseInteractable.cc:350
SpeciesHandler
Container to store all ParticleSpecies.
Definition: SpeciesHandler.h:37
BaseInteractable::setAngularVelocity
void setAngularVelocity(const Vec3D &angularVelocity)
set the angular velocity of the BaseInteractble.
Definition: BaseInteractable.cc:360
ERROR
LL< Log::ERROR > ERROR
Error log level.
Definition: Logger.cc:53
BaseParticle::setSpecies
void setSpecies(const ParticleSpecies *species)
Definition: BaseParticle.cc:804
BaseInteraction::getOverlap
Mdouble getOverlap() const
Returns a Mdouble with the current overlap between the two interacting objects.
Definition: BaseInteraction.h:240
BaseInteraction::getNormal
const Vec3D & getNormal() const
Gets the normal vector between the two interacting objects.
Definition: BaseInteraction.h:226
BaseInteraction::setOverlap
void setOverlap(Mdouble overlap)
Set the overlap between the two interacting object.
Definition: BaseInteraction.cc:229
WARN
LL< Log::WARN > WARN
Warning log level.
Definition: Logger.cc:54
ParticleSpecies::getMaxInteractionDistance
Mdouble getMaxInteractionDistance() const
returns the largest separation distance at which adhesive short-range forces can occur.
Definition: ParticleSpecies.h:113
BaseParticle::getInvMass
Mdouble getInvMass() const override
Returns the inverse of the particle's mass.
Definition: BaseParticle.h:293
Log::FATAL
@ FATAL
DPMBase::speciesHandler
SpeciesHandler speciesHandler
A handler to that stores the species type i.e. LinearViscoelasticSpecies, etc.
Definition: DPMBase.h:1385
HGridCell::setHGridLevel
void setHGridLevel(unsigned int HGridLevel)
Definition: HGridCell.h:91
BaseInteractable::read
void read(std::istream &is) override
Reads a BaseInteractable from an input stream.
Definition: BaseInteractable.cc:244
MatrixSymmetric3D::ZZ
Mdouble ZZ
Definition: MatrixSymmetric.h:42
HGridCell::setHGridY
void setHGridY(int HGridY)
Definition: HGridCell.h:71
ParticleHandler::removedFixedParticle
void removedFixedParticle()
Decrement of the number of fixed particles.
Definition: ParticleHandler.cc:1229
BaseInteractable::integrateAfterForceComputation
void integrateAfterForceComputation(double time, double timeStep)
This is part of the integration routine for objects with infinite mass.
Definition: BaseInteractable.cc:611
BaseInteractable::addVelocity
void addVelocity(const Vec3D &velocity)
adds an increment to the velocity.
Definition: BaseInteractable.h:312
Vec3D::Y
Mdouble Y
Definition: Vector.h:65
BaseParticle::isMPIParticle_
bool isMPIParticle_
Pointer to originating Particle.
Definition: BaseParticle.h:685
DPMBase::getHGridUpdateEachTimeStep
virtual bool getHGridUpdateEachTimeStep() const
Definition: DPMBase.cc:1709
BaseParticle::isMaserParticle_
bool isMaserParticle_
Indicates the periodic complexity at current time step. Used to update periodic status.
Definition: BaseParticle.h:694
InteractionHandler::getInteraction
BaseInteraction * getInteraction(BaseInteractable *P, BaseInteractable *I, unsigned timeStamp)
Returns the Interaction between the BaseInteractable's P and I.
Definition: InteractionHandler.cc:149
BaseInteraction::setContactPoint
void setContactPoint(Vec3D contactPoint)
Set the location of the contact point between the two interacting objects.
Definition: BaseInteraction.cc:238
HGridCell::setHGridZ
void setHGridZ(int HGridZ)
Definition: HGridCell.h:81
MatrixSymmetric3D::inverse
static MatrixSymmetric3D inverse(const MatrixSymmetric3D &A)
Computes the inverse of a matrix; exits if the inverse doesn't exist.
Definition: MatrixSymmetric.cc:288
BaseParticle::displacement_
Vec3D displacement_
Indicates if this particle belongs to the maser boundary or is released into the wide open world.
Definition: BaseParticle.h:696
constants::i
const std::complex< Mdouble > i
Definition: ExtendedMath.h:51
BaseInteraction::setNormal
void setNormal(Vec3D normal)
Sets the normal vector between the two interacting objects.
Definition: BaseInteraction.cc:210
BaseParticle::periodicComplexity_
std::vector< int > periodicComplexity_
Indicates the periodic complexity at previous time step.
Definition: BaseParticle.h:693
Quaternion
This class contains the 4 components of a quaternion and the standard operators and functions needed ...
Definition: Quaternion.h:63
BaseObject::setIndex
void setIndex(unsigned int index)
Allows one to assign an index to an object in the handler/container.
Definition: BaseObject.cc:64
BaseHandler::getObject
T * getObject(const unsigned int id)
Gets a pointer to the Object at the specified index in the BaseHandler.
Definition: BaseHandler.h:613
MatrixSymmetric3D::XX
Mdouble XX
The six distinctive matrix elements.
Definition: MatrixSymmetric.h:42
BaseObject::getId
unsigned int getId() const
Returns the unique identifier of any particular object.
Definition: BaseObject.h:125
BaseParticle::setPreviousPosition
void setPreviousPosition(const Vec3D &pos)
Sets the particle's position in the previous time step.
Definition: BaseParticle.cc:602
BaseHandler::getDPMBase
DPMBase * getDPMBase()
Gets the problem that is solved using this handler.
Definition: BaseHandler.h:725
HGridCell::setHGridX
void setHGridX(int HGridX)
Definition: HGridCell.h:61
Vec3D::getLengthSquared
static Mdouble getLengthSquared(const Vec3D &a)
Calculates the squared length of a Vec3D: .
Definition: Vector.h:316
BaseInteractable::setSpecies
void setSpecies(const ParticleSpecies *species)
Sets the species of this BaseInteractable.
Definition: BaseInteractable.cc:185
BaseParticle::previousPeriodicComplexity_
std::vector< int > previousPeriodicComplexity_
Indicates if the particle is a ghost particle of a periodic particle.
Definition: BaseParticle.h:692
BaseParticle::previousPosition_
Vec3D previousPosition_
Displacement (only used in StatisticsVector, StatisticsPoint)
Definition: BaseParticle.h:697
Vec3D::cross
static Vec3D cross(const Vec3D &a, const Vec3D &b)
Calculates the cross product of two Vec3D: .
Definition: Vector.cc:163
BaseParticle::getHandler
ParticleHandler * getHandler() const
Returns pointer to the particle's ParticleHandler.
Definition: BaseParticle.cc:661
HGridCell::getHGridX
int getHGridX() const
Definition: HGridCell.h:56
Quaternion::setEuler
void setEuler(const Vec3D &e)
Convert Euler angles to a quaternion. See Wikipedia for details.
Definition: Quaternion.cc:473
BaseParticle::hGridPrevObject_
BaseParticle * hGridPrevObject_
Pointer to the next Particle in the same HGrid cell.
Definition: BaseParticle.h:679
BaseInteractable::write
void write(std::ostream &os) const override
Write a BaseInteractable to an output stream.
Definition: BaseInteractable.cc:274
Vec3D::getDistanceSquared
static Mdouble getDistanceSquared(const Vec3D &a, const Vec3D &b)
Calculates the squared distance between two Vec3D: .
Definition: Vector.h:295
BaseParticle::isFixed
bool isFixed() const override
Is fixed Particle function. It returns whether a Particle is fixed or not, by checking its inverse Ma...
Definition: BaseParticle.h:93
MatrixSymmetric3D
Implementation of a 3D symmetric matrix.
Definition: MatrixSymmetric.h:37
DPMBase::getRotation
bool getRotation() const
Indicates whether particle rotation is enabled or disabled.
Definition: DPMBase.h:559
DPMBase::particleHandler
ParticleHandler particleHandler
An object of the class ParticleHandler, contains the pointers to all the particles created.
Definition: DPMBase.h:1395
BaseParticle::getInvInertia
MatrixSymmetric3D getInvInertia() const
Returns the inverse of the particle's inertia tensor.
Definition: BaseParticle.h:286
Vec3D::Z
Mdouble Z
Definition: Vector.h:65
BaseParticle::getPreviousPosition
const Vec3D & getPreviousPosition() const
Returns the particle's position in the previous time step.
Definition: BaseParticle.h:403
BaseParticle::isInContactWith
virtual bool isInContactWith(const BaseParticle *P) const
Get whether or not this particle is in contact with the given particle.
Definition: BaseParticle.cc:851
ParticleHandler::checkExtremaOnDelete
void checkExtremaOnDelete(BaseParticle *P)
Checks if the extrema of this ParticleHandler needs updating when a particle is deleted.
Definition: ParticleHandler.cc:1189
BaseInteractable::addAngularVelocity
void addAngularVelocity(const Vec3D &angularVelocity)
add an increment to the angular velocity.
Definition: BaseInteractable.cc:370
BaseParticle::BaseParticle
BaseParticle()
Basic Particle constructor, creates an Particle at (0,0,0) with radius, mass and inertia equal to 1.
Definition: BaseParticle.cc:33
BaseInteractable::integrateBeforeForceComputation
void integrateBeforeForceComputation(double time, double timeStep)
This is part of integrate routine for objects with infinite mass.
Definition: BaseInteractable.cc:538
BaseParticle::getSumOfInteractionRadii
Mdouble getSumOfInteractionRadii(const BaseParticle *particle) const
returns the sum of the radii plus the interactionDistance
Definition: BaseParticle.h:379
BaseParticle::radius_
Mdouble radius_
Definition: BaseParticle.h:655
BaseParticle::getMass
Mdouble getMass() const
Returns the particle's mass.
Definition: BaseParticle.h:322
BaseParticle::info_
Mdouble info_
Definition: BaseParticle.h:705
Vec3D::getLengthSquared
Mdouble getLengthSquared() const
Calculates the squared length of this Vec3D: .
Definition: Vector.cc:184
MatrixSymmetric3D::YY
Mdouble YY
Definition: MatrixSymmetric.h:42
BaseParticle::angularAccelerate
void angularAccelerate(const Vec3D &angVel)
Increases the particle's angularVelocity_ by the given vector.
Definition: BaseParticle.cc:632
BaseInteractable::getPosition
const Vec3D & getPosition() const
Returns the position of this BaseInteractable.
Definition: BaseInteractable.h:218
DPMBase
The DPMBase header includes quite a few header files, defining all the handlers, which are essential....
Definition: DPMBase.h:76
ParticleSpecies::computeMass
void computeMass(BaseParticle *p) const
Compute Particle mass function, which required a reference to the Species vector. It computes the Par...
Definition: ParticleSpecies.cc:166