|
#include <BaseParticle.h>
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 BaseParticle * | copy () 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... | |
BaseParticle * | getHGridNextObject () const |
Returns pointer to next object in particle's HGrid level & cell. More... | |
BaseParticle * | getHGridPrevObject () 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 |
BaseParticle * | getPeriodicFromParticle () 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 Vec3D & | getDisplacement () const |
Returns the particle's displacement relative to the previous time step. More... | |
const Vec3D & | getPreviousPosition () 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... | |
ParticleHandler * | getHandler () const |
Returns pointer to the particle's ParticleHandler. More... | |
BaseInteraction * | getInteractionWith (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< Mdouble > | getFieldVTK (unsigned i) const |
virtual void | actionsAfterTimeStep () |
virtual bool | isSphericalParticle () const =0 |
const HGridCell & | getHGridCell () const |
virtual void | computeMass (const ParticleSpecies &s) |
Computes the particle's (inverse) mass and inertia. More... | |
BaseParticle * | getClump () 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 ParticleSpecies * | getSpecies () const |
Returns a pointer to the species of this BaseInteractable. More... | |
void | setSpecies (const ParticleSpecies *species) |
Sets the species of this BaseInteractable. More... | |
const Vec3D & | getForce () const |
Returns the force on this BaseInteractable. More... | |
const Vec3D & | getTorque () 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 Vec3D & | getPosition () const |
Returns the position of this BaseInteractable. More... | |
const Quaternion & | getOrientation () 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 Vec3D & | getVelocity () const |
Returns the velocity of this interactable. More... | |
virtual const Vec3D & | getAngularVelocity () 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... | |
BaseParticle * | clumpParticle |
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 | |
ParticleHandler * | handler_ |
Inverse Particle inverse inertia (for computation optimization) More... | |
HGridCell | hGridCell |
BaseParticle * | hGridNextObject_ |
BaseParticle * | hGridPrevObject_ |
Pointer to the next Particle in the same HGrid cell. More... | |
BaseParticle * | periodicFromParticle_ |
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... | |
Since r3648, BaseParticle is an abstract class. Use SphericalParticle for a 'basic' particle.
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
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::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.
[in,out] | p | Reference to the BaseParticle this one should become a copy of. |
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().
|
explicit |
References DEBUG, logger, and setSpecies().
|
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.
References ParticleHandler::checkExtremaOnDelete(), DEBUG, getHandler(), BaseObject::getId(), isFixed(), logger, and ParticleHandler::removedFixedParticle().
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.
[in] | vel | vector to be added to the velocity_ |
References BaseInteractable::addVelocity().
Referenced by integrateAfterForceComputation(), ClumpParticle::integrateAfterForceComputation(), integrateBeforeForceComputation(), ClumpParticle::integrateBeforeForceComputation(), and MovingIntersectionOfWallsUnitTest_MovingReferenceFrame::setupInitialConditions().
|
inlinevirtual |
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.
[in] | addDisp | vector to be added. |
References displacement_.
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.
[in] | angVel | vector to be added to the angularVelocity_ |
References BaseInteractable::addAngularVelocity().
Referenced by integrateAfterForceComputation(), and integrateBeforeForceComputation().
|
virtual |
Computes the particle's (inverse) mass and inertia.
Reimplemented in SuperQuadricParticle, and ClumpParticle.
References ParticleSpecies::getDensity(), getMass(), getParticleDimensions(), getRadius(), invInertia_, invMass_, isFixed(), constants::pi, and mathsFunc::square().
Referenced by ParticleSpecies::computeMass(), and ChuteWithContraction::create_inflow_particle().
|
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().
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.
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().
Vec3D BaseParticle::getAngularMomentum | ( | ) | const |
References Vec3D::cross(), BaseInteractable::getAngularVelocity(), BaseInteractable::getPosition(), BaseInteractable::getVelocity(), MatrixSymmetric3D::inverse(), invInertia_, and invMass_.
|
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.
Referenced by MPISuperQuadric::copyDataFromParticleToMPIParticle(), and BaseWall::getInteractionWith().
|
inline |
References clumpParticle.
Referenced by Mercury3Dclump::computeInternalForce().
unsigned BaseParticle::getCommunicationComplexity | ( | ) |
Obtains the communication complexity of the particle.
References communicationComplexity_.
Referenced by MPISphericalParticle::copyDataFromParticleToMPIParticle(), and Domain::updateParticles().
returns the inverse radius, or curvature, of the surface. This value is zero for walls and gets overridden for particles that have finite radius
Reimplemented from BaseInteractable.
Reimplemented in SuperQuadricParticle.
References radius_.
|
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.
References displacement_.
Referenced by FluxBoundary::checkBoundaryAfterParticleMoved().
const Vec3D BaseParticle::getDisplacement2 | ( | Mdouble | xmin, |
Mdouble | xmax, | ||
Mdouble | ymin, | ||
Mdouble | ymax, | ||
Mdouble | zmin, | ||
Mdouble | zmax, | ||
Mdouble | t | ||
) | const |
References BaseInteractable::getPosition(), getPreviousPosition(), Vec3D::X, Vec3D::Y, and Vec3D::Z.
|
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.
Referenced by MPISuperQuadric::copyDataFromParticleToMPIParticle(), and BaseWall::getInteractionWith().
|
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.
Referenced by MPISuperQuadric::copyDataFromParticleToMPIParticle(), and BaseWall::getInteractionWith().
|
virtual |
Reimplemented in ClumpParticle.
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.
ParticleHandler * BaseParticle::getHandler | ( | ) | const |
Returns pointer to the particle's ParticleHandler.
Returns the particle's ParticleHandler
References handler_.
Referenced by ClumpParticle::actionsAfterAddObject(), HeatFluidCoupledSpecies< NormalForceSpecies >::actionsAfterTimeStep(), copyDataFromMPIParticleToParticle(), fixParticle(), getParticleDimensions(), getPeriodicComplexity(), SuperQuadricParticle::getVolume(), integrateAfterForceComputation(), integrateBeforeForceComputation(), ClumpParticle::integrateBeforeForceComputation(), setHandler(), setPeriodicComplexity(), setRadius(), unfix(), ~BaseParticle(), and SuperQuadricParticle::~SuperQuadricParticle().
|
inline |
References hGridCell.
Referenced by DPM::computeLocalCGHGrid(), DPM::computeLocalVolumeFractionHGrid(), Mercury3D::computeWallForces(), Mercury3D::hGridFindContactsWithinTargetCell(), Mercury2D::hGridFindContactsWithinTargetCell(), Mercury3D::hGridFindContactsWithTargetCell(), Mercury2D::hGridFindContactsWithTargetCell(), Mercury2D::hGridFindParticleContacts(), Mercury3D::hGridFindParticleContacts(), Mercury3D::hGridFindParticlesWithTargetCell(), Mercury2D::hGridFindParticlesWithTargetCell(), Mercury3D::hGridHasContactsInTargetCell(), Mercury2D::hGridHasContactsInTargetCell(), and Mercury3D::hGridRemoveParticle().
|
inline |
Returns particle's HGrid level.
References HGridCell::getHGridLevel(), and hGridCell.
Referenced by BaseParticle(), Mercury2D::computeInternalForces(), Mercury3D::computeInternalForces(), MPISphericalParticle::copyDataFromParticleToMPIParticle(), Mercury2D::hGridGetInteractingParticleList(), Mercury3D::hGridGetInteractingParticleList(), Mercury2D::hGridRemoveParticle(), MercuryBase::hGridUpdateMove(), Mercury2D::hGridUpdateParticle(), and Mercury3D::hGridUpdateParticle().
|
inline |
Returns pointer to next object in particle's HGrid level & cell.
Returns the next object in the particle's HGrid cell
References hGridNextObject_.
Referenced by DPM::computeLocalCGHGrid(), DPM::computeLocalVolumeFractionHGrid(), Mercury3D::computeWallForces(), Mercury3D::hGridFindContactsWithinTargetCell(), Mercury2D::hGridFindContactsWithinTargetCell(), Mercury3D::hGridFindContactsWithTargetCell(), Mercury2D::hGridFindContactsWithTargetCell(), Mercury2D::hGridFindParticleContacts(), Mercury3D::hGridFindParticleContacts(), Mercury3D::hGridFindParticlesWithTargetCell(), Mercury2D::hGridFindParticlesWithTargetCell(), Mercury3D::hGridHasContactsInTargetCell(), Mercury2D::hGridHasContactsInTargetCell(), Mercury2D::hGridRemoveParticle(), and Mercury3D::hGridRemoveParticle().
|
inline |
Returns pointer to previous object in particle's HGrid level & cell.
Returns the previous object in the particle's HGrid cell
References hGridPrevObject_.
Referenced by Mercury2D::hGridRemoveParticle(), and Mercury3D::hGridRemoveParticle().
|
inline |
Returns particle's HGrid cell X-coordinate.
References HGridCell::getHGridX(), and hGridCell.
Referenced by Mercury2D::computeInternalForces(), Mercury3D::computeInternalForces(), Mercury2D::hGridRemoveParticle(), Mercury2D::hGridUpdateParticle(), and Mercury3D::hGridUpdateParticle().
|
inline |
Returns particle's HGrid cell Y-coordinate.
References HGridCell::getHGridY(), and hGridCell.
Referenced by Mercury2D::computeInternalForces(), Mercury3D::computeInternalForces(), Mercury2D::hGridRemoveParticle(), Mercury2D::hGridUpdateParticle(), and Mercury3D::hGridUpdateParticle().
|
inline |
Returns particle's HGrid cell Z-coordinate.
References HGridCell::getHGridZ(), and hGridCell.
Referenced by Mercury3D::computeInternalForces(), and Mercury3D::hGridUpdateParticle().
|
inline |
References MatrixSymmetric3D::inverse(), and invInertia_.
Referenced by ClumpParticle::angularAccelerateClumpIterative(), getRotationalEnergy(), ClumpParticle::getRotationalEnergy(), and InertiaTensorTester::test().
|
virtual |
Returns some user-defined information about this object (by default, species ID).
References BaseObject::getId(), BaseInteractable::getSpecies(), and info_.
Referenced by DPMBase::getInfo().
|
inline |
Returns the interactionDistance_ of the mixed species of this particle and the particle or wall i.
References BaseSpecies::getInteractionDistance(), ParticleSpecies::getMixedSpecies(), BaseInteractable::getSpecies(), and constants::i.
Referenced by getSumOfInteractionRadii(), and getWallInteractionRadius().
|
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.
[in] | P | particle to check the interaction with |
[in] | timeStamp | time stamp to be assigned to the interaction object (i.e., the current time) |
[in,out] | interactionHandler | BaseInteraction container from where the interaction is retrieved, and to which it is assigned (if it is a new interaction). |
Implements BaseInteractable.
Reimplemented in SuperQuadricParticle.
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().
|
inline |
Returns the inverse of the particle's inertia tensor.
References invInertia_.
Referenced by BaseParticle(), integrateAfterForceComputation(), and integrateBeforeForceComputation().
|
inlineoverridevirtual |
Returns the inverse of the particle's mass.
Reimplemented from BaseInteractable.
References invMass_.
Referenced by BaseParticle(), integrateAfterForceComputation(), ClumpParticle::integrateAfterForceComputation(), integrateBeforeForceComputation(), and ClumpParticle::integrateBeforeForceComputation().
|
virtual |
Calculates the particle's translational kinetic energy.
Calculates the particle's kinetic energy
Reimplemented in NonSphericalParticle, and ClumpParticle.
References Vec3D::getLengthSquared(), getMass(), BaseInteractable::getVelocity(), and isFixed().
Referenced by NonSphericalParticle::getKineticEnergy().
|
inline |
Returns the particle's mass.
References invMass_.
Referenced by LawinenBox::actionsBeforeTimeStep(), DeletionBoundary::checkBoundaryAfterParticleMoved(), FluxBoundary::checkBoundaryAfterParticleMoved(), DPMBase::computeExternalForces(), VolumeCoupling::computeExternalForces(), AngledPeriodicBoundarySecondUnitTest::computeExternalForces(), ScaleCoupling< M, O >::computeExternalForces(), ChuteWithPeriodicInflow::computeInternalForces(), computeMass(), ScalingTestInitialConditionsRelax::continueSolve(), getKineticEnergy(), ParticleBeam::ParticleBeam(), LawinenBox::printTime(), CGFields::GradVelocityField::setFields(), CGFields::StandardFields::setFields(), multiParticleT1::setupInitialConditions(), free_cooling::setupInitialConditions(), restart::setupInitialConditions(), FreeCooling2DinWallsDemo::setupInitialConditions(), FreeCooling3DDemoProblem::setupInitialConditions(), FreeCooling3DinWallsDemo::setupInitialConditions(), FreeCoolingDemoProblem::setupInitialConditions(), ParticleParticleCollision::setupInitialConditions(), WallParticleCollision::setupInitialConditions(), HertzianBSHPInteractionTwoParticleElasticCollision::setupInitialConditions(), RollingOverTriangleWalls::setupInitialConditions(), Wall::setupInitialConditions(), MercuryProblem::setupInitialConditions(), BaseCluster::setupInitialConditions(), ScaleCoupledBeam::setupMercury(), Siegen::Siegen(), and Slide::Slide().
|
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).
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().
|
inline |
References BaseInteractable::getVelocity(), and invMass_.
|
overridevirtual |
Returns the name of the object.
Returns the name of the object; in this case 'BaseParticle'.
Implements BaseObject.
Reimplemented in NonSphericalParticle, SuperQuadricParticle, SphericalParticle, and ClumpParticle.
Referenced by MeshTriangle::getInteractionWith().
|
virtual |
Reimplemented in ClumpParticle.
Referenced by ParticleVtkWriter::writeExtraFields().
|
virtual |
Reimplemented in ClumpParticle.
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)
References BaseHandler< T >::getDPMBase(), getHandler(), and DPMBase::getParticleDimensions().
Referenced by computeMass(), SuperQuadricParticle::computeMass(), and getVolume().
const std::vector< int > & BaseParticle::getPeriodicComplexity | ( | ) |
Obtains the periodic communication complexity of the particle.
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().
int BaseParticle::getPeriodicComplexity | ( | int | index | ) |
Gets the periodic communication complexity of a certain boundary.
References BaseHandler< T >::getDPMBase(), getHandler(), BaseHandler< T >::getSize(), DPMBase::periodicBoundaryHandler, and periodicComplexity_.
|
inline |
Returns the 'original' particle this one's a periodic copy of.
Returns a pointer to the 'original' particle if the current one is a 'periodic copy' used for a periodic boundary implementation.
References periodicFromParticle_.
Referenced by SilbertPeriodic::add_flow_particles(), ChuteWithPeriodicInflow::Check_and_Duplicate_Periodic_Particle(), DPMBase::computeForcesDueToWalls(), Mercury3Dclump::computeForcesDueToWalls(), DPMBase::computeInternalForce(), Mercury3Dclump::computeInternalForce(), ChuteWithPeriodicInflow::computeInternalForces(), Mercury3D::computeWallForces(), WearableNurbsWall::computeWear(), WearableTriangleMeshWall::computeWear(), WearableTriangulatedWall::computeWear(), ConstantMassFlowMaserBoundary::createGhostCopy(), SubcriticalMaserBoundary::createGhostCopy(), PeriodicBoundary::createGhostParticle(), TimeDependentPeriodicBoundary::createGhostParticle(), LeesEdwardsBoundary::createHorizontalPeriodicParticle(), ShearBoxBoundary::createHorizontalPeriodicParticle(), AngledPeriodicBoundary::createPeriodicParticle(), CircularPeriodicBoundary::createPeriodicParticle(), LeesEdwardsBoundary::createVerticalPeriodicParticle(), ShearBoxBoundary::createVerticalPeriodicParticle(), DPMBase::removeDuplicatePeriodicParticles(), and InteractionHandler::removeObjectKeepingPeriodics().
const std::vector< int > & BaseParticle::getPreviousPeriodicComplexity | ( | ) | const |
Sets the previous periodic communication complexity of the particle.
References previousPeriodicComplexity_.
Referenced by PeriodicBoundaryHandler::updateParticles(), and PeriodicBoundaryHandler::updateParticleStatus().
|
inline |
Returns the particle's position in the previous time step.
Returns the particle's position in the previous time step.
References previousPosition_.
Referenced by getDisplacement2(), and PeriodicBoundaryHandler::updateParticles().
|
inline |
Returns the particle's 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().
|
virtual |
Calculates the particle's rotational kinetic energy.
Reimplemented in NonSphericalParticle, and ClumpParticle.
References Vec3D::dot(), BaseInteractable::getAngularVelocity(), getInertia(), and isFixed().
Referenced by NonSphericalParticle::getRotationalEnergy().
|
inline |
returns the sum of the radii plus the interactionDistance
References getInteractionDistance(), and getRadius().
Referenced by DPMBase::checkParticleForInteractionLocal(), Domain::findNewMPIInteractions(), SuperQuadricParticle::getInitialGuessForContact(), getInteractionWith(), and isInContactWith().
|
inline |
References getRadius(), and constants::pi.
|
virtual |
Reimplemented in ClumpParticle.
Referenced by ParticleVtkWriter::writeExtraFields().
|
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.
Reimplemented in SuperQuadricParticle.
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().
returns the radius plus the interactionDistance
References getInteractionDistance(), and getRadius().
Referenced by ArcWall::getDistanceAndNormal(), AxisymmetricIntersectionOfWalls::getDistanceAndNormal(), HorizontalBaseScrew::getDistanceAndNormal(), HorizontalScrew::getDistanceAndNormal(), ScrewsymmetricIntersectionOfWalls::getDistanceAndNormal(), BasicIntersectionOfWalls::getDistanceAndNormal(), Coil::getDistanceAndNormal(), Combtooth::getDistanceAndNormal(), InfiniteWall::getDistanceAndNormal(), LevelSetWall::getDistanceAndNormal(), ParabolaChute::getDistanceAndNormal(), RestrictedWall::getDistanceAndNormal(), SineWall::getDistanceAndNormal(), SphericalWall::getDistanceAndNormal(), TriangleMeshWall::getDistanceAndNormal(), TriangleWall::getDistanceAndNormal(), TriangulatedWall::getDistanceAndNormal(), VChute::getDistanceAndNormal(), InfiniteWall::getDistanceNormalOverlapSuperquadric(), MeshTriangle::getDistanceNormalOverlapType(), RestrictedWall::getInteractionWith(), TriangleMeshWall::getInteractionWith(), and TriangulatedWall::getInteractionWith().
Second step of Velocity Verlet integration.
Second step of Velocity Verlet integration (see also http://en.wikipedia.org/wiki/Verlet_integration#Velocity_Verlet).
[in] | time | current time |
[in] | timeStep | current time step |
Reimplemented in ClumpParticle.
References accelerate(), angularAccelerate(), BaseInteractable::getForce(), getHandler(), getInvInertia(), getInvMass(), BaseInteractable::getOrientation(), BaseInteractable::getTorque(), and BaseInteractable::integrateAfterForceComputation().
Referenced by DPMBase::integrateAfterForceComputation().
First step of Velocity Verlet integration.
First step of Velocity Verlet integration (see also http://en.wikipedia.org/wiki/Verlet_integration#Velocity_Verlet).
[in] | time | current time |
[in] | timeStep | current time step |
Reimplemented in ClumpParticle.
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().
|
inline |
Checks if particle is a clump (container)
References isClump_.
Referenced by ClumpParticle::actionsAfterAddObject(), BaseParticle(), Mercury3Dclump::checkClumpForInteraction(), Mercury3Dclump::checkClumpForInteractionPeriodic(), Mercury3Dclump::computeForcesDueToWalls(), Mercury3Dclump::computeInternalForce(), ClumpParticle::computeMass(), and PeriodicBoundary::createPeriodicParticle().
|
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.
Implements BaseInteractable.
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().
|
virtual |
Get whether or not this particle is in contact with the given particle.
Reimplemented in SuperQuadricParticle.
References Vec3D::getDistanceSquared(), BaseInteractable::getPosition(), getSumOfInteractionRadii(), Global_Physical_Variables::P, and mathsFunc::square().
Referenced by DPMBase::areInContact().
bool BaseParticle::isInMPIDomain | ( | ) |
Indicates if the particle is in the communication zone of the mpi domain.
References isInMPIDomain_.
Referenced by DeletionBoundary::checkBoundaryAfterParticleMoved(), Domain::findNewMPIInteractions(), Domain::findNewMPIParticle(), and PeriodicBoundaryHandler::updateParticleStatus().
bool BaseParticle::isInPeriodicDomain | ( | ) | const |
Indicates if the particle is in the periodic boundary communication zone.
References isInPeriodicDomain_.
Referenced by PeriodicBoundaryHandler::checkIfAddNewParticle().
bool BaseParticle::isMaserParticle | ( | ) | const |
Indicates if this particle belongs to the maser boundary.
References isMaserParticle_.
Referenced by SubcriticalMaserBoundaryTEST::checkBoundaryAfterParticleMoved(), MPISphericalParticle::copyDataFromParticleToMPIParticle(), SubcriticalMaserBoundaryTEST::createPeriodicParticle(), SubcriticalMaserBoundaryTEST::modifyGhostAfterCreation(), SubcriticalMaserBoundaryTEST::modifyPeriodicComplexity(), and PeriodicBoundaryHandler::updateMaserParticle().
bool BaseParticle::isMPIParticle | ( | ) | const |
Indicates if this particle is a ghost in the MPI domain.
References isMPIParticle_.
Referenced by InteractionHandler::getLiquidBridgeVolume(), InteractionHandler::getNumberOfLiquidBridges(), DPMBase::integrateAfterForceComputation(), DPMBase::integrateBeforeForceComputation(), DPMBase::outputXBallsData(), ParticleVtkWriter::particleMustBeWritten(), Membrane::saveVertexPositions(), and PeriodicBoundaryHandler::updateParticleStatus().
|
inline |
Checks if particle is a pebble (belongs to a clump)
References isPebble_.
Referenced by ClumpParticle::actionsAfterAddObject(), BaseParticle(), DPMBase::computeExternalForces(), Mercury3Dclump::computeInternalForce(), ClumpParticle::computeMass(), ClumpParticle::integrateAfterForceComputation(), and ClumpParticle::integrateBeforeForceComputation().
bool BaseParticle::isPeriodicGhostParticle | ( | ) | const |
Indicates if this particle is a ghost in the periodic boundary.
References isPeriodicGhostParticle_.
Referenced by PeriodicBoundaryHandler::checkIfAddNewParticle(), Domain::findNewMPIParticle(), DPMBase::integrateAfterForceComputation(), DPMBase::integrateBeforeForceComputation(), DPMBase::outputXBallsData(), and ParticleVtkWriter::particleMustBeWritten().
|
pure virtual |
this flag is used to decide whether to compute orientation, which is not necessary for spherical particles
Implemented in SphericalParticle, NonSphericalParticle, and ClumpParticle.
Referenced by SuperQuadricParticle::getInteractionWith(), BaseWall::getInteractionWith(), MeshTriangle::getInteractionWith(), and SuperQuadricParticle::isInContactWith().
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.
[in] | posMove | the vector to be added to the current previousPosition_ vector. |
References previousPosition_.
|
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.
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.
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.
[in,out] | os | the ostream which has the mentioned properties added. |
References HGridCell::getHGridLevel(), HGridCell::getHGridX(), HGridCell::getHGridY(), HGridCell::getHGridZ(), and hGridCell.
|
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().
[in,out] | is | input stream with particle properties. |
Reimplemented from BaseInteractable.
Reimplemented in SuperQuadricParticle, and ClumpParticle.
References invMass_, radius_, and BaseInteractable::read().
Referenced by ClumpParticle::read(), SuperQuadricParticle::read(), and ParticleHandler::readAndCreateObject().
|
inlinevirtual |
Only ustilised in case of superquadric particles.
Reimplemented in SuperQuadricParticle.
Referenced by MPISuperQuadric::copyDataFromMPIParticleToParticle().
void BaseParticle::setCommunicationComplexity | ( | unsigned | complexity | ) |
Set the communication complexity of the particle.
References communicationComplexity_.
Referenced by Domain::addParticlesToLists(), MPISphericalParticle::copyDataFromMPIParticleToParticle(), and Domain::updateParticles().
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_
[in] | disp | the displacement vector |
References displacement_.
Referenced by CircularPeriodicBoundary::checkBoundaryAfterParticleMoved().
|
inlinevirtual |
Only ustilised in case of superquadric particles.
Reimplemented in SuperQuadricParticle.
Referenced by MPISuperQuadric::copyDataFromMPIParticleToParticle().
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).
[in] | handler | pointer to the ParticleHandler |
References getHandler(), BaseInteractable::getIndSpecies(), BaseHandler< T >::getObject(), handler_, and setSpecies().
Referenced by copyDataFromMPIParticleToParticle(), Chute::createBottom(), ParticleHandler::readAndCreateObject(), setSpecies(), SphericalIndenter::setupInitialConditions(), and ChuteBottom::setupInitialConditions().
|
inline |
Sets the particle's HGrid level.
[in] | level | the particle's HGrid level |
References hGridCell, and HGridCell::setHGridLevel().
Referenced by MPISphericalParticle::copyDataFromMPIParticleToParticle(), and HGrid::insertParticleToHgrid().
|
inline |
Sets the pointer to the next object in the particle's HGrid cell & level.
[in] | p | pointer to the next object |
References hGridNextObject_.
Referenced by MPISphericalParticle::copyDataFromMPIParticleToParticle(), Mercury2D::hGridRemoveParticle(), Mercury3D::hGridRemoveParticle(), Mercury2D::hGridUpdateParticle(), and Mercury3D::hGridUpdateParticle().
|
inline |
Sets the pointer to the previous object in the particle's HGrid cell & level.
[in] | p | pointer to the previous object |
References hGridPrevObject_.
Referenced by MPISphericalParticle::copyDataFromMPIParticleToParticle(), Mercury2D::hGridRemoveParticle(), Mercury3D::hGridRemoveParticle(), Mercury2D::hGridUpdateParticle(), and Mercury3D::hGridUpdateParticle().
|
inline |
Sets the particle's HGrid cell X-coordinate.
Set the x-index of the particle's hGrid cell position
[in] | x | x-index of particle's HGrid cell |
References hGridCell, and HGridCell::setHGridX().
Referenced by MPISphericalParticle::copyDataFromMPIParticleToParticle(), Mercury2D::hGridUpdateParticle(), and Mercury3D::hGridUpdateParticle().
|
inline |
Sets the particle's HGrid cell Y-coordinate.
Set the y-index of the particle's hGrid cell position
[in] | y | y-index of particle's HGrid cell |
References hGridCell, and HGridCell::setHGridY().
Referenced by MPISphericalParticle::copyDataFromMPIParticleToParticle(), Mercury2D::hGridUpdateParticle(), and Mercury3D::hGridUpdateParticle().
|
inline |
Sets the particle's HGrid cell Z-coordinate.
Set the y-index of the particle's hGrid cell position
[in] | z | z-index of particle's HGrid cell |
References hGridCell, and HGridCell::setHGridZ().
Referenced by MPISphericalParticle::copyDataFromMPIParticleToParticle(), and Mercury3D::hGridUpdateParticle().
|
overridevirtual |
Set the particle's species and species' index. Logs a warning if no ParticleHandler is assigned.
[in] | indSpecies | The index of the species in the SpeciesHandler. |
Reimplemented from BaseInteractable.
References ERROR, BaseHandler< T >::getDPMBase(), BaseObject::getId(), BaseHandler< T >::getObject(), handler_, logger, BaseInteractable::setIndSpecies(), setSpecies(), and DPMBase::speciesHandler.
|
virtual |
Reimplemented in SuperQuadricParticle.
Referenced by SuperQuadricParticle::setInertia(), and SlidingSpheresUnitTest::setupInitialConditions().
void BaseParticle::setInertia | ( | MatrixSymmetric3D | inertia | ) |
Sets the particle's inertia_ (and adjusts invInertia_ accordingly)
Sets the particle's inertia and invInertia_.
[in] | newInertia | the new inertia to be set. |
References MatrixSymmetric3D::inverse(), and invInertia_.
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.
References invInertia_, and MatrixSymmetric3D::setZero().
Referenced by Slide::actionsBeforeTimeLoop().
|
virtual |
void BaseParticle::setInMPIDomain | ( | bool | flag | ) |
Flags the status of the particle if wether it is in the communication zone or not.
References isInMPIDomain_.
Referenced by Domain::processReceivedBoundaryParticleData(), PeriodicBoundaryHandler::setMPIFlags(), Domain::updateParticles(), and PeriodicBoundaryHandler::updateParticleStatus().
void BaseParticle::setInPeriodicDomain | ( | bool | flag | ) |
Flags the status of the particle whether it is in the periodic communication zone or not.
References isInPeriodicDomain_.
Referenced by MPISphericalParticle::copyDataFromMPIParticleToParticle(), PeriodicBoundaryHandler::processLocalGhostParticles(), PeriodicBoundaryHandler::processPeriodicParticles(), PeriodicBoundaryHandler::processReceivedGhostParticleData(), and PeriodicBoundaryHandler::updateParticleStatus().
void BaseParticle::setInverseInertia | ( | MatrixSymmetric3D | inverseInertia | ) |
Sets the particle's inertia_ (and adjusts invInertia_ accordingly)
References invInertia_.
void BaseParticle::setMaserParticle | ( | bool | flag | ) |
Flags the status of the particle if it belongs to the maser boundary or not.
References isMaserParticle_.
Referenced by SubcriticalMaserBoundaryTEST::checkBoundaryAfterParticleMoved(), MPISphericalParticle::copyDataFromMPIParticleToParticle(), and PeriodicBoundaryHandler::updateMaserParticle().
void BaseParticle::setMass | ( | Mdouble | mass | ) |
Sets the particle's mass.
Sets the mass of the particle
[in] | mass | the new particle's mass |
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
[in] | mass | the new particle's mass |
void BaseParticle::setMPIParticle | ( | bool | flag | ) |
Flags the mpi particle status.
References isMPIParticle_.
Referenced by Domain::processReceivedBoundaryParticleData(), DPMBase::readNextDataFile(), PeriodicBoundaryHandler::setMPIFlags(), and Domain::updateParticles().
void BaseParticle::setPeriodicComplexity | ( | int | index, |
int | value | ||
) |
Set the periodic communication complexity of the particle.
References BaseHandler< T >::getDPMBase(), getHandler(), BaseHandler< T >::getSize(), DPMBase::periodicBoundaryHandler, and periodicComplexity_.
void BaseParticle::setPeriodicComplexity | ( | std::vector< int > | complexity | ) |
Set the periodic communication complexity of the particle.
References periodicComplexity_.
Referenced by PeriodicBoundaryHandler::findNewParticle(), SubcriticalMaserBoundaryTEST::modifyGhostAfterCreation(), PeriodicBoundaryHandler::processLocalGhostParticles(), PeriodicBoundaryHandler::processReceivedGhostParticleData(), and PeriodicBoundaryHandler::updateParticles().
|
inline |
Assigns the pointer to the 'original' particle this one's a periodic copy of (used in periodic boundary condition implementations).
[in] | p | pointer to the 'original' particle this one is a periodic copy of. |
References periodicFromParticle_.
Referenced by ChuteWithPeriodicInflow::Check_and_Duplicate_Periodic_Particle(), MPISphericalParticle::copyDataFromMPIParticleToParticle(), ConstantMassFlowMaserBoundary::createGhostCopy(), SubcriticalMaserBoundary::createGhostCopy(), PeriodicBoundary::createGhostParticle(), TimeDependentPeriodicBoundary::createGhostParticle(), LeesEdwardsBoundary::createHorizontalPeriodicParticle(), ShearBoxBoundary::createHorizontalPeriodicParticle(), AngledPeriodicBoundary::createPeriodicParticle(), CircularPeriodicBoundary::createPeriodicParticle(), LeesEdwardsBoundary::createVerticalPeriodicParticle(), and ShearBoxBoundary::createVerticalPeriodicParticle().
void BaseParticle::setPeriodicGhostParticle | ( | bool | flag | ) |
Flags the status of the particle to be a ghost in periodic boundary or not.
References isPeriodicGhostParticle_.
Referenced by PeriodicBoundary::createGhostParticle(), PeriodicBoundaryHandler::processLocalGhostParticles(), PeriodicBoundaryHandler::processReceivedGhostParticleData(), DPMBase::readNextDataFile(), and PeriodicBoundaryHandler::updateParticleStatus().
void BaseParticle::setPreviousPeriodicComplexity | ( | std::vector< int > | complexity | ) |
Set the previous periodic communication complexity of the paritcle.
References previousPeriodicComplexity_.
Referenced by PeriodicBoundaryHandler::updateParticles().
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
[in] | pos | the particle's previous position vector. |
References previousPosition_.
Referenced by integrateBeforeForceComputation(), ClumpParticle::integrateBeforeForceComputation(), Domain::processReceivedBoundaryParticleData(), and PeriodicBoundaryHandler::updateParticles().
|
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.
[in] | radius | the new radius |
Reimplemented in SuperQuadricParticle.
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().
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.
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.
[in] | species | pointer to the ParticleSpecies object, to be set as the particle's species. |
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().
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.
References ParticleSpecies::computeMass(), getHandler(), BaseInteractable::getSpecies(), invMass_, and ParticleHandler::removedFixedParticle().
Referenced by DPMBase::readNextDataFile(), and FiveParticles::setupInitialConditions().
|
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.
[in,out] | os | stream to which the info is written |
Reimplemented from BaseInteractable.
Reimplemented in SuperQuadricParticle, and ClumpParticle.
References invMass_, radius_, and BaseInteractable::write().
Referenced by ClumpParticle::write(), and SuperQuadricParticle::write().
|
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.
BaseParticle* BaseParticle::clumpParticle |
Function that updates necessary quantities of a clump particle after adding a pebble.
Referenced by ClumpParticle::ClumpParticle(), getClump(), and ClumpParticle::setClump().
|
private |
returns true if it flagged as being in MPI domain
Referenced by BaseParticle(), getCommunicationComplexity(), and setCommunicationComplexity().
|
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().
|
private |
Inverse Particle inverse inertia (for computation optimization)
Pointer to the particle's ParticleHandler container
Referenced by BaseParticle(), getHandler(), getVolume(), setHandler(), setIndSpecies(), and setSpecies().
|
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().
|
private |
Referenced by BaseParticle(), getHGridNextObject(), and setHGridNextObject().
|
private |
Pointer to the next Particle in the same HGrid cell.
Referenced by BaseParticle(), getHGridPrevObject(), and setHGridPrevObject().
|
private |
Referenced by BaseParticle(), getInfo(), and setInfo().
MatrixSymmetric3D BaseParticle::invInertia_ |
Inverse Particle mass (for computation optimization)
Referenced by ClumpParticle::angularAccelerateClumpIterative(), BaseParticle(), ClumpParticle::ClumpParticle(), computeMass(), ClumpParticle::computeMass(), SuperQuadricParticle::computeMass(), fixParticle(), getAngularMomentum(), getInertia(), getInvInertia(), oldRead(), ClumpParticle::rotateTensorOfInertia(), setInertia(), setInfiniteInertia(), ClumpParticle::setInitInertia(), and setInverseInertia().
Mdouble BaseParticle::invMass_ |
Particle radius_.
Referenced by BaseParticle(), computeMass(), ClumpParticle::computeMass(), SuperQuadricParticle::computeMass(), fixParticle(), getAngularMomentum(), getInvMass(), getMass(), getMomentum(), isFixed(), oldRead(), read(), ClumpParticle::setClumpMass(), setMass(), setMassForP3Statistics(), unfix(), ClumpParticle::updatePebblesVelPos(), and write().
bool BaseParticle::isClump_ |
The particle is pebble.
Referenced by BaseParticle(), ClumpParticle::ClumpParticle(), ClumpParticle::getKineticEnergy(), ClumpParticle::getRotationalEnergy(), isClump(), and ClumpParticle::setClump().
|
private |
returns true if the particle acts as an MPI particle instead of a real particle
Referenced by BaseParticle(), isInMPIDomain(), and setInMPIDomain().
|
private |
Referenced by BaseParticle(), isInPeriodicDomain(), and setInPeriodicDomain().
|
private |
Indicates the periodic complexity at current time step. Used to update periodic status.
Referenced by BaseParticle(), isMaserParticle(), and setMaserParticle().
|
private |
Pointer to originating Particle.
Referenced by BaseParticle(), isMPIParticle(), and setMPIParticle().
bool BaseParticle::isPebble_ |
pointer to a clump particle (for a pebble)
Referenced by BaseParticle(), ClumpParticle::ClumpParticle(), isPebble(), and ClumpParticle::setClump().
|
private |
bool that indicates if a particle is in the periodic domain of any boundary
Referenced by BaseParticle(), isPeriodicGhostParticle(), and setPeriodicGhostParticle().
|
private |
Indicates the periodic complexity at previous time step.
Referenced by BaseParticle(), getPeriodicComplexity(), and setPeriodicComplexity().
|
private |
Pointer to the previous Particle in the same HGrid cell.
Particle attributes
Referenced by BaseParticle(), getPeriodicFromParticle(), and setPeriodicFromParticle().
|
private |
Indicates if the particle is a ghost particle of a periodic particle.
Referenced by BaseParticle(), getPreviousPeriodicComplexity(), and setPreviousPeriodicComplexity().
|
private |
Displacement (only used in StatisticsVector, StatisticsPoint)
Referenced by getPreviousPosition(), movePrevious(), and setPreviousPosition().
Mdouble BaseParticle::radius_ |
Referenced by BaseParticle(), getCurvature(), getRadius(), getVolume(), oldRead(), read(), setRadius(), and write().