MercuryDPM  Alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
BaseInteractable Class Referenceabstract

Defines the basic properties that a interactable object can have. More...

#include <BaseInteractable.h>

+ Inheritance diagram for BaseInteractable:

Public Member Functions

 BaseInteractable ()
 Default BaseInteractable constructor, it simply creates an empty BaseInteractable. More...
 
 BaseInteractable (const BaseInteractable &p)
 Copy constructor. It copies the BaseInteractable and all objects it contains. More...
 
virtual ~BaseInteractable ()
 Destructor, it simply destructs the BaseInteractable and all the objects it contains. More...
 
virtual void read (std::istream &is)=0
 Reads a BaseInteractable from an input stream. More...
 
virtual void write (std::ostream &os) const =0
 Write a BaseInteractable to an output stream. More...
 
unsigned int getIndSpecies () const
 Returns the index of the Species of this BaseInteractable. More...
 
virtual void setIndSpecies (unsigned int indSpecies)
 Sets the index of the Species of this BaseInteractable. More...
 
const ParticleSpeciesgetSpecies () const
 Returns a pointer to the species of this BaseInteractable. More...
 
void setSpecies (const ParticleSpecies *species)
 Sets the species of this BaseInteractable. More...
 
const Vec3DgetForce () const
 Returns the force on this BaseInteractable. More...
 
const Vec3DgetTorque () const
 Returns the torque on this BaseInteractable. More...
 
void setForce (const Vec3D &force)
 Sets the force on this BaseInteractable. More...
 
void setTorque (const Vec3D &torque)
 Sets the torque on this BaseInteractable. More...
 
void addForce (const Vec3D &addForce)
 Adds an amount to the force on this BaseInteractable. More...
 
void addTorque (const Vec3D &addTorque)
 Adds an amount to the torque on this BaseInteractable. More...
 
const Vec3DgetPosition () const
 Returns the position of this BaseInteractable. More...
 
const Vec3DgetOrientation () const
 Returns the orientation of this BaseInteractable. More...
 
void setPosition (const Vec3D &position)
 Sets the position of this BaseInteractable. More...
 
void setOrientation (const Vec3D &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...
 
void rotate (const Vec3D &rotate)
 Rotates this BaseInteractable. More...
 
const std::list
< BaseInteraction * > & 
getInteractions () const
 Returns a reference to the list of interactions in this BaseInteractable. More...
 
void addInteraction (BaseInteraction *I)
 Adds an interaction to this BaseInteractable. More...
 
bool removeInteraction (BaseInteraction *I)
 Removes an interaction from this BaseInteractable. More...
 
void copyInteractionsForPeriodicParticles (const BaseInteractable &p)
 Copies interactions to this BaseInteractable whenever a periodic copy made. More...
 
void setVelocity (const Vec3D &velocity)
 set the velocity of the BaseInteractable. More...
 
void setAngularVelocity (const Vec3D &angularVelocity)
 set the angular velocity of the BaseInteractble. More...
 
void addVelocity (const Vec3D &velocity)
 adds an increment to the velocity. More...
 
void addAngularVelocity (const Vec3D &angularVelocity)
 add an increment to the angular velocity. More...
 
virtual const Vec3DgetVelocity () const
 Returns the velocity of this interactable. More...
 
virtual const Vec3DgetAngularVelocity () const
 Returns the angular velocity of this interactable. More...
 
void setPrescribedPosition (const std::function< Vec3D(double)> &prescribedPosition)
 Allows the position of an infinite mass interactable to be prescribed. More...
 
void applyPrescribedPosition (double time)
 Computes the position from the user defined prescribed position function. More...
 
void setPrescribedVelocity (const std::function< Vec3D(double)> &prescribedVelocity)
 Allows the velocity of an infinite mass interactable to be prescribed. More...
 
void applyPrescribedVelocity (double time)
 Computes the velocity from the user defined prescribed velocity function. More...
 
void setPrescribedOrientation (const std::function< Vec3D(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 std::vector
< BaseInteraction * > 
getInteractionWith (BaseParticle *P, Mdouble timeStamp, InteractionHandler *interactionHandler)=0
 Returns the interaction between this object and a given BaseParticle. More...
 
virtual const Vec3D getVelocityAtContact (const Vec3D &contact) const
 Returns the velocity at the contact point, use by many force laws. More...
 
void integrateBeforeForceComputation (double time, double timeStep)
 This is part of integrate routine for objects with infinite mass. More...
 
void integrateAfterForceComputation (double time, double timeStep)
 This is part of the integration routine for objects with infinite mass. More...
 
- Public Member Functions inherited from BaseObject
 BaseObject ()
 Default constructor. More...
 
 BaseObject (const BaseObject &p)
 Copy constructor, copies all the objects BaseObject contains. More...
 
virtual ~BaseObject ()
 virtual destructor More...
 
virtual std::string getName () const =0
 A purely virtual function. More...
 
virtual void moveInHandler (const unsigned int index)
 Except that it is virtual, it does the same thing as setIndex() does. More...
 
void setIndex (const unsigned int index)
 Allows one to assign an index to an object in the handler/container. More...
 
void setId (const unsigned int 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...
 

Private Attributes

std::function< Vec3D(double)> prescribedPosition_
 
std::function< Vec3D(double)> prescribedVelocity_
 
std::function< Vec3D(double)> prescribedOrientation_
 
std::function< Vec3D(double)> prescribedAngularVelocity_
 
Vec3D position_
 
Vec3D orientation_
 
Vec3D angularVelocity_
 
Vec3D force_
 
Vec3D torque_
 
const ParticleSpeciesspecies_
 
unsigned int indSpecies_
 
Vec3D velocity_
 
std::list< BaseInteraction * > interactions_
 

Detailed Description

Defines the basic properties that a interactable object can have.

Inherits from class BaseObject (public) Also it includes a lot of code to deal with interactable objects that have a prescibed motion. Most of the code in here is MercuryDPM internal. The only place an user will interface with this code is for setting the lambda functions that prescribe the motion of infinite mass particles.

Todo:
Check prescribed objects have infinite mass.

Definition at line 51 of file BaseInteractable.h.

Constructor & Destructor Documentation

BaseInteractable::BaseInteractable ( )

Default BaseInteractable constructor, it simply creates an empty BaseInteractable.

Todo:
TW: why do some constructors (e.g. BaseInteractable, BaseParticle)not explicitly call the constructor from the inherited class?

Sets all vectors to zero and all point to nullptr.

Definition at line 38 of file BaseInteractable.cc.

References angularVelocity_, DEBUG, force_, indSpecies_, logger, orientation_, position_, prescribedAngularVelocity_, prescribedOrientation_, prescribedPosition_, prescribedVelocity_, Vec3D::setZero(), species_, torque_, and velocity_.

39 {
44  force_.setZero();
45  torque_.setZero();
46  indSpecies_ = 0;
47  species_ = nullptr;
48  prescribedPosition_ = nullptr;
49  prescribedVelocity_ = nullptr;
50  prescribedOrientation_ = nullptr;
52  logger(DEBUG, "BaseInteractable::BaseInteractable() finished");
53 }
std::function< Vec3D(double)> prescribedPosition_
unsigned int indSpecies_
Logger< MERCURY_LOGLEVEL > logger("MercuryKernel")
std::function< Vec3D(double)> prescribedVelocity_
void setZero()
Sets all elements to zero.
Definition: Vector.cc:52
const ParticleSpecies * species_
std::function< Vec3D(double)> prescribedOrientation_
std::function< Vec3D(double)> prescribedAngularVelocity_
BaseInteractable::BaseInteractable ( const BaseInteractable p)

Copy constructor. It copies the BaseInteractable and all objects it contains.

Note, this does not copy interactions of a interactable. As these often require extra work. All the other properties are copied normally. Please use this copy with care.

Definition at line 61 of file BaseInteractable.cc.

References angularVelocity_, DEBUG, force_, indSpecies_, interactions_, logger, orientation_, position_, prescribedAngularVelocity_, prescribedOrientation_, prescribedPosition_, prescribedVelocity_, species_, torque_, and velocity_.

62  : BaseObject(p)
63 {
64  interactions_.clear();
65  position_ = p.position_;
67  velocity_ = p.velocity_;
69  force_ = p.force_;
70  torque_ = p.torque_;
71  species_ = p.species_;
77  logger(DEBUG,"BaseInteractable::BaseInteractable(const BaseInteractable &p finished");
78 }
std::function< Vec3D(double)> prescribedPosition_
unsigned int indSpecies_
Logger< MERCURY_LOGLEVEL > logger("MercuryKernel")
std::function< Vec3D(double)> prescribedVelocity_
const ParticleSpecies * species_
std::list< BaseInteraction * > interactions_
std::function< Vec3D(double)> prescribedOrientation_
BaseObject()
Default constructor.
Definition: BaseObject.cc:55
std::function< Vec3D(double)> prescribedAngularVelocity_
BaseInteractable::~BaseInteractable ( )
virtual

Destructor, it simply destructs the BaseInteractable and all the objects it contains.

Removes all the interactions from the interactable.

Definition at line 83 of file BaseInteractable.cc.

References DEBUG, BaseObject::getId(), BaseObject::getIndex(), interactions_, logger, and VERBOSE.

84 {
85  logger(VERBOSE, "Deleting BaseInteractable with index= % and id = % size = %", getIndex(),getId(),interactions_.size());
86  while (interactions_.size() > 0)
87  {
88  interactions_.front()->removeFromHandler();
89  }
90  logger(DEBUG,"BaseInteractable::~BaseInteractable() finished");
91 }
unsigned int getId() const
Returns the unique identifier of any particular object.
Definition: BaseObject.cc:116
unsigned int getIndex() const
Returns the index of the object in the handler.
Definition: BaseObject.cc:108
Logger< MERCURY_LOGLEVEL > logger("MercuryKernel")
std::list< BaseInteraction * > interactions_

Member Function Documentation

void BaseInteractable::addAngularVelocity ( const Vec3D angularVelocity)

add an increment to the angular velocity.

See also BaseInteractable::setAngularVelocity

Parameters
[in]angularVelocityincrement which to increase the angularVelocity by.

Definition at line 444 of file BaseInteractable.cc.

References angularVelocity_.

Referenced by BaseParticle::angularAccelerate().

445 {
446  angularVelocity_ += angularVelocity;
447 }
void BaseInteractable::addForce ( const Vec3D addForce)

Adds an amount to the force on this BaseInteractable.

Incremental version of BaseInteractable::setForce. Also see BaseInteraction::setForce for were this is used.

Parameters
[in]addForceVec3D incremental force which is added to the total force of the interactable.

Definition at line 203 of file BaseInteractable.cc.

References force_.

Referenced by DPMBase::computeExternalForces(), DPMBase::computeForcesDueToWalls(), and DPMBase::computeInternalForces().

204 {
205  force_ += addForce;
206 }
void addForce(const Vec3D &addForce)
Adds an amount to the force on this BaseInteractable.
void BaseInteractable::addInteraction ( BaseInteraction I)

Adds an interaction to this BaseInteractable.

Added a new interactions to the current interactable.

Parameters
[in]IPointer to the new interaction which is to be added to the list of interactions of this interactable.

Definition at line 355 of file BaseInteractable.cc.

References interactions_.

Referenced by BaseInteraction::BaseInteraction(), BaseInteraction::copySwitchPointer(), BaseInteraction::setI(), and BaseInteraction::setP().

356 {
357  interactions_.push_back(I);
358 }
std::list< BaseInteraction * > interactions_
void BaseInteractable::addTorque ( const Vec3D addTorque)

Adds an amount to the torque on this BaseInteractable.

Incremental version of BaseInteractable::setTorque. Also see BaseInteraction::setTorque for were this is used.

Parameters
[in]addTorqueVec3D incremental force which is added to the total torque of the interactable.

Definition at line 214 of file BaseInteractable.cc.

References torque_.

Referenced by DPMBase::computeForcesDueToWalls(), and DPMBase::computeInternalForces().

215 {
216  torque_ += addTorque;
217 }
void addTorque(const Vec3D &addTorque)
Adds an amount to the torque on this BaseInteractable.
void BaseInteractable::addVelocity ( const Vec3D velocity)

adds an increment to the velocity.

See also BaseInteractable::setVelocity

Parameters
[in]velocityVec3D containing the velocity increment which to increase the velocity by.

Definition at line 434 of file BaseInteractable.cc.

References velocity_.

Referenced by BaseParticle::accelerate(), ShearBoxBoundary::shiftHorizontalPosition(), and LeesEdwardsBoundary::shiftVerticalPosition().

435 {
436  velocity_ += velocity;
437 }
void BaseInteractable::applyPrescribedAngularVelocity ( double  time)

Computes the angular velocity from the user defined prescribed angular velocity.

This calls the prescribedAngularVelocity function if one has been defined. See also BaseInteractable::setPrescribedAngularVelocity

Parameters
[in]timedouble which is the current time of the simulation.

Definition at line 585 of file BaseInteractable.cc.

References prescribedAngularVelocity_, and setAngularVelocity().

Referenced by integrateAfterForceComputation(), and integrateBeforeForceComputation().

586 {
588  {
590  }
591 }
std::function< Vec3D(double)> prescribedAngularVelocity_
void setAngularVelocity(const Vec3D &angularVelocity)
set the angular velocity of the BaseInteractble.
void BaseInteractable::applyPrescribedOrientation ( double  time)

Computes the orientation from the user defined prescribed orientation function.

This calls the prescribedOrientation function if one has been defined. See also BaseInteractable::setPrescribedOrientation

Parameters
[in]timedouble which is the current time of the simulation.

Definition at line 558 of file BaseInteractable.cc.

References prescribedOrientation_, and setOrientation().

Referenced by integrateBeforeForceComputation().

559 {
561  {
563  }
564 }
void setOrientation(const Vec3D &orientation)
Sets the orientation of this BaseInteractable.
std::function< Vec3D(double)> prescribedOrientation_
void BaseInteractable::applyPrescribedPosition ( double  time)

Computes the position from the user defined prescribed position function.

This calls the prescribedPosition function if one has been defined. See also BaseInteractable::setPrescribedPosition

Parameters
[in]timedouble which is the current time of the simulation.

Definition at line 496 of file BaseInteractable.cc.

References prescribedPosition_, and setPosition().

Referenced by integrateBeforeForceComputation().

497 {
499  {
501  }
502 }
std::function< Vec3D(double)> prescribedPosition_
void setPosition(const Vec3D &position)
Sets the position of this BaseInteractable.
void BaseInteractable::applyPrescribedVelocity ( double  time)

Computes the velocity from the user defined prescribed velocity function.

This calls the prescribedVeclocity function if one has been defined. See also BaseInteractable::setPrescribedVelocity

Parameters
[in]timedouble which is the current time of the simulation.

Definition at line 527 of file BaseInteractable.cc.

References prescribedVelocity_, and setVelocity().

Referenced by integrateAfterForceComputation(), and integrateBeforeForceComputation().

528 {
530  {
532  }
533 }
void setVelocity(const Vec3D &velocity)
set the velocity of the BaseInteractable.
std::function< Vec3D(double)> prescribedVelocity_
void BaseInteractable::copyInteractionsForPeriodicParticles ( const BaseInteractable pOriginal)

Copies interactions to this BaseInteractable whenever a periodic copy made.

This loops over all interactions of periodic (particle) and calls copySwitchPointer, which copies the interactions.

Parameters
[in]pOriginalReference to the BaseInteractable which is to be copied to create the ghost particles.

Definition at line 459 of file BaseInteractable.cc.

References BaseInteraction::copySwitchPointer(), and interactions_.

Referenced by LeesEdwardsBoundary::createHorizontalPeriodicParticles(), ShearBoxBoundary::createHorizontalPeriodicParticles(), MaserBoundary::createPeriodicParticles(), AngledPeriodicBoundary::createPeriodicParticles(), PeriodicBoundary::createPeriodicParticles(), ShearBoxBoundary::createVerticalPeriodicParticles(), and LeesEdwardsBoundary::createVerticalPeriodicParticles().

460 {
461  for (BaseInteraction* interaction : pOriginal.interactions_)
462  {
463  //So here this is the ghost and it is the interaction of the ghost/
464  interaction->copySwitchPointer(&pOriginal, this);
465  }
466 }
void copySwitchPointer(const BaseInteractable *original, BaseInteractable *ghost) const
This copies the interactions of the original particle and replaces the original with the ghost copy...
Stores information about interactions between two interactable objects; often particles but could be ...
std::list< BaseInteraction * > interactions_
const Vec3D & BaseInteractable::getAngularVelocity ( ) const
virtual

Returns the angular velocity of this interactable.

Returns the angular velocity of the BaseInteractbale. Note, this is the same for all BaseInteractables; it is the direction the object is moving in.

Returns
Vec3D reference which contains the current angular velocity of the current BaseInteractable.

Definition at line 405 of file BaseInteractable.cc.

References angularVelocity_.

Referenced by getVelocityAtContact(), integrateBeforeForceComputation(), BaseParticle::integrateBeforeForceComputation(), helpers::objectivenessTest(), and AngledPeriodicBoundary::shiftPosition().

406 {
407  return angularVelocity_;
408 }
const Vec3D & BaseInteractable::getForce ( ) const

Returns the force on this BaseInteractable.

Return the current force being to the BaseInteractable. Note, the code works by first computing the forces of each interaction and then it loops over all BaseInteracables applying forces to them from the interactions they are involved in.

Returns
const Vec3D reference that is the total force applied to this interactable.

Definition at line 154 of file BaseInteractable.cc.

References force_.

Referenced by BaseParticle::integrateAfterForceComputation(), and BaseParticle::integrateBeforeForceComputation().

155 {
156  return force_;
157 }
unsigned int BaseInteractable::getIndSpecies ( ) const

Returns the index of the Species of this BaseInteractable.

Returns the unsigned int to the index of the species associated with the interactable object.

Returns
Unsigned int which is the unique index of the species

Definition at line 98 of file BaseInteractable.cc.

References indSpecies_.

Referenced by InteractionHandler::getInteraction(), ParticleHandler::readObject(), BaseWall::setHandler(), BaseParticle::setHandler(), and BaseWall::setIndSpecies().

99 {
100  return indSpecies_;
101 }
unsigned int indSpecies_
const std::list< BaseInteraction * > & BaseInteractable::getInteractions ( ) const

Returns a reference to the list of interactions in this BaseInteractable.

Returns a list of interactions which belong to this interactable.

Returns
Returns an std::list of pointers to all the interactions which this interacable is involved in.

Definition at line 345 of file BaseInteractable.cc.

References interactions_.

Referenced by InteractionHandler::getExistingInteraction(), InteractionHandler::getInteraction(), LiquidMigrationWilletInteraction::getNumberOfContacts(), DPMBase::removeDuplicatePeriodicParticles(), LiquidMigrationWilletInteraction::rupture(), and AngledPeriodicBoundary::shiftPosition().

346 {
347  return interactions_;
348 }
std::list< BaseInteraction * > interactions_
virtual std::vector<BaseInteraction*> BaseInteractable::getInteractionWith ( BaseParticle P,
Mdouble  timeStamp,
InteractionHandler interactionHandler 
)
pure virtual

Returns the interaction between this object and a given BaseParticle.

Todo:

TW make sure this function sets normal, distance, overlap, contact point

AT why is this a BaseParticle and not a BaseInteratable.

Implemented in BaseParticle, BaseWall, TriangulatedWall, and RestrictedWall.

const Vec3D & BaseInteractable::getOrientation ( ) const

Returns the orientation of this BaseInteractable.

Returns the reference to a Vec3D which contains the orientation of the interactionable. Please note the interpretation of this depends on which interactable. Please see derived objects for details.

Todo:
This is not full implemented and is related to quaterians.
Returns
Returns a reference to a Vec3D returns the position of the interactable.

Definition at line 243 of file BaseInteractable.cc.

References orientation_.

Referenced by AxisymmetricIntersectionOfWalls::convertLimits(), AxisymmetricIntersectionOfWalls::getDistanceAndNormal(), helpers::objectivenessTest(), and AngledPeriodicBoundary::shiftPosition().

244 {
245  return orientation_;
246 }
const Vec3D & BaseInteractable::getPosition ( ) const

Returns the position of this BaseInteractable.

Returns the reference to a Vec3D which contains the position of the interactionable. Please note the interpretation of this depends on which interactable. For particles this is the centre of the particle; where for walls it is one point of the wall given $r.n=p$

Returns
Returns a reference to a Vec3D returns the position of the interactable.

Definition at line 228 of file BaseInteractable.cc.

References position_.

Referenced by IntersectionOfWalls::addObject(), DPMBase::areInContact(), DeletionBoundary::checkBoundaryAfterParticleMoved(), CircularPeriodicBoundary::checkBoundaryAfterParticleMoved(), DPMBase::checkParticleForInteractionLocal(), Chute::cleanChute(), DPMBase::computeForcesDueToWalls(), DPMBase::computeInternalForces(), AxisymmetricIntersectionOfWalls::convertLimits(), CircularPeriodicBoundary::createPeriodicParticles(), InfiniteWall::createVTK(), AngledPeriodicBoundary::distance(), BaseInteraction::gatherContactStatistics(), BaseParticle::getDisplacement2(), MaserBoundary::getDistance(), SphericalWall::getDistance(), PeriodicBoundary::getDistance(), InfiniteWall::getDistance(), Screw::getDistanceAndNormal(), CylindricalWall::getDistanceAndNormal(), TriangulatedWall::Face::getDistanceAndNormal(), Coil::getDistanceAndNormal(), RestrictedWall::getDistanceAndNormal(), SphericalWall::getDistanceAndNormal(), AxisymmetricIntersectionOfWalls::getDistanceAndNormal(), InfiniteWallWithHole::getDistanceAndNormal(), InfiniteWall::getDistanceAndNormal(), IntersectionOfWalls::getDistanceAndNormal(), LeesEdwardsBoundary::getHorizontalDistance(), ShearBoxBoundary::getHorizontalDistance(), TriangulatedWall::getInteractionWith(), BaseWall::getInteractionWith(), BaseParticle::getInteractionWith(), getVelocityAtContact(), LeesEdwardsBoundary::getVerticalDistance(), ShearBoxBoundary::getVerticalDistance(), Mercury2D::hGridFindOneSidedContacts(), Mercury3D::hGridFindOneSidedContacts(), Mercury2D::hGridHasParticleContacts(), Mercury2D::hGridUpdateParticle(), Mercury3D::hGridUpdateParticle(), PeriodicBoundary::isClosestToLeftBoundary(), helpers::objectivenessTest(), FileReader::read(), CircularPeriodicBoundary::rotateParticle(), ShearBoxBoundary::shiftHorizontalPosition(), AngledPeriodicBoundary::shiftPosition(), BaseInteraction::writeToFStat(), and AxisymmetricIntersectionOfWalls::writeVTK().

229 {
230  return position_;
231 }
const ParticleSpecies * BaseInteractable::getSpecies ( ) const

Returns a pointer to the species of this BaseInteractable.

This function return a ParticleSpecies* for the current interacable. Please note, this is a ParticleSpecies; not, a BaseSpecies as interactables must have physically properties as well.

Returns
constant ParticleSpecies* pointer to the species storing the physical properties of this interactable.

Definition at line 121 of file BaseInteractable.cc.

References species_.

Referenced by ParticleHandler::addObject(), WallHandler::addObject(), IntersectionOfWalls::addObject(), MaserBoundary::addParticleToMaser(), MaserBoundary::checkBoundaryAfterParticleMoved(), ChargedBondedInteraction::computeAdhesionForce(), MaserBoundary::createPeriodicParticles(), ChargedBondedInteraction::getElasticEnergy(), DPMBase::getInfo(), BaseParticle::getInteractionRadius(), BaseParticle::getWallInteractionRadius(), RestrictedWall::set(), BaseParticle::setRadius(), and BaseParticle::unfix().

122 {
123  //logger.assert(species_,"Species of % % has to be defined",getName(),getIndex());
124  return species_;
125 }
const ParticleSpecies * species_
const Vec3D & BaseInteractable::getTorque ( ) const

Returns the torque on this BaseInteractable.

Return the current torque being to the BaseInteractable. Note, the code works by first computing the forces of each interaction and then it loops over all BaseInteracables applying forces to them from the interactions they are involved in.

Returns
const Vec3D reference that is the total force applied to this interactable.

Definition at line 167 of file BaseInteractable.cc.

References torque_.

Referenced by BaseParticle::integrateAfterForceComputation(), and BaseParticle::integrateBeforeForceComputation().

168 {
169  return torque_;
170 }
const Vec3D & BaseInteractable::getVelocity ( ) const
virtual

Returns the velocity of this interactable.

Returns the velocity of the BaseInteractbale. Note, this is the same for all BaseInteractables; it is the direction the object is moving in.

Returns
Vec3D reference which contains the current velocity of the current BaseInteractable.

Definition at line 393 of file BaseInteractable.cc.

References velocity_.

Referenced by FrictionInteraction::computeFrictionForce(), MindlinRollingTorsionInteraction::computeFrictionForce(), BaseParticle::getKineticEnergy(), getVelocityAtContact(), integrateBeforeForceComputation(), BaseParticle::integrateBeforeForceComputation(), InfiniteWallWithHole::move_time(), helpers::objectivenessTest(), CircularPeriodicBoundary::rotateParticle(), and AngledPeriodicBoundary::shiftPosition().

394 {
395  return velocity_;
396 }
const Vec3D BaseInteractable::getVelocityAtContact ( const Vec3D contact) const
virtual

Returns the velocity at the contact point, use by many force laws.

Definition at line 448 of file BaseInteractable.cc.

References Vec3D::cross(), getAngularVelocity(), getPosition(), and getVelocity().

449 {
450  return getVelocity() - Vec3D::cross(contact - getPosition(), getAngularVelocity());
451 }
virtual const Vec3D & getAngularVelocity() const
Returns the angular velocity of this interactable.
const Vec3D & getPosition() const
Returns the position of this BaseInteractable.
static Vec3D cross(const Vec3D &a, const Vec3D &b)
Calculates the cross product of two Vec3D: .
Definition: Vector.cc:255
virtual const Vec3D & getVelocity() const
Returns the velocity of this interactable.
void BaseInteractable::integrateAfterForceComputation ( double  time,
double  timeStep 
)

This is part of the integration routine for objects with infinite mass.

This is the last part of time integration for interactable objects which have an infinite mass.

Parameters
[in]timedouble which is the current simulation time
[in]timeStepdouble which is the current delta time of the simulation i.e. the size of each time step.

Definition at line 680 of file BaseInteractable.cc.

References applyPrescribedAngularVelocity(), applyPrescribedVelocity(), prescribedAngularVelocity_, prescribedOrientation_, prescribedPosition_, prescribedVelocity_, setAngularVelocity(), and setVelocity().

Referenced by BaseParticle::integrateAfterForceComputation().

681 {
683  {
685  {
686  applyPrescribedVelocity(time + timeStep);
687  }
688  else
689  {
690  setVelocity((prescribedPosition_(time + 1.1 * timeStep) - prescribedPosition_(time + 0.9 * timeStep)) / (0.2 * timeStep));
691  }
692  }
693  else
694  {
696  {
697  applyPrescribedVelocity(time + 0.5 * timeStep);
698  }
699  }
701  {
703  {
704  applyPrescribedAngularVelocity(time + timeStep);
705  }
706  else
707  {
708  setAngularVelocity((prescribedOrientation_(time + 1.1 * timeStep) - prescribedOrientation_(time + 0.9 * timeStep)) / (0.2 * timeStep));
709  }
710  }
711  else
712  {
714  {
715  applyPrescribedAngularVelocity(time + 0.5 * timeStep);
716  }
717  }
718 }
std::function< Vec3D(double)> prescribedPosition_
void setVelocity(const Vec3D &velocity)
set the velocity of the BaseInteractable.
std::function< Vec3D(double)> prescribedVelocity_
void applyPrescribedAngularVelocity(double time)
Computes the angular velocity from the user defined prescribed angular velocity.
std::function< Vec3D(double)> prescribedOrientation_
void applyPrescribedVelocity(double time)
Computes the velocity from the user defined prescribed velocity function.
std::function< Vec3D(double)> prescribedAngularVelocity_
void setAngularVelocity(const Vec3D &angularVelocity)
set the angular velocity of the BaseInteractble.
void BaseInteractable::integrateBeforeForceComputation ( double  time,
double  timeStep 
)

This is part of integrate routine for objects with infinite mass.

This does not first part of verlet integration but for objects with an infinite mass i.e. there motion is prescribed and not calculated from the applied forces. First it deals with the translation degrees of freedom and then secondly if deals with the angular degrees of freedom. Note, in both cases if the user has prescribed both positions and velocity these are used. If only only position is prescribed the velocity is computed from a finite difference. If only the velocity is prescribed the position is computed from integrating the velocity.

In the weird case they neither is set. The objects computed velocity is used to update its position.

Parameters
[in]timedouble which is the current simulation time
[in]timeStepdouble which is the current delta time of the simulation i.e. the size of each time step.

Definition at line 611 of file BaseInteractable.cc.

References applyPrescribedAngularVelocity(), applyPrescribedOrientation(), applyPrescribedPosition(), applyPrescribedVelocity(), getAngularVelocity(), getVelocity(), move(), prescribedAngularVelocity_, prescribedOrientation_, prescribedPosition_, prescribedVelocity_, rotate(), setAngularVelocity(), and setVelocity().

Referenced by BaseParticle::integrateBeforeForceComputation().

612 {
613  if (prescribedPosition_ )
614  {
615  if (prescribedVelocity_ )
616  {
617  //Both the velocity and position are defined; as we are using leap
618  //frog method so the velocity is evaluated half a time later.
619  applyPrescribedPosition(time + timeStep);
620  applyPrescribedVelocity(time + 0.5 * timeStep);
621  }
622  else
623  {
624  //Only the position is defined.
625  //Velocity is evaluated from a finite different of the Position
626  //Note, we use 0.5 +- 0.1 timeStep for the velocity eval.
627  applyPrescribedPosition(time + timeStep);
628  setVelocity((prescribedPosition_(time + 0.6 * timeStep) - prescribedPosition_(time + 0.4 * timeStep)) / (0.2 * timeStep));
629  }
630  }
631  else
632  {
633  if (prescribedVelocity_ )
634  {
635  //Only the velocity is set. The position is calculated from the
636  //the integral of velocity.
637  applyPrescribedVelocity(time + 0.5 * timeStep);
638  move(getVelocity() * timeStep);
639  }
640  else
641  {
642  //Neither is set move based on the computed velocity of the object.
643  move(getVelocity() * timeStep);
644  }
645  }
647  {
649  {
650  applyPrescribedOrientation(time + timeStep);
651  applyPrescribedAngularVelocity(time + 0.5 * timeStep);
652  }
653  else
654  {
655  applyPrescribedOrientation(time + timeStep);
656  setAngularVelocity((prescribedOrientation_(time + 0.6 * timeStep) - prescribedOrientation_(time + 0.4 * timeStep)) / (0.2 * timeStep));
657  }
658  }
659  else
660  {
662  {
663  applyPrescribedAngularVelocity(time + 0.5 * timeStep);
664  rotate(getAngularVelocity() * timeStep);
665  }
666  else
667  {
668  rotate(getAngularVelocity() * timeStep);
669  }
670  }
671 }
void rotate(const Vec3D &rotate)
Rotates this BaseInteractable.
std::function< Vec3D(double)> prescribedPosition_
void setVelocity(const Vec3D &velocity)
set the velocity of the BaseInteractable.
void applyPrescribedPosition(double time)
Computes the position from the user defined prescribed position function.
std::function< Vec3D(double)> prescribedVelocity_
void applyPrescribedAngularVelocity(double time)
Computes the angular velocity from the user defined prescribed angular velocity.
void applyPrescribedOrientation(double time)
Computes the orientation from the user defined prescribed orientation function.
virtual const Vec3D & getAngularVelocity() const
Returns the angular velocity of this interactable.
std::function< Vec3D(double)> prescribedOrientation_
void applyPrescribedVelocity(double time)
Computes the velocity from the user defined prescribed velocity function.
std::function< Vec3D(double)> prescribedAngularVelocity_
virtual const Vec3D & getVelocity() const
Returns the velocity of this interactable.
virtual void move(const Vec3D &move)
Moves this BaseInteractable by adding an amount to the position.
void setAngularVelocity(const Vec3D &angularVelocity)
set the angular velocity of the BaseInteractble.
void BaseInteractable::move ( const Vec3D move)
virtual

Moves this BaseInteractable by adding an amount to the position.

Moves (displaces) the interacable a given distance. Note, this just updates the position by the move.

Parameters
[in]moveReference to Vec3D which is the distance to move the interactable.

Reimplemented in IntersectionOfWalls, and TriangulatedWall.

Definition at line 278 of file BaseInteractable.cc.

References position_.

Referenced by HopperInsertionBoundary::generateParticle(), integrateBeforeForceComputation(), BaseParticle::integrateBeforeForceComputation(), TriangulatedWall::move(), IntersectionOfWalls::move(), ShearBoxBoundary::shiftHorizontalPosition(), LeesEdwardsBoundary::shiftHorizontalPosition(), AngledPeriodicBoundary::shiftPosition(), MaserBoundary::shiftPosition(), PeriodicBoundary::shiftPosition(), ShearBoxBoundary::shiftVerticalPosition(), and LeesEdwardsBoundary::shiftVerticalPosition().

279 {
280  position_ += move;
281 }
virtual void move(const Vec3D &move)
Moves this BaseInteractable by adding an amount to the position.
void BaseInteractable::read ( std::istream &  is)
pure virtual

Reads a BaseInteractable from an input stream.

BaseInteacatable read functions. Reads in all the information about an interacatable. Note, this can be from any istream but would normally be a file See also BaseInteractable::write

Parameters
[in]isstd::istream to which the information is read from.

Implements BaseObject.

Implemented in IntersectionOfWalls, TriangulatedWall, InfiniteWall, InfiniteWallWithHole, AxisymmetricIntersectionOfWalls, SphericalWall, BaseParticle, Coil, RestrictedWall, Screw, CylindricalWall, BaseWall, LiquidFilmParticle, and ThermalParticle.

Definition at line 301 of file BaseInteractable.cc.

References angularVelocity_, force_, indSpecies_, orientation_, position_, BaseObject::read(), torque_, and velocity_.

Referenced by BaseWall::read(), and BaseParticle::read().

302 {
303  BaseObject::read(is);
304  std::string dummy;
305  is >> dummy >> indSpecies_;
306  is >> dummy >> position_;
307  is >> dummy;
308  //this if-statement is added to read Kasper van der Vaart's data files, which contain an additional variable named positionAbsolute
309  if (dummy.compare("positionAbsolute") == 0)
310  {
311  is >> dummy >> dummy >> dummy >> dummy;
312  }
313  is >> orientation_ >> dummy;
314  is >> dummy >> velocity_;
315  is >> dummy >> angularVelocity_ >> dummy;
316  is >> dummy >> force_;
317  is >> dummy >> torque_;
318 }
unsigned int indSpecies_
virtual void read(std::istream &is)=0
A purely virtual method with an implementation which reads the index from the stream and assigns it t...
Definition: BaseObject.cc:124
bool BaseInteractable::removeInteraction ( BaseInteraction I)

Removes an interaction from this BaseInteractable.

Removes a given interaction form the list of interactions belonging to the current interacable. This functions returns true to the interaction was found and returns false if the given interaction did not exist and the interaction was not removed. Note that this cannot be done with a range-based for, since we need the iterator to erase the interaction.

Parameters
[in]IBaseInteraction pointer which is the interaction to be removed.
Returns
bool True if the interaction was found and removed; false if the interaction did not exist for that interactable.

Definition at line 371 of file BaseInteractable.cc.

References BaseInteraction::getI(), BaseObject::getId(), BaseInteraction::getP(), interactions_, logger, VERBOSE, and WARN.

Referenced by BaseInteraction::setI(), BaseInteraction::setP(), and BaseInteraction::~BaseInteraction().

372 {
373  for (std::list<BaseInteraction*>::iterator it = interactions_.begin(); it != interactions_.end(); ++it)
374  {
375  if (I == (*it))
376  {
377  logger(VERBOSE, "Removing interaction from % between % and %",getId(),I->getI()->getId(),I->getP()->getId());
378  interactions_.erase(it);
379  return true;
380  }
381  }
382  logger(WARN, "Error in BaseInteractable::removeInteraction: Interaction could not be removed");
383  return false;
384 }
unsigned int getId() const
Returns the unique identifier of any particular object.
Definition: BaseObject.cc:116
Logger< MERCURY_LOGLEVEL > logger("MercuryKernel")
std::list< BaseInteraction * > interactions_
BaseInteractable * getI()
BaseInteractable * getP()
Returns a pointer to first object involved in the interaction (normally a particle).
void BaseInteractable::rotate ( const Vec3D rotate)

Rotates this BaseInteractable.

Rotates the interacable a given solid angle. Note, this just updates the orientation by the angle.

Parameters
[in]rotateReference to Vec3D which is the solid angle through which the interactable is rotated.

Definition at line 289 of file BaseInteractable.cc.

References orientation_.

Referenced by integrateBeforeForceComputation(), BaseParticle::integrateBeforeForceComputation(), and AngledPeriodicBoundary::shiftPosition().

290 {
291  orientation_ += rotate;
292 }
void rotate(const Vec3D &rotate)
Rotates this BaseInteractable.
void BaseInteractable::setAngularVelocity ( const Vec3D angularVelocity)

set the angular velocity of the BaseInteractble.

See also BaseInteractable::getAngularVelocity

Parameters
[in]angularVelocityVec3D which is the angularVelocity of the interactable.

Definition at line 424 of file BaseInteractable.cc.

References angularVelocity_.

Referenced by applyPrescribedAngularVelocity(), BaseParticle::fixParticle(), integrateAfterForceComputation(), integrateBeforeForceComputation(), helpers::loadingTest(), helpers::normalAndTangentialLoadingTest(), helpers::objectivenessTest(), and ChuteBottom::setupInitialConditions().

425 {
426  angularVelocity_ = angularVelocity;
427 }
void BaseInteractable::setForce ( const Vec3D force)

Sets the force on this BaseInteractable.

This sets the force being applied to this interactable. Note, first the code computes all forces in the interactions and then loops over all interactable objects applying the forces from the interactions to the interactables involved in the interaction.

Parameters
[in]forceVec3D which is the force to be applied.

Definition at line 179 of file BaseInteractable.cc.

References force_.

180 {
181  force_ = force;
182 }
MERCURY_DEPRECATED void BaseInteractable::setIndSpecies ( unsigned int  indSpecies)
virtual

Sets the index of the Species of this BaseInteractable.

This set the species associated with this interactable. This function should not be used and BaseInteractable::setSpecies should be used instead. See also BaseInteractable::setSpecies

Reimplemented in BaseParticle, and BaseWall.

Definition at line 109 of file BaseInteractable.cc.

References indSpecies_.

Referenced by BaseWall::setIndSpecies(), and BaseParticle::setIndSpecies().

110 {
111  indSpecies_ = indSpecies;
112 }
unsigned int indSpecies_
void BaseInteractable::setOrientation ( const Vec3D orientation)

Sets the orientation of this BaseInteractable.

Sets the orientation of the interactable. interpretation depends on which interactable is being considered See also BaseInteractable::getOrientation.

Parameters
[in]orientationReference to Vec3D storing the orientation of the particle.

Definition at line 267 of file BaseInteractable.cc.

References orientation_.

Referenced by applyPrescribedOrientation(), AxisymmetricIntersectionOfWalls::AxisymmetricIntersectionOfWalls(), helpers::objectivenessTest(), BaseParticle::oldRead(), and ChuteBottom::setupInitialConditions().

268 {
269  orientation_ = orientation;
270 }
void BaseInteractable::setPosition ( const Vec3D position)
void BaseInteractable::setPrescribedAngularVelocity ( const std::function< Vec3D(double)> &  prescribedAngularVelocity)

Allows the angular velocity of the infinite mass interactable to be prescribed.

Definition at line 574 of file BaseInteractable.cc.

References prescribedAngularVelocity_.

575 {
576  prescribedAngularVelocity_ = prescribedAngularVelocity;
577 }
std::function< Vec3D(double)> prescribedAngularVelocity_
void BaseInteractable::setPrescribedOrientation ( const std::function< Vec3D(double)> &  prescribedOrientation)

Allows the orientation of the infinite mass interactbale to be prescribed.

This is similar to the BaseInteractable::setPrescribedPosition and works the same way. See BaseInteractable::setPrescibedPosition and BaseInteractable::setPrescribedVelocity for more details how it works. Note, the rate of change of the orientation can also be set using the function BaseInteractable::setPrescribedAngularVelocity.

Parameters
[in]prescribedOrientationstd::function which is the lambda function and takes a double the time and returns a Vec 3D which is the orientation of the interactable for that time.

Definition at line 547 of file BaseInteractable.cc.

References prescribedOrientation_.

548 {
549  prescribedOrientation_ = prescribedOrientation;
550 }
std::function< Vec3D(double)> prescribedOrientation_
void BaseInteractable::setPrescribedPosition ( const std::function< Vec3D(double)> &  prescribedPosition)

Allows the position of an infinite mass interactable to be prescribed.

This functions is used to give an interactable a prescribed motion, which is defined by a std::function. This is the new moving walls interface. A demo of the use would be: setPrescribedPosition([this] (double time) { return Vec3D(getXMin(),0.0,shaker_amp * std::sin(t * 2.0 * shaker_freq * constants::pi)); } ); This example moves the wall sinusoidally with time.

Parameters
[in]prescribedPositionstd::function which is the lambda function and takes a double the time and returns a Vec 3D which is the position of the interactable for that time. See also BaseInteractable::setPrescribedVelocity for more information.

Definition at line 486 of file BaseInteractable.cc.

References prescribedPosition_.

487 {
488  prescribedPosition_ = prescribedPosition;
489 }
std::function< Vec3D(double)> prescribedPosition_
void BaseInteractable::setPrescribedVelocity ( const std::function< Vec3D(double)> &  prescribedVelocity)

Allows the velocity of an infinite mass interactable to be prescribed.

In a similar manner to BaseInteractable::setPrescribedPosition this sets the velocity of the BaseInteactable. See also BaseInteractable::setPrescribedPosition Note, it is valid to set both the velocity and the position. No checking if these are consist is done at all. If you only set one of these function the other is automatically calculated using a by numerically differentiating or integrating the functions will is prescribed.

Parameters
[in]prescribedVelocitystd::function which is the lambda function and takes a double the time and returns a Vec 3D which is the velocity of the intertable for that time.

Definition at line 517 of file BaseInteractable.cc.

References prescribedVelocity_.

518 {
519  prescribedVelocity_ = prescribedVelocity;
520 }
std::function< Vec3D(double)> prescribedVelocity_
void BaseInteractable::setSpecies ( const ParticleSpecies species)

Sets the species of this BaseInteractable.

This function sets the species associated with this interactable object. Again this must be a ParticleSpecies. Note, it also automatically sets the index on the indSpecies_ by working up the correct index. However, index should be carefully used

Parameters
[in]speciesParticleSpcies pointer which is species holding the physical properties.

Definition at line 135 of file BaseInteractable.cc.

References ERROR, BaseSpecies::getHandler(), BaseObject::getIndex(), indSpecies_, logger, and species_.

Referenced by BaseWall::setSpecies(), and BaseParticle::setSpecies().

136 {
137  if (species->getHandler() == nullptr)
138  {
139  logger(ERROR, "Error: Species is not part of any handler yet");
140  }
141 
142  species_ = species;
143  indSpecies_ = species->getIndex();
144 }
unsigned int getIndex() const
Returns the index of the object in the handler.
Definition: BaseObject.cc:108
unsigned int indSpecies_
Logger< MERCURY_LOGLEVEL > logger("MercuryKernel")
SpeciesHandler * getHandler() const
Returns the pointer to the handler to which this species belongs.
Definition: BaseSpecies.cc:74
const ParticleSpecies * species_
void BaseInteractable::setTorque ( const Vec3D torque)

Sets the torque on this BaseInteractable.

This sets the torque being applied to this interactable. Note, first the code computes all force/torques in the interactions and then loops over all interactable objects applying the torques from the interactions to the interactables involved in the interaction.

Parameters
[in]torqueVec3D which is the force to be applied.

Definition at line 192 of file BaseInteractable.cc.

References torque_.

193 {
194  torque_ = torque;
195 }
void BaseInteractable::write ( std::ostream &  os) const
pure virtual

Write a BaseInteractable to an output stream.

Parameters
[in]osThe output stream to which the BaseInteractable is written.

BaseInteractable write function. Writes out all the information required to recreate this interactable. To write this interactable to the screen call write(std::cout). See also BaseInteractable::read

Parameters
[in]osstd::ostream to which the information is written. Note, is any ostream is can be file or screen.

Implements BaseObject.

Implemented in IntersectionOfWalls, InfiniteWall, TriangulatedWall, InfiniteWallWithHole, BaseParticle, AxisymmetricIntersectionOfWalls, SphericalWall, Coil, RestrictedWall, Screw, CylindricalWall, BaseWall, LiquidFilmParticle, and ThermalParticle.

Definition at line 328 of file BaseInteractable.cc.

References angularVelocity_, force_, indSpecies_, orientation_, position_, torque_, velocity_, and BaseObject::write().

Referenced by BaseWall::write(), and BaseParticle::write().

329 {
330  BaseObject::write(os);
331  os << " indSpecies " << indSpecies_
332  << " position " << position_
333  << " orientation " << orientation_ << " " << 0.0
334  << " velocity " << velocity_
335  << " angularVelocity " << angularVelocity_ << " " << 0.0
336  << " force " << force_
337  << " torque " << torque_;
338 }
unsigned int indSpecies_
virtual void write(std::ostream &os) const =0
A purely virtual function which has an implementation which writes the name and the object id_ to the...
Definition: BaseObject.cc:133

Member Data Documentation

Vec3D BaseInteractable::angularVelocity_
private

Store the angular velocity of the interactable.

Definition at line 326 of file BaseInteractable.h.

Referenced by addAngularVelocity(), BaseInteractable(), getAngularVelocity(), read(), setAngularVelocity(), and write().

Vec3D BaseInteractable::force_
private

Stores the force applied to the interactable.

Definition at line 331 of file BaseInteractable.h.

Referenced by addForce(), BaseInteractable(), getForce(), read(), setForce(), and write().

unsigned int BaseInteractable::indSpecies_
private

Stores the index on the species associated with this interactable.

Definition at line 347 of file BaseInteractable.h.

Referenced by BaseInteractable(), getIndSpecies(), read(), setIndSpecies(), setSpecies(), and write().

std::list<BaseInteraction*> BaseInteractable::interactions_
private

List of interactions this interactable is involved with.

Definition at line 357 of file BaseInteractable.h.

Referenced by addInteraction(), BaseInteractable(), copyInteractionsForPeriodicParticles(), getInteractions(), removeInteraction(), and ~BaseInteractable().

Vec3D BaseInteractable::orientation_
private

Stores the orientation of the interactable. Exactly what is stored depends on the type of interatable

Definition at line 321 of file BaseInteractable.h.

Referenced by BaseInteractable(), getOrientation(), read(), rotate(), setOrientation(), and write().

Vec3D BaseInteractable::position_
private

Stores the position of the interactable. Exactly what is stored depends on the type of interactable.

Definition at line 315 of file BaseInteractable.h.

Referenced by BaseInteractable(), getPosition(), move(), read(), setPosition(), and write().

std::function<Vec3D (double)> BaseInteractable::prescribedAngularVelocity_
private

User defined functions which if set describes the angular velocity of the interactable.

Definition at line 309 of file BaseInteractable.h.

Referenced by applyPrescribedAngularVelocity(), BaseInteractable(), integrateAfterForceComputation(), integrateBeforeForceComputation(), and setPrescribedAngularVelocity().

std::function<Vec3D (double)> BaseInteractable::prescribedOrientation_
private

User defined function which if set describes the orientation of the interactable

Definition at line 303 of file BaseInteractable.h.

Referenced by applyPrescribedOrientation(), BaseInteractable(), integrateAfterForceComputation(), integrateBeforeForceComputation(), and setPrescribedOrientation().

std::function<Vec3D (double)> BaseInteractable::prescribedPosition_
private

User defined function which if set describes the position of the interactable

Definition at line 291 of file BaseInteractable.h.

Referenced by applyPrescribedPosition(), BaseInteractable(), integrateAfterForceComputation(), integrateBeforeForceComputation(), and setPrescribedPosition().

std::function<Vec3D (double)> BaseInteractable::prescribedVelocity_
private

User defined function which if set describes the velocity of the interactable.

Definition at line 297 of file BaseInteractable.h.

Referenced by applyPrescribedVelocity(), BaseInteractable(), integrateAfterForceComputation(), integrateBeforeForceComputation(), and setPrescribedVelocity().

const ParticleSpecies* BaseInteractable::species_
private

Point to the ParticlesSpecies which stores density and other material properties of the interactable.

Definition at line 342 of file BaseInteractable.h.

Referenced by BaseInteractable(), getSpecies(), and setSpecies().

Vec3D BaseInteractable::torque_
private

Stores the torque applied to the interactable.

Definition at line 336 of file BaseInteractable.h.

Referenced by addTorque(), BaseInteractable(), getTorque(), read(), setTorque(), and write().

Vec3D BaseInteractable::velocity_
private

Stores the velocity of this interactable.

Definition at line 352 of file BaseInteractable.h.

Referenced by addVelocity(), BaseInteractable(), getVelocity(), read(), setVelocity(), and write().


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