|
Stores information about interactions between two interactable objects; often particles but could be walls etc. By info about interactions one means the overlaps, contact point, forces, torques, relative velocities etc. More...
#include <BaseInteraction.h>
Public Member Functions | |
BaseInteraction (BaseInteractable *P, BaseInteractable *I, unsigned timeStamp) | |
A constructor takes the BaseInteractable objects which are interacting (come into contact) and time the interaction starts. More... | |
BaseInteraction () | |
BaseInteraction (const BaseInteraction &p) | |
Copy constructor. More... | |
~BaseInteraction () override | |
The destructor. It removes this interactions from the objects that were interacting, and writes the time to a file when needed. More... | |
virtual void | actionsOnErase () |
If an interaction needs to do something before it gets erased, add it here. E.g. Liquid bridges rupture at the end of their lifetime, and the liquid bridge volume has to be redistributed. The reason this action is not done in the destructor is that this action should not be taken when erasing ghost interactions. More... | |
virtual void | computeForce () |
Virtual function that contains the force law between the two objects interacting. More... | |
void | read (std::istream &is) override |
Interaction read function, which accepts an std::istream as input. More... | |
void | write (std::ostream &os) const override |
Interaction print function, which accepts an std::ostream as input. More... | |
void | writeToFStat (std::ostream &os, Mdouble time) const |
Writes forces data to the FStat file. More... | |
std::string | getName () const override |
Virtual function which allows interactions to be named. More... | |
virtual Mdouble | getElasticEnergy () const |
Returns a Mdouble which is the current about of Elastic energy in the interaction. More... | |
void | setDistance (Mdouble distance) |
Sets the interaction distance between the two interacting objects. More... | |
void | setNormal (Vec3D normal) |
Sets the normal vector between the two interacting objects. More... | |
void | setOverlap (Mdouble overlap) |
Set the overlap between the two interacting object. More... | |
void | setContactPoint (Vec3D contactPoint) |
Set the location of the contact point between the two interacting objects. More... | |
void | setTimeStamp (unsigned timeStamp) |
Updates the time step of the interacting. Note, time steps used to find completed interactions. More... | |
void | setSpecies (const BaseSpecies *species) |
Set the Species of the interaction; note this can either be a Species or MixedSpecies. More... | |
void | setP (BaseInteractable *P) |
Sets the first object involved in the interaction (normally a particle). More... | |
void | setI (BaseInteractable *I) |
Sets the second object involved in the interaction (often particle or wall). More... | |
void | importP (BaseInteractable *P) |
Sets the first object involved in the interaction (normally a particle). More... | |
void | importI (BaseInteractable *I) |
Sets the second object involved in the interaction (often particle or wall). More... | |
Vec3D | getIP () const |
Vec3D | getIC () const |
Vec3D | getCP () const |
void | setLagrangeMultiplier (Mdouble multiplier) |
Mdouble | getLagrangeMultiplier () |
void | setHandler (InteractionHandler *handler) |
Sets the pointer to the interaction hander which is storing this interaction. More... | |
InteractionHandler * | getHandler () const |
Gets a point to the interaction handlers to which this interaction belongs. More... | |
const Vec3D & | getForce () const |
Gets the current force (vector) between the two interacting objects. More... | |
const Vec3D & | getTorque () const |
Gets the current torque (vector) between the two interacting objects. More... | |
const Vec3D & | getNormal () const |
Gets the normal vector between the two interacting objects. More... | |
const Vec3D & | getContactPoint () const |
Gets constant reference to contact point (vector). More... | |
Mdouble | getOverlap () const |
Returns a Mdouble with the current overlap between the two interacting objects. More... | |
Mdouble | getOverlapVolume () const |
Returns the overlap volume between two interacting objects. More... | |
Mdouble | getContactRadius () const |
Returns a Mdouble with the current contact between the two interacting objects. More... | |
void | removeFromHandler () |
Removes this interaction from its interaction hander. More... | |
void | copySwitchPointer (const BaseInteractable *original, BaseInteractable *ghost) const |
This copies the interactions of the original particle and replaces the original with the ghost copy. More... | |
void | gatherContactStatistics () |
BaseInteractable * | getP () |
Returns a pointer to first object involved in the interaction (normally a particle). More... | |
BaseInteractable * | getI () |
Returns a pointer to the second object involved in the interaction (often a wall or a particle). More... | |
const BaseInteractable * | getP () const |
Returns a constant pointer to the first object involved in the interaction. More... | |
const BaseInteractable * | getI () const |
Returns a constant pointer to the second object involved in the interaction. More... | |
Mdouble | getTimeStamp () const |
Returns an Mdouble which is the time stamp of the interaction. More... | |
virtual void | integrate (Mdouble timeStep) |
integrates variables of the interaction which need to be integrate e.g. the tangential overlap. More... | |
virtual Mdouble | getTangentialOverlap () const |
get the length of the current tangential overlap More... | |
Mdouble | getDistance () const |
Returns an Mdouble which is the norm (length) of distance vector. More... | |
const Vec3D & | getRelativeVelocity () const |
Returns a constant reference to a vector of relative velocity. More... | |
Mdouble | getNormalRelativeVelocity () const |
Returns a double which is the norm (length) of the relative velocity vector. More... | |
Mdouble | getAbsoluteNormalForce () const |
Returns the absolute value of the norm (length) of the Normal force vector. More... | |
virtual BaseInteraction * | copy () const =0 |
Makes a copy of the interaction and returns a pointer to the copy. More... | |
void | setFStatData (std::fstream &fstat, BaseParticle *P, BaseWall *I) |
void | setFStatData (std::fstream &fstat, BaseParticle *P, BaseParticle *I) |
unsigned int | getMultiContactIdentifier () const |
void | setMultiContactIdentifier (unsigned int multiContactIdentifier_) |
virtual void | rotateHistory (Matrix3D &rotationMatrix) |
When periodic particles are used, some interactions need certain history properties rotated (e.g. tangential springs). This is the function for that. More... | |
virtual void | actionsAfterTimeStep () |
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 |
void | addForce (Vec3D force) |
add an force increment to the total force. More... | |
void | addTorque (Vec3D torque) |
add a torque increment to the total torque. More... | |
void | setForce (Vec3D force) |
set total force (this is used by the normal force, tangential forces are added use addForce) More... | |
void | setTorque (Vec3D torque) |
set the total force (this is used by the normal force, tangential torques are added use addTorque) More... | |
const BaseSpecies * | getBaseSpecies () const |
Return a constant point to BaseSpecies of the interaction. More... | |
virtual void | createMPIType () |
virtual void * | createMPIInteractionDataArray (unsigned int numberOfInteractions) const |
virtual void | deleteMPIInteractionDataArray (void *dataArray) |
virtual void | getMPIInteraction (void *historyDataArray, unsigned int index) const |
copies the history interactions into the data array More... | |
virtual void | getInteractionDetails (void *interactionDataArray, unsigned int index, unsigned int &identificationP, unsigned int &identificationI, bool &isWallInteraction, unsigned &timeStamp) |
virtual void | setMPIInteraction (void *interactionDataArray, unsigned int index, bool resetPointers) |
void | setBasicMPIInteractionValues (int P, int I, unsigned timeStamp, Vec3D force, Vec3D torque, bool isWallInteraction, bool resetPointers) |
void | setIdentificationP (unsigned int identification) |
void | setIdentificationI (int identification) |
void | setWallInteraction (bool flag) |
unsigned int | getIdentificationP () |
int | getIdentificationI () |
bool | isWallInteraction () |
virtual bool | isBonded () 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 |
Protected Member Functions | |
virtual const Vec3D | getTangentialForce () const |
Mdouble | getEffectiveRadius () const |
Returns a Mdouble to the effective radius of the interaction. (Not corrected for the overlap) More... | |
Mdouble | getEffectiveMass () const |
Returns a Mdouble to the effective radius of the interaction. (Not corrected for the overlap) More... | |
void | setRelativeVelocity (Vec3D relativeVelocity) |
set the relative velocity of the current of the interactions. More... | |
void | setNormalRelativeVelocity (Mdouble normalRelativeVelocit) |
set the normal component of the relative velocity. More... | |
void | setAbsoluteNormalForce (Mdouble absoluteNormalForce) |
the absolute values of the norm (length) of the normal force More... | |
virtual Mdouble | getElasticEnergyAtEquilibrium (Mdouble adhesiveForce) const |
virtual void | reverseHistory () |
When periodic particles some interaction need certain history properties reversing. This is the function for that. More... | |
void | writeInteraction (std::ostream &os, bool created) const |
Writes information about a interaction to the interaction file. More... | |
Private Attributes | |
InteractionHandler * | handler_ |
BaseInteractable * | P_ |
BaseInteractable * | I_ |
unsigned int | identificationP_ |
int | identificationI_ |
bool | isWallInteraction_ |
Vec3D | contactPoint_ |
Vec3D | relativeVelocity_ |
Mdouble | normalRelativeVelocity_ |
Mdouble | absoluteNormalForce_ |
Mdouble | distance_ |
Vec3D | force_ |
Vec3D | torque_ |
unsigned | timeStamp_ |
Vec3D | normal_ |
Mdouble | overlap_ |
const BaseSpecies * | species_ |
Mdouble | lagrangeMultiplier_ |
unsigned | multiContactIdentifier_ |
Stores information about interactions between two interactable objects; often particles but could be walls etc. By info about interactions one means the overlaps, contact point, forces, torques, relative velocities etc.
This class is completely a MercuryDPM internal and should not be visible to users. It is also an abstract base class. All possible Mercury interactions are derived from this class. It is basically a policy class that defines what an interaction must have in Mercury. Advanced uses that need to add a new interaction must derive it from here and implement the black functions.
BaseInteraction::BaseInteraction | ( | BaseInteractable * | P, |
BaseInteractable * | I, | ||
unsigned | timeStamp | ||
) |
A constructor takes the BaseInteractable objects which are interacting (come into contact) and time the interaction starts.
This is the constructor which creates a new interactions between two BaseInteractable objects. The timeStamp is time the interactions is created and is used to check if the interations is current or has ended. It adds
[in] | P | BaseInteractable pointer which is the first object involved in the interaction normally a particle. |
[in] | I | BaseInteractable pointer which is the second object involved in the interaction often a wall or particle. |
[in] | timeStamp | Mdouble which is the time the interaction starts. |
References contactPoint_, force_, I_, lagrangeMultiplier_, normal_, ONE_FILE, overlap_, Global_Physical_Variables::P, P_, Vec3D::setNaN(), Vec3D::setZero(), species_, timeStamp_, torque_, and writeInteraction().
BaseInteraction::BaseInteraction | ( | ) |
References contactPoint_, force_, I_, lagrangeMultiplier_, normal_, overlap_, P_, Vec3D::setNaN(), Vec3D::setZero(), species_, timeStamp_, and torque_.
BaseInteraction::BaseInteraction | ( | const BaseInteraction & | p | ) |
Copy constructor.
This an copy constructor for a BaseInteraction.
[in] | p | BaseInteraction |
References contactPoint_, force_, I_, lagrangeMultiplier_, normal_, overlap_, P_, species_, timeStamp_, and torque_.
|
override |
The destructor. It removes this interactions from the objects that were interacting, and writes the time to a file when needed.
Destructor for BaseInteraction. Also removes the interaction from the list of interactions for both objects involved in the interaction.
References DEBUG, BaseHandler< T >::getDPMBase(), File::getFileType(), File::getFstream(), getHandler(), DPMBase::getInteractionFile(), I_, logger, ONE_FILE, P_, BaseInteractable::removeInteraction(), and writeInteraction().
|
virtual |
|
inlinevirtual |
If an interaction needs to do something before it gets erased, add it here. E.g. Liquid bridges rupture at the end of their lifetime, and the liquid bridge volume has to be redistributed. The reason this action is not done in the destructor is that this action should not be taken when erasing ghost interactions.
Reimplemented in LiquidMigrationWilletInteraction, and LiquidMigrationLSInteraction.
Referenced by InteractionHandler::eraseOldInteractions().
void BaseInteraction::addForce | ( | Vec3D | force | ) |
add an force increment to the total force.
add an increment to total force in the interaction. This is used by tangential and non-contact forces (e.g. adhesive forces) as this are 'added' after the normal forces have been computed.
References force_.
Referenced by BondedInteraction::computeAdhesionForce(), ChargedBondedInteraction::computeAdhesionForce(), IrreversibleAdhesiveInteraction::computeAdhesionForce(), LiquidBridgeWilletInteraction::computeAdhesionForce(), LiquidMigrationLSInteraction::computeAdhesionForce(), LiquidMigrationWilletInteraction::computeAdhesionForce(), ParhamiMcMeekingSinterInteraction::computeAdhesionForce(), ReversibleAdhesiveInteraction::computeAdhesionForce(), MindlinInteraction::computeFrictionForce(), and SlidingFrictionInteraction::computeFrictionForce().
void BaseInteraction::addTorque | ( | Vec3D | torque | ) |
add a torque increment to the total torque.
add an increment to total torque in the interaction. This is used by tangential and non-contact forces (e.g. adhesive forces) as this are 'added' after the normal forces have been computed.
References torque_.
Referenced by FrictionInteraction::computeFrictionForce(), and MindlinRollingTorsionInteraction::computeFrictionForce().
|
virtual |
Virtual function that contains the force law between the two objects interacting.
The children of this class will implement this function; however, it is blank. This function will do the actually force calculation for this interaction. Note, it is not virtual as it is not called from within this class.
Reimplemented in Interaction< NormalForceInteraction, FrictionForceInteraction, AdhesiveForceInteraction >.
|
pure virtual |
Makes a copy of the interaction and returns a pointer to the copy.
Implemented in Interaction< NormalForceInteraction, FrictionForceInteraction, AdhesiveForceInteraction >.
Referenced by copySwitchPointer().
void BaseInteraction::copySwitchPointer | ( | const BaseInteractable * | original, |
BaseInteractable * | ghost | ||
) | const |
This copies the interactions of the original particle and replaces the original with the ghost copy.
This functions copies the interactions of a real original particle. It first works out which of P and I is not the original particle. Then it create a new interactions between the new ghost copy and which every object is not the original particle from the P and I of the interaction. Note, at the end the ghost will be I in the new interaction and original item being interacted with will be P.
[in] | original | BaseInteractable* to the original particles who periodic image is being created from. |
[in] | ghost | BaseInteractble* to the new ghost (periodic partcles) that has just been created. |
References InteractionHandler::addObject(), copy(), getI(), getP(), handler_, I_, P_, and reverseHistory().
Referenced by BaseInteractable::copyInteractionsForPeriodicParticles().
|
virtual |
Reimplemented in Interaction< NormalForceInteraction, FrictionForceInteraction, AdhesiveForceInteraction >.
Referenced by InteractionHandler::createMPIInteractionDataArray().
|
virtual |
Reimplemented in Interaction< NormalForceInteraction, FrictionForceInteraction, AdhesiveForceInteraction >.
Referenced by MPIContainer::initialiseMercuryMPITypes().
|
virtual |
void BaseInteraction::gatherContactStatistics | ( | ) |
References Vec3D::dot(), force_, DPMBase::gatherContactStatistics(), BaseHandler< T >::getDPMBase(), getHandler(), BaseObject::getIndex(), Vec3D::getLength(), getNormal(), getOverlap(), getP(), BaseInteractable::getPosition(), getTangentialForce(), getTangentialOverlap(), I_, normal_, overlap_, and P_.
Mdouble BaseInteraction::getAbsoluteNormalForce | ( | ) | const |
Returns the absolute value of the norm (length) of the Normal force vector.
Returns the absolute normal force. This is the magnitude of the normal force.
References absoluteNormalForce_.
Referenced by FrictionInteraction::computeFrictionForce(), MindlinInteraction::computeFrictionForce(), MindlinRollingTorsionInteraction::computeFrictionForce(), SlidingFrictionInteraction::computeFrictionForce(), and MindlinInteraction::updateK_t().
const BaseSpecies * BaseInteraction::getBaseSpecies | ( | ) | const |
Return a constant point to BaseSpecies of the interaction.
Returns a BaseSpecies pointer to the current species. Note, this will be either a Species or a MixedSpecies done of which are derived from BaseSpecies.
References species_.
Referenced by FrictionInteraction::computeFrictionForce(), SlidingFrictionInteraction::computeFrictionForce(), ChargedBondedInteraction::getElasticEnergy(), IrreversibleAdhesiveInteraction::getElasticEnergy(), FrictionInteraction::getElasticEnergy(), SlidingFrictionInteraction::getElasticEnergy(), LinearPlasticViscoelasticInteraction::getElasticEnergy(), LinearViscoelasticInteraction::getElasticEnergy(), BondedInteraction::getSpecies(), ChargedBondedInteraction::getSpecies(), EmptyAdhesiveInteraction::getSpecies(), IrreversibleAdhesiveInteraction::getSpecies(), LiquidBridgeWilletInteraction::getSpecies(), LiquidMigrationLSInteraction::getSpecies(), LiquidMigrationWilletInteraction::getSpecies(), ParhamiMcMeekingSinterInteraction::getSpecies(), RegimeSinterInteraction::getSpecies(), ReversibleAdhesiveInteraction::getSpecies(), EmptyFrictionInteraction::getSpecies(), FrictionInteraction::getSpecies(), MindlinInteraction::getSpecies(), MindlinRollingTorsionInteraction::getSpecies(), SlidingFrictionInteraction::getSpecies(), HertzianSinterInteraction::getSpecies(), HertzianViscoelasticInteraction::getSpecies(), LinearPlasticViscoelasticInteraction::getSpecies(), LinearViscoelasticInteraction::getSpecies(), SinterInteraction::getSpecies(), SinterLinInteraction::getSpecies(), and SPHInteraction::getSpecies().
|
inline |
Gets constant reference to contact point (vector).
Returns a reference to a Vec3D which contains the current value of the contact point for the particles in interaction. Normally, does not change about the interaction is created.
References contactPoint_.
Referenced by ContactDetectionNormalSpheresTest::actionsAfterTimeStep(), ContactDetectionRotatedSpheresTest::actionsAfterTimeStep(), HertzianViscoelasticInteraction::computeNormalForce(), LinearPlasticViscoelasticInteraction::computeNormalForce(), LinearViscoelasticInteraction::computeNormalForce(), SinterInteraction::computeNormalForce(), SinterLinInteraction::computeNormalForce(), SPHInteraction::computeNormalForce(), HertzianSinterInteraction::computeSinterForce(), CGCoordinates::R::getCNormal(), CGCoordinates::RZ::getCNormal(), CGCoordinates::X::getCNormal(), CGCoordinates::XY::getCNormal(), CGCoordinates::XZ::getCNormal(), CGCoordinates::Y::getCNormal(), CGCoordinates::YZ::getCNormal(), CGCoordinates::Z::getCNormal(), getCP(), getEffectiveMass(), getEffectiveRadius(), getIC(), SuperQuadricParticle::getInitialGuessForContact(), CGCoordinates::R::getINormal(), BaseWall::getInteractionWith(), MeshTriangle::getInteractionWith(), CGCoordinates::R::getPNormal(), main(), LiquidMigrationMPI2Test::outputXBallsData(), LiquidMigrationSelfTest::outputXBallsData(), ParticleInclusion::printTime(), CGFields::StandardFields::setCylindricalFields(), ContactDetectionWithWallTester::testEllipsoidsContact(), ContactDetectionWithWallTester::testSpheresContact(), and writeToFStat().
Mdouble BaseInteraction::getContactRadius | ( | ) | const |
Returns a Mdouble with the current contact between the two interacting objects.
Returns a Mdouble to the current overlap for the objects involved in the interaction.
References getEffectiveRadius(), and getOverlap().
Referenced by SinterLinInteraction::computeNormalForce().
Vec3D BaseInteraction::getCP | ( | ) | const |
returns the vector from C to P. Note, this cannot simply computed as P-I because I is possibly a ghost particle and might be shifted.
References getContactPoint(), getP(), and BaseInteractable::getPosition().
Referenced by CGFields::StandardFields::setFields().
Mdouble BaseInteraction::getDistance | ( | ) | const |
Returns an Mdouble which is the norm (length) of distance vector.
References distance_.
Referenced by FrictionInteraction::computeFrictionForce(), SlidingFrictionInteraction::computeSlidingSpring(), getIC(), getIP(), main(), and FileReader::read().
|
protected |
Returns a Mdouble to the effective radius of the interaction. (Not corrected for the overlap)
Computes the effective mass of the particles in the interaction. This is used by many of the later interaction models. This functions assumes P is the particle and I is either a particle or a wall. Effective Radius = \(R_I*R_P/(R_I+R_P)\) See also BaseInteraction::getEffectiveCorrectedRadius()
References getContactPoint(), getI(), BaseObject::getId(), BaseInteractable::getInvMass(), getP(), and logger.
Referenced by FrictionInteraction::computeFrictionForce(), MindlinInteraction::computeFrictionForce(), SlidingFrictionInteraction::computeFrictionForce(), HertzianViscoelasticInteraction::computeNormalForce(), LinearPlasticViscoelasticInteraction::computeNormalForce(), LinearViscoelasticInteraction::computeNormalForce(), FrictionInteraction::getElasticEnergy(), SlidingFrictionInteraction::getElasticEnergy(), LinearPlasticViscoelasticInteraction::getElasticEnergy(), LinearViscoelasticInteraction::getElasticEnergy(), and SinterLinInteraction::getElasticEnergy().
|
protected |
Returns a Mdouble to the effective radius of the interaction. (Not corrected for the overlap)
Computes the effective radius of the two particles in the interaction. This is used by many of the later interaction models. This functions assumes P is the particle and I is either a particle or a wall. Effective Radius = \(R_I*R_P/(R_I+R_P)\) See also BaseInteraction::getEffectiveCorrectedRadius()
References contactPoint_, getContactPoint(), BaseInteractable::getCurvature(), getI(), BaseObject::getId(), getP(), and logger.
Referenced by LiquidBridgeWilletInteraction::computeAdhesionForce(), LiquidMigrationLSInteraction::computeAdhesionForce(), LiquidMigrationWilletInteraction::computeAdhesionForce(), ParhamiMcMeekingSinterInteraction::computeAdhesionForce(), FrictionInteraction::computeFrictionForce(), MindlinInteraction::computeFrictionForce(), MindlinRollingTorsionInteraction::computeFrictionForce(), HertzianViscoelasticInteraction::computeNormalForce(), LinearPlasticViscoelasticInteraction::computeNormalForce(), SinterInteraction::computeNormalForce(), SinterLinInteraction::computeNormalForce(), HertzianSinterInteraction::computeSinterForce(), getContactRadius(), HertzianViscoelasticInteraction::getElasticEnergy(), HertzianViscoelasticInteraction::getElasticEnergyAtEquilibrium(), SinterInteraction::getFieldVTK(), HertzianSinterInteraction::getUnloadingModulus(), LinearPlasticViscoelasticInteraction::getUnloadingStiffness(), SinterInteraction::getUnloadingStiffness(), and SinterLinInteraction::getUnloadingStiffness().
|
virtual |
Returns a Mdouble which is the current about of Elastic energy in the interaction.
The children of this class will implement this function; however, it is blank. This function will contain the calculation for th elastic energy. Note, it is not virtual as it is not called from within this class.
Reimplemented in SPHInteraction, SinterLinInteraction, SinterInteraction, LinearViscoelasticInteraction, LinearPlasticViscoelasticInteraction, HertzianViscoelasticInteraction, HertzianSinterInteraction, SlidingFrictionInteraction, MindlinRollingTorsionInteraction, MindlinInteraction, FrictionInteraction, EmptyFrictionInteraction, ReversibleAdhesiveInteraction, RegimeSinterInteraction, ParhamiMcMeekingSinterInteraction, LiquidMigrationWilletInteraction, LiquidMigrationLSInteraction, LiquidBridgeWilletInteraction, IrreversibleAdhesiveInteraction, EmptyAdhesiveInteraction, ChargedBondedInteraction, BondedInteraction, and Interaction< NormalForceInteraction, FrictionForceInteraction, AdhesiveForceInteraction >.
|
inlineprotectedvirtual |
|
virtual |
Reimplemented in SinterInteraction, LiquidMigrationWilletInteraction, and LiquidMigrationLSInteraction.
|
inline |
Gets the current force (vector) between the two interacting objects.
Return a reference to a Vec3D which contains the current value of the force associated with this interaction.
References force_.
Referenced by MercuryProblem::actionsAfterTimeStep(), BondedInteraction::bondInPlace(), MPIInteraction< NormalForceInteraction, FrictionForceInteraction, AdhesiveForceInteraction >::copyFromInteraction(), CGFields::StandardFields::setFields(), and SingleParticle< SpeciesType >::writeEneTimeStep().
InteractionHandler * BaseInteraction::getHandler | ( | ) | const |
Gets a point to the interaction handlers to which this interaction belongs.
References handler_.
Referenced by FrictionInteraction::computeFrictionForce(), MindlinInteraction::computeFrictionForce(), MindlinRollingTorsionInteraction::computeFrictionForce(), SinterInteraction::computeNormalForce(), SinterLinInteraction::computeNormalForce(), HertzianSinterInteraction::computeSinterForce(), SlidingFrictionInteraction::computeSlidingSpring(), SlidingFrictionInteraction::computeSlidingSpringSuperQuadric(), gatherContactStatistics(), and ~BaseInteraction().
|
inline |
Returns a pointer to the second object involved in the interaction (often a wall or a particle).
Returns a pointer to the second object in the interaction; often a particle or a wall i.e. a general interactale hence I.
References BaseObject::getId(), I_, and logger.
Referenced by InteractionHandler::addObject(), ChargedBondedInteraction::computeAdhesionForce(), FrictionInteraction::computeFrictionForce(), MindlinRollingTorsionInteraction::computeFrictionForce(), HertzianViscoelasticInteraction::computeNormalForce(), LinearPlasticViscoelasticInteraction::computeNormalForce(), LinearViscoelasticInteraction::computeNormalForce(), SinterInteraction::computeNormalForce(), SinterLinInteraction::computeNormalForce(), SPHInteraction::computeNormalForce(), HertzianSinterInteraction::computeSinterForce(), SlidingFrictionInteraction::computeSlidingSpring(), SlidingFrictionInteraction::computeSlidingSpringSuperQuadric(), MPIInteraction< NormalForceInteraction, FrictionForceInteraction, AdhesiveForceInteraction >::copyFromInteraction(), copySwitchPointer(), LiquidMigrationLSInteraction::form(), LiquidMigrationWilletInteraction::form(), getEffectiveMass(), getEffectiveRadius(), ChargedBondedInteraction::getElasticEnergy(), CGCoordinates::R::getINormal(), CGCoordinates::RZ::getINormal(), CGCoordinates::X::getINormal(), CGCoordinates::XY::getINormal(), CGCoordinates::XYZ::getINormal(), CGCoordinates::XZ::getINormal(), CGCoordinates::Y::getINormal(), CGCoordinates::YZ::getINormal(), CGCoordinates::Z::getINormal(), getOverlapVolume(), InteractionHandler::removeObjectKeepingPeriodics(), LiquidMigrationLSInteraction::rupture(), and LiquidMigrationWilletInteraction::rupture().
|
inline |
Returns a constant pointer to the second object involved in the interaction.
Returns a constant pointer to the second object in the interaction; often a particle or a wall i.e. a general interactale hence I.
References BaseObject::getId(), I_, and logger.
Vec3D BaseInteraction::getIC | ( | ) | const |
returns the vector from I to C. Note, this cannot simply computed as P-I because I is possibly a ghost particle and might be shifted.
References getContactPoint(), getDistance(), getNormal(), getP(), and BaseInteractable::getPosition().
Referenced by CGFields::StandardFields::setFields().
int BaseInteraction::getIdentificationI | ( | ) |
References identificationI_.
unsigned int BaseInteraction::getIdentificationP | ( | ) |
References identificationP_.
|
virtual |
Reimplemented in Interaction< NormalForceInteraction, FrictionForceInteraction, AdhesiveForceInteraction >.
Referenced by InteractionHandler::getInteractionDetails().
Vec3D BaseInteraction::getIP | ( | ) | const |
returns the vector from I to P. Note, this cannot simply computed as P-I because I is possibly a ghost particle and might be shifted.
References getDistance(), and getNormal().
Referenced by CGFields::StandardFields::setFields().
|
inline |
References lagrangeMultiplier_.
Referenced by SuperQuadricParticle::getInitialGuessForContact().
|
virtual |
copies the history interactions into the data array
Reimplemented in Interaction< NormalForceInteraction, FrictionForceInteraction, AdhesiveForceInteraction >.
unsigned int BaseInteraction::getMultiContactIdentifier | ( | ) | const |
References multiContactIdentifier_.
|
overridevirtual |
Virtual function which allows interactions to be named.
Functions which returns the name of the Interaction here is called BaseInteraction; but, it should be later overridden by the actual interaction classes.
Implements BaseObject.
Reimplemented in Interaction< NormalForceInteraction, FrictionForceInteraction, AdhesiveForceInteraction >.
Referenced by write().
|
virtual |
Reimplemented in SinterInteraction, LiquidMigrationWilletInteraction, and LiquidMigrationLSInteraction.
Referenced by InteractionVTKWriter::writeVTKPointData().
|
inline |
Gets the normal vector between the two interacting objects.
Returns a reference to a Vec3D which contains the current value of the normal associated with the interactions.
References normal_.
Referenced by BondedInteraction::computeAdhesionForce(), ChargedBondedInteraction::computeAdhesionForce(), IrreversibleAdhesiveInteraction::computeAdhesionForce(), LiquidBridgeWilletInteraction::computeAdhesionForce(), LiquidMigrationLSInteraction::computeAdhesionForce(), LiquidMigrationWilletInteraction::computeAdhesionForce(), ParhamiMcMeekingSinterInteraction::computeAdhesionForce(), ReversibleAdhesiveInteraction::computeAdhesionForce(), FrictionInteraction::computeFrictionForce(), MindlinInteraction::computeFrictionForce(), MindlinRollingTorsionInteraction::computeFrictionForce(), SlidingFrictionInteraction::computeFrictionForce(), HertzianViscoelasticInteraction::computeNormalForce(), LinearPlasticViscoelasticInteraction::computeNormalForce(), LinearViscoelasticInteraction::computeNormalForce(), SinterInteraction::computeNormalForce(), SinterLinInteraction::computeNormalForce(), SPHInteraction::computeNormalForce(), HertzianSinterInteraction::computeSinterForce(), SlidingFrictionInteraction::computeSlidingSpring(), SlidingFrictionInteraction::computeSlidingSpringSuperQuadric(), gatherContactStatistics(), getIC(), CGCoordinates::XYZ::getINormal(), BaseParticle::getInteractionWith(), ArcWall::getInteractionWith(), BaseWall::getInteractionWith(), Combtooth::getInteractionWith(), MeshTriangle::getInteractionWith(), VChute::getInteractionWith(), getIP(), FrictionInteraction::integrate(), MindlinRollingTorsionInteraction::integrate(), setFStatData(), and writeToFStat().
Mdouble BaseInteraction::getNormalRelativeVelocity | ( | ) | const |
Returns a double which is the norm (length) of the relative velocity vector.
Returns the norm (length) of the relative normal velocity. Note, this can be negative or positive it is not a speed.
References normalRelativeVelocity_.
Referenced by BondedInteraction::computeAdhesionForce(), ChargedBondedInteraction::computeAdhesionForce(), LiquidMigrationLSInteraction::computeAdhesionForce(), ParhamiMcMeekingSinterInteraction::computeAdhesionForce(), MindlinInteraction::computeFrictionForce(), SlidingFrictionInteraction::computeFrictionForce(), HertzianViscoelasticInteraction::computeNormalForce(), LinearPlasticViscoelasticInteraction::computeNormalForce(), LinearViscoelasticInteraction::computeNormalForce(), SinterInteraction::computeNormalForce(), SinterLinInteraction::computeNormalForce(), SPHInteraction::computeNormalForce(), and HertzianSinterInteraction::computeSinterForce().
|
virtual |
Reimplemented in SinterInteraction, LiquidMigrationWilletInteraction, and LiquidMigrationLSInteraction.
|
inline |
Returns a Mdouble with the current overlap between the two interacting objects.
References overlap_.
Referenced by LiquidMigrationLSInteraction::actionsAfterTimeStep(), LiquidMigrationWilletInteraction::actionsAfterTimeStep(), ConstantRestitutionSelfTest::actionsBeforeTimeStep(), BondedInteraction::computeAdhesionForce(), ChargedBondedInteraction::computeAdhesionForce(), IrreversibleAdhesiveInteraction::computeAdhesionForce(), LiquidBridgeWilletInteraction::computeAdhesionForce(), LiquidMigrationLSInteraction::computeAdhesionForce(), LiquidMigrationWilletInteraction::computeAdhesionForce(), ParhamiMcMeekingSinterInteraction::computeAdhesionForce(), ReversibleAdhesiveInteraction::computeAdhesionForce(), HertzianViscoelasticInteraction::computeNormalForce(), LinearPlasticViscoelasticInteraction::computeNormalForce(), LinearViscoelasticInteraction::computeNormalForce(), SinterInteraction::computeNormalForce(), SinterLinInteraction::computeNormalForce(), SPHInteraction::computeNormalForce(), HertzianSinterInteraction::computeSinterForce(), gatherContactStatistics(), getContactRadius(), BondedInteraction::getElasticEnergy(), ChargedBondedInteraction::getElasticEnergy(), IrreversibleAdhesiveInteraction::getElasticEnergy(), HertzianSinterInteraction::getElasticEnergy(), HertzianViscoelasticInteraction::getElasticEnergy(), LinearPlasticViscoelasticInteraction::getElasticEnergy(), LinearViscoelasticInteraction::getElasticEnergy(), SinterInteraction::getElasticEnergy(), SinterLinInteraction::getElasticEnergy(), SPHInteraction::getElasticEnergy(), SuperQuadricParticle::getInitialGuessForContact(), BaseParticle::getInteractionWith(), ArcWall::getInteractionWith(), BaseWall::getInteractionWith(), Combtooth::getInteractionWith(), MeshTriangle::getInteractionWith(), VChute::getInteractionWith(), SuperQuadricParticle::getInteractionWithSuperQuad(), getOverlapVolume(), HertzianSinterInteraction::getUnloadingModulus(), LinearPlasticViscoelasticInteraction::getUnloadingStiffness(), SinterInteraction::getUnloadingStiffness(), SinterLinInteraction::getUnloadingStiffness(), main(), FileReader::read(), setFStatData(), ContactDetectionWithWallTester::testEllipsoidsContact(), ContactDetectionWithWallTester::testSpheresContact(), MindlinInteraction::updateTangentialStiffnessZero(), SingleParticle< SpeciesType >::writeEneTimeStep(), and writeToFStat().
Mdouble BaseInteraction::getOverlapVolume | ( | ) | const |
Returns the overlap volume between two interacting objects.
Converts the linear overlap in the correct volume overlap i.e. this is the spherical cap approximation Please see additional docs directory for the calculation of this and the mathematica file with the calculation in
References BaseInteractable::getCurvature(), getI(), getOverlap(), getP(), logger, constants::pi, and WARN.
Referenced by ExtremeOverlapVolumeUnitTest::setupInitialConditions().
|
inline |
Returns a pointer to first object involved in the interaction (normally a particle).
Returns a pointer to the first object in the interactions; normally the particle.
References BaseObject::getId(), logger, and P_.
Referenced by InteractionHandler::addObject(), ChargedBondedInteraction::computeAdhesionForce(), FrictionInteraction::computeFrictionForce(), MindlinRollingTorsionInteraction::computeFrictionForce(), HertzianViscoelasticInteraction::computeNormalForce(), LinearPlasticViscoelasticInteraction::computeNormalForce(), LinearViscoelasticInteraction::computeNormalForce(), SinterInteraction::computeNormalForce(), SinterLinInteraction::computeNormalForce(), SPHInteraction::computeNormalForce(), HertzianSinterInteraction::computeSinterForce(), SlidingFrictionInteraction::computeSlidingSpring(), MPIInteraction< NormalForceInteraction, FrictionForceInteraction, AdhesiveForceInteraction >::copyFromInteraction(), copySwitchPointer(), LiquidMigrationLSInteraction::form(), LiquidMigrationWilletInteraction::form(), gatherContactStatistics(), getCP(), getEffectiveMass(), getEffectiveRadius(), ChargedBondedInteraction::getElasticEnergy(), getIC(), getOverlapVolume(), CGCoordinates::R::getPNormal(), CGCoordinates::RZ::getPNormal(), CGCoordinates::X::getPNormal(), CGCoordinates::XY::getPNormal(), CGCoordinates::XZ::getPNormal(), CGCoordinates::Y::getPNormal(), CGCoordinates::YZ::getPNormal(), CGCoordinates::Z::getPNormal(), CGCoordinates::RZ::getTangentialSquared(), CGCoordinates::XY::getTangentialSquared(), CGCoordinates::XYZ::getTangentialSquared(), CGCoordinates::XZ::getTangentialSquared(), CGCoordinates::YZ::getTangentialSquared(), InteractionHandler::removeObjectKeepingPeriodics(), LiquidMigrationLSInteraction::rupture(), and LiquidMigrationWilletInteraction::rupture().
|
inline |
Returns a constant pointer to the first object involved in the interaction.
Returns a constant pointer to the first object in the interactions; normally the particle. Why implement const and non-const setters and getters? See https://www.gamedev.net/forums/topic/550112-c-non-const-getter-in-terms-of-const-getter/
References BaseObject::getId(), logger, and P_.
const Vec3D & BaseInteraction::getRelativeVelocity | ( | ) | const |
Returns a constant reference to a vector of relative velocity.
Returns the relative velocity between the two interactable objects involved in the interaction.
References relativeVelocity_.
Referenced by LiquidMigrationLSInteraction::computeAdhesionForce(), ParhamiMcMeekingSinterInteraction::computeAdhesionForce(), MindlinInteraction::computeFrictionForce(), SlidingFrictionInteraction::computeFrictionForce(), HertzianViscoelasticInteraction::computeNormalForce(), LinearPlasticViscoelasticInteraction::computeNormalForce(), LinearViscoelasticInteraction::computeNormalForce(), SinterInteraction::computeNormalForce(), SinterLinInteraction::computeNormalForce(), SPHInteraction::computeNormalForce(), and HertzianSinterInteraction::computeSinterForce().
|
protectedvirtual |
Returns a constant vector to the Tangential Force
Returns the vector that is the tangential force Note, at this level there cannot be a tangential force therefore by default it return the zero vector. This function will be overridden by interactions that have tangential components.
Reimplemented in SlidingFrictionInteraction, MindlinInteraction, and EmptyFrictionInteraction.
Referenced by gatherContactStatistics(), and writeToFStat().
|
virtual |
get the length of the current tangential overlap
Returns tangential overlap. Note, at this level there cannot be a tangential overlap hence by default it returns 0. This function will be overridden by interactions that have tangential components.
Reimplemented in SlidingFrictionInteraction, MindlinInteraction, and EmptyFrictionInteraction.
Referenced by gatherContactStatistics(), and writeToFStat().
|
inline |
Returns an Mdouble which is the time stamp of the interaction.
Returns the current time stamp of interaction. This should be the last time the interaction was active and used to find the end of the interaction.
References timeStamp_.
Referenced by MPIInteraction< NormalForceInteraction, FrictionForceInteraction, AdhesiveForceInteraction >::copyFromInteraction(), InteractionHandler::eraseOldInteractions(), and InteractionHandler::removeObjectKeepingPeriodics().
|
inline |
Gets the current torque (vector) between the two interacting objects.
Return a reference to a Vec3D which contains the current value of the torque associated with the interaction.
References torque_.
Referenced by MPIInteraction< NormalForceInteraction, FrictionForceInteraction, AdhesiveForceInteraction >::copyFromInteraction().
|
virtual |
Reimplemented in SinterInteraction, LiquidMigrationWilletInteraction, and LiquidMigrationLSInteraction.
Referenced by InteractionVTKWriter::writeVTKPointData().
void BaseInteraction::importI | ( | BaseInteractable * | I | ) |
Sets the second object involved in the interaction (often particle or wall).
Changes the second object involved in the interaction. This function differs from BaseInteraction::setI(BaseInteractable* I) because no interactable is removed: this is needed in DPMBase::importParticlesAs as in it there's no iteractable to remove and using BaseInteraction::setI(BaseInteractable* I) would led to an output printing overloaded with warnings.
[in] | I | BaseInteractable* The particle involved in the interaction. |
References BaseInteractable::addInteraction(), BaseObject::getId(), I_, identificationI_, and BaseInteractable::removeInteraction().
void BaseInteraction::importP | ( | BaseInteractable * | P | ) |
Sets the first object involved in the interaction (normally a particle).
Set the first object involved in the interaction. This function differs from BaseInteraction::setP(BaseInteractable* P) because no interactable is removed: this is needed in DPMBase::importParticlesAs as in it there's no iteractable to remove and using BaseInteraction::setP(BaseInteractable* P) would led to an output printing overloaded with warnings.
[in] | P | BaseInteractable* The particle involved in the interaction. |
References BaseInteractable::addInteraction(), BaseObject::getId(), identificationP_, Global_Physical_Variables::P, P_, and BaseInteractable::removeInteraction().
|
virtual |
integrates variables of the interaction which need to be integrate e.g. the tangential overlap.
Various variables in the force law need to be integrated. This is the place where this code goes. Note, it is empty at this point; it can be overriden in subclasses. For usage, see e.g. MindlinInteraction.cc.
[in] | timeStep | The time-step dt. |
Reimplemented in SlidingFrictionInteraction, MindlinRollingTorsionInteraction, MindlinInteraction, FrictionInteraction, EmptyFrictionInteraction, and Interaction< NormalForceInteraction, FrictionForceInteraction, AdhesiveForceInteraction >.
|
inlinevirtual |
bool BaseInteraction::isWallInteraction | ( | ) |
References isWallInteraction_.
|
overridevirtual |
Interaction read function, which accepts an std::istream as input.
BaseInteaction read functions. Reads in all the information about an interaction. Note, this can be from any istream but would normally be a file See also BaseInteaction::write
[in] | is | std::istream to which the information is read from. |
Implements BaseObject.
Reimplemented in SPHInteraction, SinterLinInteraction, SinterInteraction, LinearViscoelasticInteraction, LinearPlasticViscoelasticInteraction, HertzianViscoelasticInteraction, HertzianSinterInteraction, HertzianBSHPViscoelasticInteraction, SlidingFrictionInteraction, MindlinRollingTorsionInteraction, MindlinInteraction, FrictionInteraction, EmptyFrictionInteraction, and Interaction< NormalForceInteraction, FrictionForceInteraction, AdhesiveForceInteraction >.
References contactPoint_, force_, helpers::readOptionalVariable(), and torque_.
Referenced by HertzianSinterInteraction::read(), HertzianViscoelasticInteraction::read(), LinearPlasticViscoelasticInteraction::read(), LinearViscoelasticInteraction::read(), SinterInteraction::read(), SinterLinInteraction::read(), and SPHInteraction::read().
void BaseInteraction::removeFromHandler | ( | ) |
Removes this interaction from its interaction hander.
Removes the interaction from its InteractionHandler. Does no other cleaning up as it does not remove it from the particles.
References BaseObject::getIndex(), handler_, and BaseHandler< T >::removeObject().
|
protectedvirtual |
When periodic particles some interaction need certain history properties reversing. This is the function for that.
The children of this class will implement this function; however, it is blank. This function will contain code that changes some history information if a copy changes the P <-> I order; as can happen in creating a periodic particle. See also PeriodicBoundary::createPeriodicParticles and BaseInteraction::copySwitchPointer Note, it is not virtual as it is not called from within this class.
Reimplemented in SlidingFrictionInteraction, MindlinRollingTorsionInteraction, MindlinInteraction, FrictionInteraction, and Interaction< NormalForceInteraction, FrictionForceInteraction, AdhesiveForceInteraction >.
Referenced by copySwitchPointer().
|
virtual |
When periodic particles are used, some interactions need certain history properties rotated (e.g. tangential springs). This is the function for that.
Reimplemented in SlidingFrictionInteraction, MindlinRollingTorsionInteraction, MindlinInteraction, FrictionInteraction, and Interaction< NormalForceInteraction, FrictionForceInteraction, AdhesiveForceInteraction >.
References contactPoint_, force_, normal_, relativeVelocity_, and torque_.
|
protected |
the absolute values of the norm (length) of the normal force
set absolute normal force.
[in] | absoluteNormalForce | Mdouble contain the value of the absolute normal force. |
References absoluteNormalForce_.
Referenced by HertzianViscoelasticInteraction::computeNormalForce(), LinearPlasticViscoelasticInteraction::computeNormalForce(), LinearViscoelasticInteraction::computeNormalForce(), SinterInteraction::computeNormalForce(), SinterLinInteraction::computeNormalForce(), SPHInteraction::computeNormalForce(), and HertzianSinterInteraction::computeSinterForce().
void BaseInteraction::setBasicMPIInteractionValues | ( | int | P, |
int | I, | ||
unsigned | timeStamp, | ||
Vec3D | force, | ||
Vec3D | torque, | ||
bool | isWallInteraction, | ||
bool | resetPointers | ||
) |
References I_, P_, setForce(), setIdentificationI(), setIdentificationP(), setTimeStamp(), setTorque(), and setWallInteraction().
Referenced by MPIInteraction< NormalForceInteraction, FrictionForceInteraction, AdhesiveForceInteraction >::copyToInteraction().
void BaseInteraction::setContactPoint | ( | Vec3D | contactPoint | ) |
Set the location of the contact point between the two interacting objects.
References contactPoint_.
Referenced by BaseParticle::getInteractionWith(), ArcWall::getInteractionWith(), BaseWall::getInteractionWith(), Combtooth::getInteractionWith(), MeshTriangle::getInteractionWith(), SineWall::getInteractionWith(), TriangulatedWall::getInteractionWith(), VChute::getInteractionWith(), SuperQuadricParticle::getInteractionWithSuperQuad(), FileReader::read(), and setFStatData().
void BaseInteraction::setDistance | ( | Mdouble | distance | ) |
Sets the interaction distance between the two interacting objects.
set the distance of the interaction.
[in] | distance | Mdouble which is the distance to set. |
References distance_.
Referenced by BaseParticle::getInteractionWith(), ArcWall::getInteractionWith(), BaseWall::getInteractionWith(), Combtooth::getInteractionWith(), MeshTriangle::getInteractionWith(), SineWall::getInteractionWith(), TriangulatedWall::getInteractionWith(), VChute::getInteractionWith(), SuperQuadricParticle::getInteractionWithSuperQuad(), FileReader::read(), and setFStatData().
void BaseInteraction::setForce | ( | Vec3D | force | ) |
set total force (this is used by the normal force, tangential forces are added use addForce)
set the absolute values of the force. This is used by the normal forces as these are always called first and then the tangential and non-contact (e.g. adhesive forces) forces are added. See also BaseInteraction::addForce.
References force_.
Referenced by HertzianViscoelasticInteraction::computeNormalForce(), LinearPlasticViscoelasticInteraction::computeNormalForce(), LinearViscoelasticInteraction::computeNormalForce(), SinterInteraction::computeNormalForce(), SinterLinInteraction::computeNormalForce(), SPHInteraction::computeNormalForce(), HertzianSinterInteraction::computeSinterForce(), FileReader::read(), setBasicMPIInteractionValues(), and setFStatData().
void BaseInteraction::setFStatData | ( | std::fstream & | fstat, |
BaseParticle * | P, | ||
BaseParticle * | I | ||
) |
References getNormal(), getOverlap(), BaseParticle::getRadius(), Global_Physical_Variables::P, setContactPoint(), setDistance(), setForce(), setNormal(), and setOverlap().
void BaseInteraction::setFStatData | ( | std::fstream & | fstat, |
BaseParticle * | P, | ||
BaseWall * | I | ||
) |
References getNormal(), getOverlap(), Global_Physical_Variables::P, setContactPoint(), setDistance(), setForce(), setNormal(), and setOverlap().
Referenced by DPMBase::readNextFStatFile().
void BaseInteraction::setHandler | ( | InteractionHandler * | handler | ) |
Sets the pointer to the interaction hander which is storing this interaction.
set the handler which this interactions belongs to.
[in] | handler | InteractionHandler* pointer to the interaction handler, this interaction will belong. |
References handler_.
Referenced by InteractionHandler::addObject(), and InteractionHandler::getInteraction().
void BaseInteraction::setI | ( | BaseInteractable * | I | ) |
Sets the second object involved in the interaction (often particle or wall).
Changes the second object involved in the interaction; often a general interactable not always a particle. Note, set is slightly misleading as it removed the interaction from old interactable and adds it to the new interactable.
[in] | I | BaseInteractable* An interactable object that is involved in the interaction. |
References BaseInteractable::addInteraction(), BaseObject::getId(), I_, identificationI_, and BaseInteractable::removeInteraction().
Referenced by InteractionHandler::removeObjectKeepingPeriodics().
void BaseInteraction::setIdentificationI | ( | int | identification | ) |
References identificationI_.
Referenced by setBasicMPIInteractionValues().
void BaseInteraction::setIdentificationP | ( | unsigned int | identification | ) |
References identificationP_.
Referenced by setBasicMPIInteractionValues().
|
inline |
References lagrangeMultiplier_.
Referenced by SuperQuadricParticle::getInteractionWithSuperQuad().
|
virtual |
void BaseInteraction::setMultiContactIdentifier | ( | unsigned int | multiContactIdentifier_ | ) |
References multiContactIdentifier_.
Referenced by MeshTriangle::getInteractionWith().
void BaseInteraction::setNormal | ( | Vec3D | normal | ) |
Sets the normal vector between the two interacting objects.
sets the normal of the interaction, in direction from I to P.
Must be a unit normal vector. This is not checked by the class.
[in] | normal | Vec3D which is the normal of the interaction. |
References normal_.
Referenced by BaseParticle::getInteractionWith(), ArcWall::getInteractionWith(), BaseWall::getInteractionWith(), Combtooth::getInteractionWith(), MeshTriangle::getInteractionWith(), SineWall::getInteractionWith(), TriangulatedWall::getInteractionWith(), VChute::getInteractionWith(), SuperQuadricParticle::getInteractionWithSuperQuad(), FileReader::read(), and setFStatData().
|
protected |
set the normal component of the relative velocity.
set the norm (length) of the normal relative velocity.
[in] | normalRelativeVelocity | Mdouble containing the normal (length) of the normal velocity between the interactable objects. |
References normalRelativeVelocity_.
Referenced by HertzianViscoelasticInteraction::computeNormalForce(), LinearPlasticViscoelasticInteraction::computeNormalForce(), LinearViscoelasticInteraction::computeNormalForce(), SinterInteraction::computeNormalForce(), SinterLinInteraction::computeNormalForce(), SPHInteraction::computeNormalForce(), and HertzianSinterInteraction::computeSinterForce().
void BaseInteraction::setOverlap | ( | Mdouble | overlap | ) |
Set the overlap between the two interacting object.
set the overlap between the two interactable object involved in the interactions.
[in] | overlap | Mdouble which is the overlap to set. |
References overlap_.
Referenced by BaseParticle::getInteractionWith(), ArcWall::getInteractionWith(), BaseWall::getInteractionWith(), Combtooth::getInteractionWith(), MeshTriangle::getInteractionWith(), SineWall::getInteractionWith(), TriangulatedWall::getInteractionWith(), VChute::getInteractionWith(), SuperQuadricParticle::getInteractionWithSuperQuad(), FileReader::read(), and setFStatData().
void BaseInteraction::setP | ( | BaseInteractable * | P | ) |
Sets the first object involved in the interaction (normally a particle).
Changes the first object involved in the interaction; normally a particle. Note, set is slightly misleading as it removed the interaction from old particle and adds it to the new particle.
[in] | P | BaseInteractable* An interactable object that is involved in the interaction. |
References BaseInteractable::addInteraction(), BaseObject::getId(), identificationP_, Global_Physical_Variables::P, P_, and BaseInteractable::removeInteraction().
|
protected |
set the relative velocity of the current of the interactions.
set the relative velocity between the two particles involved in the interaction.
[in] | relativeVelocity | This is Vec3D that contains the relative velocity between the two interactable objects. |
References relativeVelocity_.
Referenced by HertzianViscoelasticInteraction::computeNormalForce(), LinearPlasticViscoelasticInteraction::computeNormalForce(), LinearViscoelasticInteraction::computeNormalForce(), SinterInteraction::computeNormalForce(), SinterLinInteraction::computeNormalForce(), SPHInteraction::computeNormalForce(), and HertzianSinterInteraction::computeSinterForce().
void BaseInteraction::setSpecies | ( | const BaseSpecies * | species | ) |
Set the Species of the interaction; note this can either be a Species or MixedSpecies.
Sets the species for the interactions. Note, this can be either a normal Species or a MixedSpecies; depending on if this interaction is between interactables of the same or different types.
[in] | BaseSpecies* | pointer to the actually species of the interaction. |
References species_.
Referenced by InteractionHandler::getInteraction().
void BaseInteraction::setTimeStamp | ( | unsigned | timeStamp | ) |
Updates the time step of the interacting. Note, time steps used to find completed interactions.
Updated the time stamp of the interaction. The time stamp being old is how ended interactions are detected.
[in] | timeStamp | The new timeStamp for the interactions should be the current time step. |
References timeStamp_.
Referenced by InteractionHandler::getInteraction(), and setBasicMPIInteractionValues().
void BaseInteraction::setTorque | ( | Vec3D | torque | ) |
set the total force (this is used by the normal force, tangential torques are added use addTorque)
set the absolute values of the torque. This is used by the normal forces as these are always called first and then the tangential and non-contact (e.g. adhesive forces) forces/torques are added. See also BaseInteraction::addTorque.
References torque_.
Referenced by HertzianViscoelasticInteraction::computeNormalForce(), LinearPlasticViscoelasticInteraction::computeNormalForce(), LinearViscoelasticInteraction::computeNormalForce(), SinterInteraction::computeNormalForce(), SinterLinInteraction::computeNormalForce(), SPHInteraction::computeNormalForce(), HertzianSinterInteraction::computeSinterForce(), and setBasicMPIInteractionValues().
void BaseInteraction::setWallInteraction | ( | bool | flag | ) |
References isWallInteraction_.
Referenced by MeshTriangle::getInteractionWith(), and setBasicMPIInteractionValues().
|
overridevirtual |
Interaction print function, which accepts an std::ostream as input.
BaseInteaction write function. Writes out all the information required to recreate this interaction. To write this interaction to the screen call write(std::cout). See also BaseInteraction::read
[in] | os | std::ostream to which the information is written. Note, is any ostram is can be file or screen. |
Implements BaseObject.
Reimplemented in SPHInteraction, SinterLinInteraction, SinterInteraction, LinearViscoelasticInteraction, LinearPlasticViscoelasticInteraction, HertzianViscoelasticInteraction, HertzianSinterInteraction, HertzianBSHPViscoelasticInteraction, SlidingFrictionInteraction, MindlinRollingTorsionInteraction, MindlinInteraction, FrictionInteraction, EmptyFrictionInteraction, and Interaction< NormalForceInteraction, FrictionForceInteraction, AdhesiveForceInteraction >.
References contactPoint_, force_, BaseObject::getId(), getName(), I_, P_, timeStamp_, and torque_.
Referenced by HertzianSinterInteraction::write(), HertzianViscoelasticInteraction::write(), LinearPlasticViscoelasticInteraction::write(), LinearViscoelasticInteraction::write(), SinterInteraction::write(), SinterLinInteraction::write(), and SPHInteraction::write().
|
protected |
Writes information about a interaction to the interaction file.
Method to write the interaction data to a stream, usually an interaction file. It saves the IDs of the particles (in case there are two particles) or particle and wall. Furthermore, the time when the interaction starts and ends is written to the stream.
[in/out] | os The outputstream to which the interaction information should be written, usually a file | |
[in] | created | Whether or not this is the beginning of the interaction. |
References BaseHandler< T >::getDPMBase(), BaseSpecies::getHandler(), BaseObject::getId(), BaseInteractable::getSpecies(), DPMBase::getTime(), I_, P_, and timeStamp_.
Referenced by BaseInteraction(), and ~BaseInteraction().
void BaseInteraction::writeToFStat | ( | std::ostream & | os, |
Mdouble | time | ||
) | const |
Writes forces data to the FStat file.
Writes the FStat information that is required for the coarse- graining package MercuryCG if you want stress and force information. Note, it takes a general ostream but is normally a file i.e. ofstream
[in] | os | This is the ostream that the FStat information will be written to. Normally, a file but could be a gerneral ostream. |
References Vec3D::dot(), force_, getContactPoint(), BaseObject::getIndex(), Vec3D::getLength(), getNormal(), getOverlap(), getTangentialForce(), getTangentialOverlap(), I_, isBonded(), normal_, and P_.
|
private |
Variables calculated by NormalForceInteraction, used by FrictionForceInteraction and AdhesiveForceInteraction (but not changed by them)
Referenced by getAbsoluteNormalForce(), and setAbsoluteNormalForce().
|
private |
This is Vec3D which stores the contact point of the interaction.
Referenced by BaseInteraction(), getContactPoint(), getEffectiveRadius(), read(), rotateHistory(), setContactPoint(), and write().
|
private |
Variables calculated by NormalForceInteraction, used by FrictionForceInteraction and AdhesiveForceInteraction (but not changed by them)
Referenced by getDistance(), and setDistance().
|
private |
First computed by NormalForceInteraction, but added to by FrictionForceInteraction and AdhesiveForceInteraction.
Referenced by addForce(), BaseInteraction(), gatherContactStatistics(), getForce(), read(), rotateHistory(), setForce(), write(), and writeToFStat().
|
private |
Pointer to the InteractionHander for this interaction.
Referenced by copySwitchPointer(), getHandler(), removeFromHandler(), and setHandler().
|
private |
This is the second of the two interactable object involved in the interaction; often a particle or a wall, hence I because it is general interactable.
Referenced by BaseInteraction(), copySwitchPointer(), gatherContactStatistics(), getI(), importI(), setBasicMPIInteractionValues(), setI(), write(), writeInteraction(), writeToFStat(), and ~BaseInteraction().
|
private |
Referenced by getIdentificationI(), importI(), setI(), and setIdentificationI().
|
private |
Referenced by getIdentificationP(), importP(), setIdentificationP(), and setP().
|
private |
Referenced by isWallInteraction(), and setWallInteraction().
|
private |
Lagrange multiplier used by contact detection of superquadrics.
Referenced by BaseInteraction(), getLagrangeMultiplier(), and setLagrangeMultiplier().
|
private |
Identifies individual contact such that it can be distinguished. E.g. the face number of a triangulated wall.
Referenced by getMultiContactIdentifier(), and setMultiContactIdentifier().
|
private |
Vec3D which stores the normal vector (unit vector from I to P) of the interaction.
Referenced by BaseInteraction(), gatherContactStatistics(), getNormal(), rotateHistory(), setNormal(), and writeToFStat().
|
private |
Variables calculated by NormalForceInteraction, used in other force routines (but not changed by them)
Referenced by getNormalRelativeVelocity(), and setNormalRelativeVelocity().
|
private |
Mdouble which stores the current overlap.
Referenced by BaseInteraction(), gatherContactStatistics(), getOverlap(), and setOverlap().
|
private |
This first of two interactable objects involved in the interaction; normally a particle hence P.
Referenced by BaseInteraction(), copySwitchPointer(), gatherContactStatistics(), getP(), importP(), setBasicMPIInteractionValues(), setP(), write(), writeInteraction(), writeToFStat(), and ~BaseInteraction().
|
private |
Variables calculated by the normal force routines used in other force routines (but not changed by them).
Referenced by getRelativeVelocity(), rotateHistory(), and setRelativeVelocity().
|
private |
Pointer to the species of the interaction could be a mixed species or a species.
Referenced by BaseInteraction(), getBaseSpecies(), and setSpecies().
|
private |
Mdouble which store the last timeStamp the interaction was active.
Referenced by BaseInteraction(), getTimeStamp(), setTimeStamp(), write(), and writeInteraction().
|
private |
First computed by NormalForceInteraction, but added to by FrictionForceInteraction and AdhesiveForceInteraction.
Referenced by addTorque(), BaseInteraction(), getTorque(), read(), rotateHistory(), setTorque(), and write().