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 whether 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
 
virtual Mdouble getKineticEnergy () const
 Calculates the particle's translational kinetic energy. More...
 
virtual 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...
 
MERCURYDPM_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...
 
virtual void integrateBeforeForceComputation (double time, double timeStep)
 First step of Velocity Verlet integration. More...
 
virtual 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...
 
MERCURYDPM_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 =0
 
const HGridCellgetHGridCell () const
 
virtual void computeMass (const ParticleSpecies &s)
 Computes the particle's (inverse) mass and inertia. More...
 
BaseParticlegetClump () const
 
bool isClump () const
 Checks if particle is a clump (container) More...
 
bool isPebble () const
 Checks if particle is a pebble (belongs to a clump) More...
 
virtual Vec3D getCenterOfMass ()
 
virtual void actionsAfterAddObject ()
 
- 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...
 
virtual 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...
 
virtual 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...
 
virtual 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...
 
virtual bool isFaceContact (const Vec3D &normal) const
 
- 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
 

Public Attributes

Mdouble radius_
 
Mdouble invMass_
 Particle radius_. More...
 
MatrixSymmetric3D invInertia_
 Inverse Particle mass (for computation optimization) More...
 
BaseParticleclumpParticle
 Function that updates necessary quantities of a clump particle after adding a pebble. More...
 
bool isPebble_
 pointer to a clump particle (for a pebble) More...
 
bool isClump_
 The particle is pebble. 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< int > previousPeriodicComplexity_
 Indicates if the particle is a ghost particle of a periodic particle. More...
 
std::vector< int > periodicComplexity_
 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

34 {
35  handler_ = nullptr;
37  radius_ = 1.0;
38  invMass_ = 1.0;
39  invInertia_ = MatrixSymmetric3D(1, 0, 0, 1, 0, 1);
40 
41  periodicFromParticle_ = nullptr;
42  isMPIParticle_ = false;
43  isInMPIDomain_ = false;
44  isInPeriodicDomain_ = false;
46  isMaserParticle_ = false;
48  periodicComplexity_ = std::vector<int>(0);
49  previousPeriodicComplexity_ = std::vector<int>(0);
50 #ifdef CONTACT_LIST_HGRID
51  firstPossibleContact = nullptr;
52 #endif
53  hGridNextObject_ = nullptr;
54  hGridPrevObject_ = nullptr;
55 
56  hGridCell.setHGridLevel(99999);
57  hGridCell.setHGridX(99999);
58  hGridCell.setHGridY(99999);
59  hGridCell.setHGridZ(99999);
60 
61  info_ = std::numeric_limits<double>::quiet_NaN();
62  isClump_ = false;
63  isPebble_ = false;
64  logger(DEBUG, "BaseParticle::BaseParticle() finished");
65 }
Logger< MERCURYDPM_LOGLEVEL > logger("MercuryKernel")
Definition of different loggers with certain modules. A user can define its own custom logger here.
@ DEBUG
BaseInteractable()
Default BaseInteractable constructor.
Definition: BaseInteractable.cc:42
bool isMaserParticle_
Indicates the periodic complexity at current time step. Used to update periodic status.
Definition: BaseParticle.h:722
bool isClump_
The particle is pebble.
Definition: BaseParticle.h:748
BaseParticle * periodicFromParticle_
Pointer to the previous Particle in the same HGrid cell.
Definition: BaseParticle.h:710
bool isInPeriodicDomain_
Definition: BaseParticle.h:718
BaseParticle * hGridPrevObject_
Pointer to the next Particle in the same HGrid cell.
Definition: BaseParticle.h:707
std::vector< int > periodicComplexity_
Indicates the periodic complexity at previous time step.
Definition: BaseParticle.h:721
unsigned communicationComplexity_
returns true if it flagged as being in MPI domain
Definition: BaseParticle.h:715
Mdouble radius_
Definition: BaseParticle.h:684
std::vector< int > previousPeriodicComplexity_
Indicates if the particle is a ghost particle of a periodic particle.
Definition: BaseParticle.h:720
bool isPebble_
pointer to a clump particle (for a pebble)
Definition: BaseParticle.h:746
Vec3D displacement_
Indicates if this particle belongs to the maser boundary or is released into the wide open world.
Definition: BaseParticle.h:724
MatrixSymmetric3D invInertia_
Inverse Particle mass (for computation optimization)
Definition: BaseParticle.h:686
Mdouble invMass_
Particle radius_.
Definition: BaseParticle.h:685
bool isMPIParticle_
Pointer to originating Particle.
Definition: BaseParticle.h:713
Mdouble info_
Definition: BaseParticle.h:733
BaseParticle * hGridNextObject_
Definition: BaseParticle.h:706
HGridCell hGridCell
Definition: BaseParticle.h:704
bool isPeriodicGhostParticle_
bool that indicates if a particle is in the periodic domain of any boundary
Definition: BaseParticle.h:719
ParticleHandler * handler_
Inverse Particle inverse inertia (for computation optimization)
Definition: BaseParticle.h:693
bool isInMPIDomain_
returns true if the particle acts as an MPI particle instead of a real particle
Definition: BaseParticle.h:714
void setHGridZ(int HGridZ)
Definition: HGridCell.h:81
void setHGridX(int HGridX)
Definition: HGridCell.h:61
void setHGridY(int HGridY)
Definition: HGridCell.h:71
void setHGridLevel(unsigned int HGridLevel)
Definition: HGridCell.h:91
Implementation of a 3D symmetric matrix.
Definition: MatrixSymmetric.h:37
void setZero()
Sets all elements to zero.
Definition: Vector.cc:43

References communicationComplexity_, DEBUG, displacement_, handler_, hGridCell, hGridNextObject_, hGridPrevObject_, info_, invInertia_, invMass_, isClump_, isInMPIDomain_, isInPeriodicDomain_, isMaserParticle_, isMPIParticle_, isPebble_, 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  isClump_ = p.isClump();
100  isPebble_ = p.isPebble();
101  //periodicComplexity_ = p.periodicComplexity_;
102  //previousPeriodicComplexity_ = p.previousPeriodicComplexity_;
103 #ifdef CONTACT_LIST_HGRID
104  firstPossibleContact = nullptr;
105 #endif
106 
107  info_ = p.info_;
108  logger(DEBUG, "BaseParticle::BaseParticle(BaseParticle &p) finished");
109 }
MatrixSymmetric3D getInvInertia() const
Returns the inverse of the particle's inertia tensor.
Definition: BaseParticle.h:286
bool isPebble() const
Checks if particle is a pebble (belongs to a clump)
Definition: BaseParticle.h:673
unsigned int getHGridLevel() const
Returns particle's HGrid level.
Definition: BaseParticle.h:234
bool isClump() const
Checks if particle is a clump (container)
Definition: BaseParticle.h:664
Mdouble getInvMass() const override
Returns the inverse of the particle's mass.
Definition: BaseParticle.h:293

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

◆ BaseParticle() [3/3]

BaseParticle::BaseParticle ( const ParticleSpecies s)
explicit
112  : BaseParticle()
113 {
114  setSpecies(s);
115 #ifdef CONTACT_LIST_HGRID
116  firstPossibleContact = nullptr;
117 #endif
118  logger(DEBUG, "BaseParticle::BaseParticle(BaseSpecies &s) finished");
119 }
void setSpecies(const ParticleSpecies *species)
Definition: BaseParticle.cc:818
BaseParticle()
Basic Particle constructor, creates an Particle at (0,0,0) with radius, mass and inertia equal to 1.
Definition: BaseParticle.cc:32

References DEBUG, 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.

126 {
127 
128  if (getHandler() != nullptr)
129  {
131  if (isFixed())
133  }
134  logger(DEBUG, "BaseParticle::~BaseParticle() of particle % finished.", getId());
135 
136 }
unsigned int getId() const
Returns the unique identifier of any particular object.
Definition: BaseObject.h:125
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
ParticleHandler * getHandler() const
Returns pointer to the particle's ParticleHandler.
Definition: BaseParticle.cc:673
void checkExtremaOnDelete(BaseParticle *P)
Checks if the extrema of this ParticleHandler needs updating when a particle is deleted.
Definition: ParticleHandler.cc:1199
void removedFixedParticle()
Decrement of the number of fixed particles.
Definition: ParticleHandler.cc:1239

References ParticleHandler::checkExtremaOnDelete(), DEBUG, 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_
635 {
636  addVelocity(vel);
637 }
void addVelocity(const Vec3D &velocity)
adds an increment to the velocity.
Definition: BaseInteractable.h:312

References BaseInteractable::addVelocity().

Referenced by integrateAfterForceComputation(), ClumpParticle::integrateAfterForceComputation(), integrateBeforeForceComputation(), ClumpParticle::integrateBeforeForceComputation(), and MovingIntersectionOfWallsUnitTest_MovingReferenceFrame::setupInitialConditions().

◆ actionsAfterAddObject()

virtual void BaseParticle::actionsAfterAddObject ( )
inlinevirtual

Methods and attributes necessary for clumped particles

Reimplemented in ClumpParticle.

742 {}

◆ actionsAfterTimeStep()

virtual void BaseParticle::actionsAfterTimeStep ( )
inlinevirtual
642 {}

◆ 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.
654 {
655  displacement_ += addDisp;
656 }

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_
645 {
646  addAngularVelocity(angVel);
647 }
void addAngularVelocity(const Vec3D &angularVelocity)
add an increment to the angular velocity.
Definition: BaseInteractable.cc:370

References BaseInteractable::addAngularVelocity().

Referenced by integrateAfterForceComputation(), and integrateBeforeForceComputation().

◆ computeMass()

void BaseParticle::computeMass ( const ParticleSpecies s)
virtual

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

Reimplemented in SuperQuadricParticle, and ClumpParticle.

876  {
877  if (isFixed()) return;
878  if (getParticleDimensions()==3) {
879  invMass_ = 1.0 / (4.0 / 3.0 * constants::pi * getRadius() * getRadius() * getRadius() * s.getDensity());
880  invInertia_ = MatrixSymmetric3D(1, 0, 0, 1, 0, 1) / (.4 * getMass() * mathsFunc::square(getRadius()));
881  } else {
882  invMass_ = 1.0 / (constants::pi * getRadius() * getRadius() * s.getDensity());
883  invInertia_ = MatrixSymmetric3D(1, 0, 0, 1, 0, 1) / (.5 * getMass() * mathsFunc::square(getRadius()));
884  }
885 };
unsigned int getParticleDimensions() const
Returns the particle's dimensions (either 2 or 3).
Definition: BaseParticle.cc:784
Mdouble getRadius() const
Returns the particle's radius.
Definition: BaseParticle.h:348
Mdouble getMass() const
Returns the particle's mass.
Definition: BaseParticle.h:322
Mdouble getDensity() const
Allows density_ to be accessed.
Definition: ParticleSpecies.cc:118
const Mdouble pi
Definition: ExtendedMath.h:45
T square(const T val)
squares a number
Definition: ExtendedMath.h:106

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 NonSphericalParticle, SuperQuadricParticle, SphericalParticle, and ClumpParticle.

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

◆ fixParticle()

void BaseParticle::fixParticle ( )

Fix Particle function. It fixes a Particle by setting its inverse mass and inertia and velocities to zero.

Fixes a BaseParticle by setting its inverse mass and inertia and velocities to zero.

168 {
169 // //
170 // Clump f;
171 // f.invInertia2_ = MatrixSymmetric3D(0, 0, 0, 0, 0, 0);
172  //
173  invMass_ = 0.0;
174  invInertia_ = MatrixSymmetric3D(0, 0, 0, 0, 0, 0);
175  setVelocity(Vec3D(0.0, 0.0, 0.0));
176  setAngularVelocity(Vec3D(0.0, 0.0, 0.0));
177  if (getHandler())
179 }
void setAngularVelocity(const Vec3D &angularVelocity)
set the angular velocity of the BaseInteractble.
Definition: BaseInteractable.cc:360
void setVelocity(const Vec3D &velocity)
set the velocity of the BaseInteractable.
Definition: BaseInteractable.cc:350
void addedFixedParticle()
Increment of the number of fixed particles.
Definition: ParticleHandler.cc:1234
Definition: Vector.h:51

References ParticleHandler::addedFixedParticle(), getHandler(), invInertia_, invMass_, BaseInteractable::setAngularVelocity(), and BaseInteractable::setVelocity().

Referenced by MPISphericalParticle::copyDataFromMPIParticleToParticle(), Slide::create_rough_wall(), DPM::DPM(), LawinenBox::LawinenBox(), ParticleBeam::ParticleBeam(), DPMBase::readNextDataFile(), DPMBase::setFixedParticles(), MercuryLogo::setupInitialConditions(), FiveParticles::setupInitialConditions(), Cstatic2d::setupInitialConditions(), Cstatic3D::setupInitialConditions(), CGBasicSelfTest::setupInitialConditions(), CGHandlerSelfTest::setupInitialConditions(), CGStaticBalanceSelfTest::setupInitialConditions(), SphericalIndenter::setupInitialConditions(), DrivenParticleClass::setupInitialConditions(), TangentialSpringEnergyConservationUnitTest::setupInitialConditions(), and TangentialSpringUnitTest::setupInitialConditions().

◆ getAngularMomentum()

Vec3D BaseParticle::getAngularMomentum ( ) const
580 {
582 }
virtual const Vec3D & getAngularVelocity() const
Returns the angular velocity of this interactable.
Definition: BaseInteractable.cc:341
virtual const Vec3D & getVelocity() const
Returns the velocity of this interactable.
Definition: BaseInteractable.cc:329
const Vec3D & getPosition() const
Returns the position of this BaseInteractable.
Definition: BaseInteractable.h:218
static MatrixSymmetric3D inverse(const MatrixSymmetric3D &A)
Computes the inverse of a matrix; exits if the inverse doesn't exist.
Definition: MatrixSymmetric.cc:288
static Vec3D cross(const Vec3D &a, const Vec3D &b)
Calculates the cross product of two Vec3D: .
Definition: Vector.cc:163

References Vec3D::cross(), BaseInteractable::getAngularVelocity(), BaseInteractable::getPosition(), BaseInteractable::getVelocity(), MatrixSymmetric3D::inverse(), invInertia_, and invMass_.

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

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

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

◆ getCenterOfMass()

virtual Vec3D BaseParticle::getCenterOfMass ( )
inlinevirtual
678 {return Vec3D(0,0,0);}

◆ getClump()

BaseParticle* BaseParticle::getClump ( ) const
inline
657  {
658  return clumpParticle;
659  }
BaseParticle * clumpParticle
Function that updates necessary quantities of a clump particle after adding a pebble.
Definition: BaseParticle.h:744

References clumpParticle.

Referenced by Mercury3Dclump::computeInternalForce().

◆ getCommunicationComplexity()

unsigned BaseParticle::getCommunicationComplexity ( )

Obtains the communication complexity of the particle.

202 {
204 }

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 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.
475 {
477  if (xmax > xmin && fabs(disp.X) > .5 * (xmax - xmin))
478  {
479  if (disp.X > 0)
480  disp.X -= xmax - xmin;
481  else
482  disp.X += xmax - xmin;
483  }
484  if (ymax > ymin && fabs(disp.Y) > .5 * (ymax - ymin))
485  {
486  if (disp.Y > 0)
487  disp.Y -= ymax - ymin;
488  else
489  disp.Y += ymax - ymin;
490  }
491  if (zmax > zmin && fabs(disp.Z) > .5 * (zmax - zmin))
492  {
493  if (disp.Z > 0)
494  disp.Z -= zmax - zmin;
495  else
496  disp.Z += zmax - zmin;
497  }
498  disp /= t;
499  return disp;
500 }
const Vec3D & getPreviousPosition() const
Returns the particle's position in the previous time step.
Definition: BaseParticle.h:403
Mdouble Y
Definition: Vector.h:66
Mdouble Z
Definition: Vector.h:66
Mdouble X
the vector components
Definition: Vector.h:66

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.

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

863 { return 0; }

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

◆ getFieldVTK()

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

Reimplemented in ClumpParticle.

852 {
853  return std::vector<Mdouble>();
854 }

◆ 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()

◆ 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(); }
int getHGridX() const
Definition: HGridCell.h:56

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(); }
int getHGridY() const
Definition: HGridCell.h:66

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(); }
int getHGridZ() const
Definition: HGridCell.h:76

References HGridCell::getHGridZ(), and hGridCell.

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

◆ getInertia()

◆ getInfo()

Mdouble BaseParticle::getInfo ( ) const
virtual

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

359 {
360  if (std::isnan(info_))
361  return getSpecies()->getId();
362  else
363  return info_;
364 }
const ParticleSpecies * getSpecies() const
Returns a pointer to the species of this BaseInteractable.
Definition: BaseInteractable.h:108

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  }
Mdouble getInteractionDistance() const
returns the largest separation distance at which adhesive short-range forces can occur.
Definition: BaseSpecies.h:146
const BaseSpecies * getMixedSpecies(const ParticleSpecies *s) const
Definition: ParticleSpecies.cc:238
const std::complex< Mdouble > i
Definition: ExtendedMath.h:51

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.

692 {
693  //get the normal (from P away from the contact)
694  const Vec3D branchVector = P->getPosition() - getPosition();
695  //Get the square of the distance between particle i and particle j
696  const Mdouble distanceSquared = Vec3D::getLengthSquared(branchVector);
697  //const auto species = interactionHandler->getDPMBase()->speciesHandler.getMixedObject(getSpecies(),P->getSpecies());
698  const Mdouble sumOfInteractionRadii = getSumOfInteractionRadii(P);
699  if (distanceSquared >= sumOfInteractionRadii * sumOfInteractionRadii) {
700  return nullptr;
701  }
702  BaseInteraction* const C = interactionHandler->getInteraction(P, this, timeStamp);
703  const Mdouble distance = std::sqrt(distanceSquared);
704  C->setNormal(branchVector / distance);
705  C->setOverlap(P->getRadius() + getRadius() - distance);
706  C->setDistance(distance);
707  C->setContactPoint(P->getPosition() - (P->getRadius() - 0.5 * C->getOverlap()) * C->getNormal());
709  //Mdouble ratio=P->getRadius()/(getRadius()+P->getRadius());
710  //C->setContactPoint(P->getPosition() - (P->getRadius() - ratio * C->getOverlap()) * C->getNormal());
711  return C;
712 }
double Mdouble
Definition: GeneralDefine.h:34
Stores information about interactions between two interactable objects; often particles but could be ...
Definition: BaseInteraction.h:60
void setDistance(Mdouble distance)
Sets the interaction distance between the two interacting objects.
Definition: BaseInteraction.cc:221
void setContactPoint(Vec3D contactPoint)
Set the location of the contact point between the two interacting objects.
Definition: BaseInteraction.cc:240
const Vec3D & getNormal() const
Gets the normal vector between the two interacting objects.
Definition: BaseInteraction.h:226
void setNormal(Vec3D normal)
Sets the normal vector between the two interacting objects.
Definition: BaseInteraction.cc:212
Mdouble getOverlap() const
Returns a Mdouble with the current overlap between the two interacting objects.
Definition: BaseInteraction.h:240
void setOverlap(Mdouble overlap)
Set the overlap between the two interacting object.
Definition: BaseInteraction.cc:231
Mdouble getSumOfInteractionRadii(const BaseParticle *particle) const
returns the sum of the radii plus the interactionDistance
Definition: BaseParticle.h:379
BaseInteraction * getInteraction(BaseInteractable *P, BaseInteractable *I, unsigned timeStamp)
Returns the Interaction between the BaseInteractable's P and I.
Definition: InteractionHandler.cc:146
Mdouble getLengthSquared() const
Calculates the squared length of this Vec3D: .
Definition: Vector.cc:184
double P
Uniform pressure.
Definition: TwenteMeshGluing.cpp:73

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

Referenced by SphericalSuperQuadricCollision::actionsAfterTimeStep(), ContactDetectionRotatedSpheresTest::actionsAfterTimeStep(), DPMBase::computeInternalForce(), Mercury3Dclump::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(), and integrateBeforeForceComputation().

◆ 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(), integrateAfterForceComputation(), ClumpParticle::integrateAfterForceComputation(), integrateBeforeForceComputation(), and ClumpParticle::integrateBeforeForceComputation().

◆ getKineticEnergy()

Mdouble BaseParticle::getKineticEnergy ( ) const
virtual

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

Reimplemented in NonSphericalParticle, and ClumpParticle.

452 {
453  if (isFixed())
454  return 0.0;
455  else
456  return 0.5 * getMass() * getVelocity().getLengthSquared();
457  //
458 }
static Mdouble getLengthSquared(const Vec3D &a)
Calculates the squared length of a Vec3D: .
Definition: Vector.h:332

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

Referenced by NonSphericalParticle::getKineticEnergy().

◆ getMass()

Mdouble BaseParticle::getMass ( ) const
inline

◆ 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  }
Mdouble getMaxInteractionDistance() const
returns the largest separation distance at which adhesive short-range forces can occur.
Definition: ParticleSpecies.h:113

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

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

◆ 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 NonSphericalParticle, SuperQuadricParticle, SphericalParticle, and ClumpParticle.

349 {
350  return "BaseParticle";
351 }

Referenced by MeshTriangle::getInteractionWith().

◆ getNameVTK()

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

Reimplemented in ClumpParticle.

847 {
848  return "";
849 }

Referenced by ParticleVtkWriter::writeExtraFields().

◆ getNumberOfFieldsVTK()

unsigned BaseParticle::getNumberOfFieldsVTK ( ) const
virtual

Reimplemented in ClumpParticle.

837 {
838  return 0;
839 }

◆ 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
785 {
787 }
DPMBase * getDPMBase()
Gets the problem that is solved using this handler.
Definition: BaseHandler.h:725
unsigned int getParticleDimensions() const
Returns the particle dimensionality.
Definition: DPMBase.cc:1467

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.

232 {
233  //TODO resolve this hack
234  //hack: generally you'd add particles after declaring the boundaries
235  //but no official programming guildelines rules have been setup for that
236  //So incase that doesnt happen we need to resize this periodicComplexity
237  if (periodicComplexity_.empty())
238  {
239  const unsigned numberOfPeriodicBoundaries = getHandler()->getDPMBase()->periodicBoundaryHandler.getSize();
240  if (numberOfPeriodicBoundaries > 0)
241  {
242  periodicComplexity_.resize(numberOfPeriodicBoundaries, 0);
243  }
244  }
245  return periodicComplexity_;
246 }
unsigned int getSize() const
Gets the size of the particleHandler (including mpi and periodic particles)
Definition: BaseHandler.h:655
PeriodicBoundaryHandler periodicBoundaryHandler
Internal handler that deals with periodic boundaries, especially in a parallel build.
Definition: DPMBase.h:1457

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)
249 {
250  //hack: generally you'd add particles after declaring the boundaries
251  //but no official programming guildelines rules have been setup for that
252  //So incase that doesnt happen we need to resize this periodicComplexity
254  if (periodicComplexity_.empty())
255  {
256  const unsigned numberOfPeriodicBoundaries = getHandler()->getDPMBase()->periodicBoundaryHandler.getSize();
257  if (numberOfPeriodicBoundaries > 0)
258  {
259  periodicComplexity_.resize(numberOfPeriodicBoundaries, 0);
260  }
261  }
262 
263  return periodicComplexity_[index];
264 }

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.

272 {
274 }

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_; }
Vec3D previousPosition_
Displacement (only used in StatisticsVector, StatisticsPoint)
Definition: BaseParticle.h:725

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 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(), NurbsWall::getDistanceAndNormal(), BasicIntersectionOfWalls::getDistanceAndNormal(), BasicUnionOfWalls::getDistanceAndNormal(), IntersectionOfWalls::getDistanceAndNormal(), SineWall::getDistanceAndNormal(), TriangleMeshWall::getDistanceAndNormal(), 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(), ParticleHandler::saveNumberPSDtoCSV(), Slide::set_Walls(), CGFields::StandardFields::setFields(), BaseInteraction::setFStatData(), SphericalIndenter::setIndenterHeight(), ClosedCSCWalls::setupInitialConditions(), CSCInit::setupInitialConditions(), CSCWalls::setupInitialConditions(), SmoothChute::setupInitialConditions(), MembraneDemo::setupInitialConditions(), ForceLawsMPI2Test::setupInitialConditions(), FreeCooling2DinWalls::setupInitialConditions(), HourGlass2D::setupInitialConditions(), HourGlass::setupInitialConditions(), MarbleRun::setupInitialConditions(), statistics_while_running< T >::setupInitialConditions(), StressStrainControl::setupInitialConditions(), NewtonsCradleSelfTest::setupInitialConditions(), ParticleCreation::setupInitialConditions(), ParticleParticleCollision::setupInitialConditions(), WallParticleCollision::setupInitialConditions(), HertzianBSHPInteractionTwoParticleElasticCollision::setupInitialConditions(), MembraneSelfTest::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(), CoupledBeam::setupMercury(), Slide::Slide(), statistics_while_running< T >::statistics_while_running(), SuperQuadricParticle::SuperQuadricParticle(), SingleParticle< SpeciesType >::writeEneTimeStep(), and DPMBase::writeFstatHeader().

◆ getRotationalEnergy()

Mdouble BaseParticle::getRotationalEnergy ( ) const
virtual

Calculates the particle's rotational kinetic energy.

Returns
the particle's rotational kinetic energy

Reimplemented in NonSphericalParticle, and ClumpParticle.

461 {
462  if (isFixed())
463  return 0.0;
464  else
466 }
MatrixSymmetric3D getInertia() const
Definition: BaseParticle.h:331
static Mdouble dot(const Vec3D &a, const Vec3D &b)
Calculates the dot product of two Vec3D: .
Definition: Vector.cc:76

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

Referenced by NonSphericalParticle::getRotationalEnergy().

◆ 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  }
Defines the basic properties that a interactable object can have.
Definition: BaseInteractable.h:55
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

References getInteractionDistance(), and getRadius().

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

◆ getSurfaceArea()

Mdouble BaseParticle::getSurfaceArea ( ) const
inline
326  { return 4.0*constants::pi*getRadius()*getRadius(); }

References getRadius(), and constants::pi.

◆ getTypeVTK()

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

Reimplemented in ClumpParticle.

842 {
843  return "";
844 }

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.

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

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

Referenced by DeletionBoundary::checkBoundaryAfterParticleMoved(), FluxBoundary::checkBoundaryAfterParticleMoved(), DPM::computeLocalVolumeFractionHGrid(), ScaleCoupling< M, O >::computeProjectionMatrix(), InitialConditions< SpeciesType >::InitialConditions(), LinearViscoelasticNormalSpecies::setCollisionTimeAndRestitutionCoefficient(), SPHNormalSpecies::setCollisionTimeAndRestitutionCoefficient(), CGFields::StandardFields::setFields(), ExtremeOverlapVolumeUnitTest::setupInitialConditions(), VerticalMixer::setupInitialConditions(), FreeCooling2DinWalls::setupInitialConditions(), and LeesEdwardsSelfTest::setupInitialConditions().

◆ getWallInteractionRadius()

◆ integrateAfterForceComputation()

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

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

Reimplemented in ClumpParticle.

763 {
764  if (getInvMass() == 0.0)
765  {
766  //Updates a baseParticle with a prescribed motion
768  }
769  else
770  {
771  accelerate(getForce() * getInvMass() * 0.5 * timeStep);
772  if (getHandler()->getDPMBase()->getRotation())
773  {
775  getOrientation().rotateInverseInertiaTensor(getInvInertia()) * getTorque() * 0.5 * timeStep);
776  }
777  }
778 }
const Quaternion & getOrientation() const
Returns the orientation of this BaseInteractable.
Definition: BaseInteractable.h:230
const Vec3D & getForce() const
Returns the force on this BaseInteractable.
Definition: BaseInteractable.h:126
void integrateAfterForceComputation(double time, double timeStep)
This is part of the integration routine for objects with infinite mass.
Definition: BaseInteractable.cc:611
const Vec3D & getTorque() const
Returns the torque on this BaseInteractable.
Definition: BaseInteractable.h:138
void angularAccelerate(const Vec3D &angVel)
Increases the particle's angularVelocity_ by the given vector.
Definition: BaseParticle.cc:644
void accelerate(const Vec3D &vel)
Increases the particle's velocity_ by the given vector.
Definition: BaseParticle.cc:634

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 
)
virtual

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

Reimplemented in ClumpParticle.

721 {
726 
727  if (getInvMass() == 0.0)
728  {
730  }
731  else
732  {
733 #ifdef MERCURYDPM_USE_MPI
734  //For periodic particles in parallel the previous position is required
736 #endif
737  accelerate(getForce() * getInvMass() * 0.5 * timeStep);
738  const Vec3D displacement = getVelocity() * timeStep;
739  move(displacement);
740  DPMBase* const dpm = getHandler()->getDPMBase();
741  if (!dpm->getHGridUpdateEachTimeStep())
742  {
743  dpm->hGridUpdateMove(this, displacement.getLengthSquared());
744  }
745 
746  if (dpm->getRotation())
747  {
749  getOrientation().rotateInverseInertiaTensor(getInvInertia()) * getTorque() * 0.5 * timeStep);
750  //apply to rotation quaternion q: q = normalise(q + \tilde{C}\omega*timeStep) (see Wouter's notes)
751  rotate(getAngularVelocity() * timeStep);
752  }
753  }
754 }
void integrateBeforeForceComputation(double time, double timeStep)
This is part of integrate routine for objects with infinite mass.
Definition: BaseInteractable.cc:538
virtual void move(const Vec3D &move)
Moves this BaseInteractable by adding an amount to the position.
Definition: BaseInteractable.cc:215
virtual void rotate(const Vec3D &angularVelocityDt)
Rotates this BaseInteractable.
Definition: BaseInteractable.cc:230
void setPreviousPosition(const Vec3D &pos)
Sets the particle's position in the previous time step.
Definition: BaseParticle.cc:614
The DPMBase header includes quite a few header files, defining all the handlers, which are essential....
Definition: DPMBase.h:77
virtual bool getHGridUpdateEachTimeStep() const
Definition: DPMBase.cc:1718
virtual void hGridUpdateMove(BaseParticle *, Mdouble)
Definition: DPMBase.cc:1933
bool getRotation() const
Indicates whether particle rotation is enabled or disabled.
Definition: DPMBase.h:570

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

◆ isClump()

◆ 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(), VolumeCoupling::computeExternalForces(), SphericalIndenter::computeExternalForces(), AngledPeriodicBoundarySecondUnitTest::computeExternalForces(), ScaleCoupling< M, O >::computeExternalForces(), DPMBase::computeInternalForce(), Mercury3Dclump::computeInternalForce(), ChuteWithPeriodicInflow::computeInternalForces(), computeMass(), ClumpParticle::computeMass(), SuperQuadricParticle::computeMass(), Mercury3D::computeWallForces(), ContractionWithPeriodicInflow::ContractionWithPeriodicInflow(), MPISphericalParticle::copyDataFromParticleToMPIParticle(), AngleOfRepose::createBaseSpecies(), SilbertPeriodic::createBaseSpecies(), getKineticEnergy(), ParticleHandler::getNumberOfFixedObjectsLocal(), getRotationalEnergy(), LawinenBox::printTime(), ChuteWithPeriodicInflow::printTime(), DPMBase::readNextDataFile(), DPMBase::readNextFStatFile(), 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.

866 {
867  if (P->getName() != "Superquadric")
868  {
869  return Vec3D::getDistanceSquared(getPosition(), P->getPosition()) <
871  }
872  return P->isInContactWith(this);
873 }
static Mdouble getDistanceSquared(const Vec3D &a, const Vec3D &b)
Calculates the squared distance between two Vec3D: .
Definition: Vector.h:311

References Vec3D::getDistanceSquared(), BaseInteractable::getPosition(), getSumOfInteractionRadii(), Global_Physical_Variables::P, and mathsFunc::square().

Referenced by DPMBase::areInContact().

◆ isInMPIDomain()

bool BaseParticle::isInMPIDomain ( )

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

277 {
278  return isInMPIDomain_;
279 }

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.

288 {
289  return isInPeriodicDomain_;
290 }

References isInPeriodicDomain_.

Referenced by PeriodicBoundaryHandler::checkIfAddNewParticle().

◆ isMaserParticle()

◆ isMPIParticle()

bool BaseParticle::isMPIParticle ( ) const

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

182 {
183  //make mpi-dependent so the compiler can optimise
184 #ifdef MERCURYDPM_USE_MPI
185  return isMPIParticle_;
186 #else
187  return false;
188 #endif
189 }

References isMPIParticle_.

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

◆ isPebble()

◆ isPeriodicGhostParticle()

◆ isSphericalParticle()

virtual bool BaseParticle::isSphericalParticle ( ) const
pure virtual

this flag is used to decide whether to compute orientation, which is not necessary for spherical particles

Todo:
This flag is used badly, and used to determine whether particles are superquadric

Implemented in SphericalParticle, NonSphericalParticle, and ClumpParticle.

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

◆ 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.
625 {
626  previousPosition_ += posMove;
627 }

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
387 {
388  logger(DEBUG, "reading particle old-style");
389  static unsigned int id = 0;
390  unsigned int indSpecies = 0;
391  unsigned int numberOfContacts = 0;
392  Vec3D orientation;
393  Vec3D position;
394  Vec3D velocity;
395  Vec3D angularVelocity;
396  double invInertiaScalar;
397  double dummy = 0;
398  is >> position >> velocity >> radius_ >> orientation >> angularVelocity;
399  is >> invMass_ >> invInertiaScalar >> numberOfContacts;
401  for (unsigned int i = 0; i < 12 * numberOfContacts; ++i)
402  {
403  is >> dummy;
404  }
405  is >> indSpecies;
406  setPosition(position);
407  setVelocity(velocity);
408  Quaternion q;
409  q.setEuler(orientation);
410  setOrientation(q);
411  setAngularVelocity(angularVelocity);
412  invInertia_.XX = invInertiaScalar;
413  invInertia_.YY = invInertiaScalar;
414  invInertia_.ZZ = invInertiaScalar;
415 
417  setId(id);
418  setIndex(id);
419  id++;
420 }
virtual void setOrientation(const Quaternion &orientation)
Sets the orientation of this BaseInteractable.
Definition: BaseInteractable.h:260
virtual void setPosition(const Vec3D &position)
Sets the position of this BaseInteractable.
Definition: BaseInteractable.h:239
virtual void setIndSpecies(unsigned int indSpecies)
Sets the index of the Species of this BaseInteractable.
Definition: BaseInteractable.h:98
void setIndex(unsigned int index)
Allows one to assign an index to an object in the handler/container.
Definition: BaseObject.cc:64
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 ZZ
Definition: MatrixSymmetric.h:42
Mdouble YY
Definition: MatrixSymmetric.h:42
Mdouble XX
The six distinctive matrix elements.
Definition: MatrixSymmetric.h:42
This class contains the 4 components of a quaternion and the standard operators and functions needed ...
Definition: Quaternion.h:63
void setEuler(const Vec3D &e)
Convert Euler angles to a quaternion. See Wikipedia for details.
Definition: Quaternion.cc:473

References DEBUG, 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.
428 {
429  os << "Particle( HGRID_Level:" << hGridCell.getHGridLevel()
430  << ", HGRID_x:" << hGridCell.getHGridX()
431  << ", HGRID_y:" << hGridCell.getHGridY()
432  << ", HGRID_z:" << hGridCell.getHGridZ()
433  << ")";
434 }

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 SuperQuadricParticle, and ClumpParticle.

375 {
377  std::string dummy;
378  is >> dummy >> radius_ >> dummy >> invMass_;// >> dummy >> invInertia_;
379 }
void read(std::istream &is) override
Reads a BaseInteractable from an input stream.
Definition: BaseInteractable.cc:244

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

Referenced by ClumpParticle::read(), SuperQuadricParticle::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.

197 {
198  communicationComplexity_ = complexity;
199 }

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
606 {
607  displacement_ = disp;
608 }

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
664 {
665  handler_ = handler;
666  setSpecies(getHandler()->getDPMBase()->speciesHandler.getObject(getIndSpecies()));
667 }
T * getObject(const unsigned int id)
Gets a pointer to the Object at the specified index in the BaseHandler.
Definition: BaseHandler.h:613
unsigned int getIndSpecies() const
Returns the index of the species associated with the interactable object.
Definition: BaseInteractable.h:88

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

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

795 {
796  if (handler_ != nullptr)
797  {
798  //BaseInteractable::setIndSpecies(indSpecies);
801  }
802  else
803  {
805  logger(ERROR, "setIndSpecies called on a particle with no particle handler.\n"
806  "Therefore I can't request the given species from the species handler.\n"
807  " PartID = %", getId());
808  }
809 }
SpeciesHandler speciesHandler
A handler to that stores the species type i.e. LinearViscoelasticSpecies, etc.
Definition: DPMBase.h:1427

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.
515 {
517 }
MatrixSymmetric3D inverse() const
Computes the inverse of a matrix; exits if the inverse doesn't exist.
Definition: MatrixSymmetric.cc:298

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.

529 {
531 
532 // Clump* f;
533 // f->invInertia2_.setZero();
534 } //> i.e. no rotations
void setZero()
Sets all elements to zero.
Definition: MatrixSymmetric.cc:70

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

354 {
355  info_ = info;
356 }

References info_.

◆ setInMPIDomain()

void BaseParticle::setInMPIDomain ( bool  flag)

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

282 {
283  isInMPIDomain_ = flag;
284 }

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)

520 {
521  invInertia_ = inverseInertia;
522 }

References invInertia_.

◆ setMaserParticle()

void BaseParticle::setMaserParticle ( bool  flag)

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

313 {
314  isMaserParticle_ = flag;
315 }

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
569 {
570  logger(WARN, "WARNING: Do not use particle->setMass, instead use "
571  "particleSpecies->computeMass, since this function can cause "
572  "inconsistencies between the mass, density and radius of this particle!");
573  logger.assert_always(mass > 0.0 && !isFixed(),
574  "Error in BaseParticle::setMass, the given mass to be set must be positive.");
575 
576  invMass_ = 1.0 / mass;
577 }
@ WARN

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
590 {
591  if (mass > 0.0 && !isFixed())
592  {
593  invMass_ = 1.0 / mass;
594  }
595  else
596  {
597  logger(ERROR, "Error in BaseParticle::setMass, the given mass to be set must be positive.");
598  }
599 }

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.

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

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

◆ setPeriodicComplexity() [2/2]

void BaseParticle::setPeriodicComplexity ( std::vector< int >  complexity)

◆ setPeriodicFromParticle()

◆ setPeriodicGhostParticle()

void BaseParticle::setPeriodicGhostParticle ( bool  flag)

◆ setPreviousPeriodicComplexity()

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

Set the previous periodic communication complexity of the paritcle.

267 {
268  previousPeriodicComplexity_ = complexity;
269 }

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.
615 {
616  previousPosition_ = pos;
617 }

References previousPosition_.

Referenced by integrateBeforeForceComputation(), ClumpParticle::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.

554 {
555  radius_ = radius;
556  if (getHandler())
557  {
558  getSpecies()->computeMass(this);
559  getHandler()->checkExtrema(this);
560  }
561 
562 }
void checkExtrema(BaseParticle *P)
Checks if the extrema of this ParticleHandler needs updating.
Definition: ParticleHandler.cc:1173
void computeMass(BaseParticle *p) const
Compute Particle mass function, which required a reference to the Species vector. It computes the Par...
Definition: ParticleSpecies.cc:167

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

Referenced by ClumpParticle::actionsAfterAddObject(), SmoothChute::actionsBeforeTimeStep(), Chutebelt::actionsOnRestart(), NautaMixer::addParticles(), NautaMixer::addParticlesAtWall(), BaseWall::addParticlesAtWall(), ClumpParticle::ClumpParticle(), 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(), BasicIntersectionOfWalls::getDistanceAndNormal(), BasicUnionOfWalls::getDistanceAndNormal(), TriangleMeshWall::getDistanceAndNormal(), BasicIntersectionOfWalls::getVTK(), BasicUnionOfWalls::getVTK(), InitialConditions< SpeciesType >::InitialConditions(), HorizontalMixer::introduceParticlesAtWall(), ContactDetectionIntersectionOfWallsTest::introduceParticlesAtWall(), HorizontalMixer::introduceParticlesInDomain(), HorizontalMixer::introduceSingleParticle(), load(), loadingTest(), main(), MercuryCGSelfTest::MercuryCGSelfTest(), normalAndTangentialLoadingTest(), objectivenessTest(), ParticleBeam::ParticleBeam(), ParticleInclusion::ParticleInclusion(), BaseCluster::particleInsertionSuccessful(), FileReader::read(), DPMBase::readNextDataFile(), regimeForceUnitTest::regimeForceUnitTest(), SuperQuadricParticle::setBoundingRadius(), MarbleRun::setParticleRadius(), ExtremeOverlapUnitTest::setupInitialConditions(), ExtremeOverlapVolumeUnitTest::setupInitialConditions(), ClosedCSCWalls::setupInitialConditions(), CSCInit::setupInitialConditions(), CSCWalls::setupInitialConditions(), MercuryLogo::setupInitialConditions(), SmoothChute::setupInitialConditions(), multiParticleT1::setupInitialConditions(), RandomClusterInsertionBoundarySelfTest::setupInitialConditions(), VerticalMixer::setupInitialConditions(), MembraneDemo::setupInitialConditions(), Binary::setupInitialConditions(), my_problem::setupInitialConditions(), Chain::setupInitialConditions(), ForceLawsMPI2Test::setupInitialConditions(), InsertionBoundaryMPI2Test::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(), ShiftingConstantMassFlowMaserBoundarySelfTest::setupInitialConditions(), ShiftingMaserBoundarySelfTest::setupInitialConditions(), FiveParticles::setupInitialConditions(), Cstatic2d::setupInitialConditions(), Cstatic3D::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(), clumpTest::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(), HertzianBSHPInteractionTwoParticleElasticCollision::setupInitialConditions(), ObliqueImpactSelfTest::setupInitialConditions(), TwoBondedParticleElasticCollision::setupInitialConditions(), CoilSelfTest::setupInitialConditions(), GetDistanceAndNormalForTriangleWalls::setupInitialConditions(), MembraneSelfTest::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(), Tutorial11::setupInitialConditions(), Tutorial12::setupInitialConditions(), Tutorial1::setupInitialConditions(), Tutorial2::setupInitialConditions(), Tutorial3::setupInitialConditions(), Tutorial4::setupInitialConditions(), Tutorial5::setupInitialConditions(), Tutorial6::setupInitialConditions(), Tutorial7::setupInitialConditions(), Tutorial8::setupInitialConditions(), Tutorial9::setupInitialConditions(), AngledPeriodicBoundarySecondUnitTest::setupInitialConditions(), AngledPeriodicBoundaryUnitTest::setupInitialConditions(), Packing::setupInitialConditions(), CreateDataAndFStatFiles::setupInitialConditions(), ChargedBondedParticleUnitTest::setupInitialConditions(), ExtremeOverlapWithWallsUnitTest::setupInitialConditions(), FreeFallHertzMindlinUnitTest::setupInitialConditions(), FreeFall::setupInitialConditions(), HertzianSinterForceUnitTest::setupInitialConditions(), MD_demo::setupInitialConditions(), InclinedPlane::setupInitialConditions(), MpiMaserChuteTest::setupInitialConditions(), MovingIntersectionOfWallsUnitTest_Basic::setupInitialConditions(), MovingWalls::setupInitialConditions(), MovingWall::setupInitialConditions(), MultiParticlesInsertion::setupInitialConditions(), MpiPeriodicBoundaryUnitTest::setupInitialConditions(), PeriodicWallsWithSlidingFrictionUnitTest::setupInitialConditions(), PlasticForceUnitTest::setupInitialConditions(), SeparateFilesSelfTest::setupInitialConditions(), SinterForceUnitTest::setupInitialConditions(), SpeciesTest::setupInitialConditions(), TangentialSpringEnergyConservationUnitTest::setupInitialConditions(), TangentialSpringUnitTest::setupInitialConditions(), WallSpecies::setupInitialConditions(), ChuteBottom::setupInitialConditions(), MembraneDemo::setUpMembrane(), MembraneSelfTest::setUpMembrane(), ScaleCoupledBeam::setupMercury(), CoupledBeam::setupMercury(), CoupledProblem::setupMercury(), Siegen::Siegen(), SinterPair::SinterPair(), 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?
819 {
822  //set pointer to the ParticleHandler handler_, which is needed to retrieve
823  //species information
824  //\todo maybe these if statements should throw warnings
825  if (handler_ == nullptr)
826  {
827  SpeciesHandler* sH = species->getHandler();
828  DPMBase* dB = sH->getDPMBase();
829  if (dB != nullptr)
830  {
832  }
833  }
834 }
void setSpecies(const ParticleSpecies *species)
Sets the species of this BaseInteractable.
Definition: BaseInteractable.cc:185
void setHandler(ParticleHandler *handler)
Sets the pointer to the particle's ParticleHandler.
Definition: BaseParticle.cc:663
SpeciesHandler * getHandler() const
Returns the pointer to the handler to which this species belongs.
Definition: BaseSpecies.cc:99
ParticleHandler particleHandler
An object of the class ParticleHandler, contains the pointers to all the particles created.
Definition: DPMBase.h:1437
Container to store all ParticleSpecies.
Definition: SpeciesHandler.h:37

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

Referenced by ClumpParticle::actionsAfterAddObject(), SmoothChute::actionsBeforeTimeStep(), Chutebelt::actionsOnRestart(), ChuteWithPeriodicInflow::AddContinuingBottom(), NautaMixer::addParticles(), NautaMixer::addParticlesAtWall(), BaseWall::addParticlesAtWall(), ConstantMassFlowMaserBoundary::addParticleToMaser(), SubcriticalMaserBoundary::addParticleToMaser(), BaseParticle(), BoundariesSelfTest::BoundariesSelfTest(), ConstantMassFlowMaserBoundary::checkBoundaryAfterParticleMoved(), SubcriticalMaserBoundary::checkBoundaryAfterParticleMoved(), 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(), TriangleMeshWall::getDistanceAndNormal(), BasicIntersectionOfWalls::getVTK(), BasicUnionOfWalls::getVTK(), Hertzian2DUnitTest::Hertzian2DUnitTest(), InitialConditions< SpeciesType >::InitialConditions(), ChuteWithPeriodicInflow::integrateBeforeForceComputation(), HorizontalMixer::introduceParticlesAtWall(), ContactDetectionIntersectionOfWallsTest::introduceParticlesAtWall(), HorizontalMixer::introduceParticlesInDomain(), HorizontalMixer::introduceSingleParticle(), LawinenBox::LawinenBox(), loadingTest(), main(), MercuryCGSelfTest::MercuryCGSelfTest(), MovingWall::MovingWall(), normalAndTangentialLoadingTest(), objectivenessTest(), ParticleInclusion::ParticleInclusion(), BaseCluster::particleInsertionSuccessful(), protectiveWall::protectiveWall(), FileReader::read(), InsertionBoundary::read(), ParticleHandler::readAndCreateObject(), DPMBase::readNextDataFile(), regimeForceUnitTest::regimeForceUnitTest(), ConstantMassFlowMaserBoundary::removeParticleFromMaser(), SubcriticalMaserBoundary::removeParticleFromMaser(), setHandler(), setIndSpecies(), ExtremeOverlapUnitTest::setupInitialConditions(), ExtremeOverlapVolumeUnitTest::setupInitialConditions(), ClosedCSCWalls::setupInitialConditions(), CSCInit::setupInitialConditions(), CSCWalls::setupInitialConditions(), MercuryLogo::setupInitialConditions(), SmoothChute::setupInitialConditions(), multiParticleT1::setupInitialConditions(), VerticalMixer::setupInitialConditions(), MembraneDemo::setupInitialConditions(), Binary::setupInitialConditions(), my_problem::setupInitialConditions(), ForceLawsMPI2Test::setupInitialConditions(), InsertionBoundaryMPI2Test::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(), LeesEdwardsDemo::setupInitialConditions(), MinimalExampleDrum::setupInitialConditions(), ShiftingConstantMassFlowMaserBoundarySelfTest::setupInitialConditions(), ShiftingMaserBoundarySelfTest::setupInitialConditions(), TimeDependentPeriodicBoundary3DSelfTest::setupInitialConditions(), TimeDependentPeriodicBoundaryTest::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(), clumpTest::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(), HertzianBSHPInteractionTwoParticleElasticCollision::setupInitialConditions(), ObliqueImpactSelfTest::setupInitialConditions(), TwoBondedParticleElasticCollision::setupInitialConditions(), TwoParticleElasticCollisionInteraction::setupInitialConditions(), TwoParticleElasticCollision::setupInitialConditions(), CoilSelfTest::setupInitialConditions(), GetDistanceAndNormalForTriangleWalls::setupInitialConditions(), MembraneSelfTest::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(), Tutorial11::setupInitialConditions(), Tutorial12::setupInitialConditions(), Tutorial1::setupInitialConditions(), Tutorial2::setupInitialConditions(), Tutorial3::setupInitialConditions(), Tutorial4::setupInitialConditions(), Tutorial5::setupInitialConditions(), Tutorial6::setupInitialConditions(), Tutorial7::setupInitialConditions(), Tutorial8::setupInitialConditions(), Tutorial9::setupInitialConditions(), AngledPeriodicBoundarySecondUnitTest::setupInitialConditions(), AngledPeriodicBoundaryUnitTest::setupInitialConditions(), ArcWallUnitTest::setupInitialConditions(), Packing::setupInitialConditions(), CreateDataAndFStatFiles::setupInitialConditions(), ChargedBondedParticleUnitTest::setupInitialConditions(), DrivenParticleClass::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(), MultiParticlesInsertion::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(), MembraneSelfTest::setUpMembrane(), ContactDetectionWithWallTester::setupParticleAndWall(), ContactDetectionTester::setupParticles(), SilbertPeriodic::SilbertPeriodic(), 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.

323 {
324  invMass_ = 1.0;
325  getSpecies()->computeMass(this);
326  if (getHandler())
328 }

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 SuperQuadricParticle, and ClumpParticle.

337 {
339  os << " radius " << radius_
340  << " invMass " << invMass_;
341  //invMass_ is a computed value, but needs to be stored to see if a particle is fixed
342 }
void write(std::ostream &os) const override
Write a BaseInteractable to an output stream.
Definition: BaseInteractable.cc:274

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

Referenced by ClumpParticle::write(), and SuperQuadricParticle::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

◆ clumpParticle

BaseParticle* BaseParticle::clumpParticle

Function that updates necessary quantities of a clump particle after adding a pebble.

Referenced by ClumpParticle::ClumpParticle(), getClump(), and ClumpParticle::setClump().

◆ 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_

◆ isClump_

◆ 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().

◆ isPebble_

bool BaseParticle::isPebble_

pointer to a clump particle (for a pebble)

Referenced by BaseParticle(), ClumpParticle::ClumpParticle(), isPebble(), and ClumpParticle::setClump().

◆ 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: