Interaction< NormalForceInteraction, FrictionForceInteraction, AdhesiveForceInteraction > Class Template Reference

Contains information about the contact between two interactables, BaseInteraction::P_ and BaseInteraction::I_;. More...

#include <Interaction.h>

+ Inheritance diagram for Interaction< NormalForceInteraction, FrictionForceInteraction, AdhesiveForceInteraction >:

Public Member Functions

 Interaction (BaseInteractable *P, BaseInteractable *I, unsigned timeStamp)
 The default constructor. More...
 
 Interaction ()
 Empty constructor. More...
 
 Interaction (const Interaction &p)
 The default copy constructor. More...
 
virtual ~Interaction ()
 The default destructor. More...
 
Interaction< NormalForceInteraction, FrictionForceInteraction, AdhesiveForceInteraction > * copy () const final
 Creates a copy of this Interaction. More...
 
void computeForce () final
 Computes the normal, tangential, and adhesive forces. More...
 
void computeInteraction ()
 Computes the interaction parameters based on the forces and torques. More...
 
void read (std::istream &is) final
 Read Interaction properties from a file. More...
 
void write (std::ostream &os) const final
 Writes Interaction properties to a file. More...
 
std::string getName () const final
 Returns the name of the Interaction. More...
 
Mdouble getElasticEnergy () const final
 Returns the elastic energy stored in the Interaction. More...
 
void integrate (Mdouble timeStep) final
 Integrates the time-dependent parameters of the contact force. More...
 
void reverseHistory () final
 Reverses the parameters of the contact force. More...
 
void rotateHistory (Matrix3D &rotationMatrix) final
 When periodic particles are used, some interactions need certain history properties rotated (e.g. tangential springs). This is the function for that. More...
 
void actionsAfterTimeStep ()
 
Mdouble getElasticEnergyAtEquilibrium (Mdouble adhesiveForce) const
 returns the overlap at which the repulsive elastic force equals a given adhesive force; to be implemented in the normal force More...
 
void getMPIInteraction (void *historyDataArray, unsigned int index) const final
 copies the history interactions into the data array More...
 
void setMPIInteraction (void *historyDataArray, unsigned int index, const bool resetPointers) final
 
void getInteractionDetails (void *interactionDataArray, unsigned int index, unsigned int &identificationP, unsigned int &identificationI, bool &isWallInteraction, unsigned &timeStamp)
 
void createMPIType () final
 
void * createMPIInteractionDataArray (unsigned int numberOfInteractions) const final
 
void deleteMPIInteractionDataArray (void *dataArray) final
 
- Public Member Functions inherited from EmptyFrictionInteraction
 EmptyFrictionInteraction (BaseInteractable *P, BaseInteractable *I, unsigned timeStamp)
 Constructor. More...
 
 EmptyFrictionInteraction ()
 
 EmptyFrictionInteraction (const EmptyFrictionInteraction &p)
 Copy constructor. More...
 
 ~EmptyFrictionInteraction () override
 Destructor. More...
 
void computeFrictionForce ()
 Computes nothing, it is an empty function. More...
 
void computeFrictionInteraction ()
 
const EmptyFrictionSpeciesgetSpecies () const
 Returns a const pointer of type EmptyFrictionSpecies*. More...
 
std::string getBaseName () const
 Returns interaction name/type. More...
 
Mdouble getTangentialOverlap () const override
 Returns zero overlap. More...
 
const Vec3D getTangentialForce () const override
 Returns zero tangential force. More...
 
- Public Member Functions inherited from 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. 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...
 
void writeToFStat (std::ostream &os, Mdouble time) const
 Writes forces data to the FStat file. 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...
 
InteractionHandlergetHandler () const
 Gets a point to the interaction handlers to which this interaction belongs. More...
 
const Vec3DgetForce () const
 Gets the current force (vector) between the two interacting objects. More...
 
const Vec3DgetTorque () const
 Gets the current torque (vector) between the two interacting objects. More...
 
const Vec3DgetNormal () const
 Gets the normal vector between the two interacting objects. More...
 
const Vec3DgetContactPoint () 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 ()
 
BaseInteractablegetP ()
 Returns a pointer to first object involved in the interaction (normally a particle). More...
 
BaseInteractablegetI ()
 Returns a pointer to the second object involved in the interaction (often a wall or a particle). More...
 
const BaseInteractablegetP () const
 Returns a constant pointer to the first object involved in the interaction. More...
 
const BaseInteractablegetI () 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...
 
Mdouble getDistance () const
 Returns an Mdouble which is the norm (length) of distance vector. More...
 
const Vec3DgetRelativeVelocity () 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...
 
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 unsigned getNumberOfFieldsVTK () const
 
virtual std::string getTypeVTK (unsigned i) const
 
virtual std::string getNameVTK (unsigned i) const
 
virtual std::vector< MdoublegetFieldVTK (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 BaseSpeciesgetBaseSpecies () const
 Return a constant point to BaseSpecies of the interaction. More...
 
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
 
- Public Member Functions inherited from EmptyAdhesiveInteraction
 EmptyAdhesiveInteraction (BaseInteractable *P, BaseInteractable *I, unsigned timeStamp)
 Constructor. More...
 
 EmptyAdhesiveInteraction ()
 
 EmptyAdhesiveInteraction (const EmptyAdhesiveInteraction &p)
 copy constructor. More...
 
 ~EmptyAdhesiveInteraction () override
 Destructor. More...
 
void computeAdhesionForce ()
 Computes nothing as it is an Empty Adhesive interaction. More...
 
void computeAdhesionInteraction ()
 
const EmptyAdhesiveSpeciesgetSpecies () const
 Returns a pointer to the adhesive force species EmptyAdhesiveSpecies. More...
 
std::string getBaseName () const
 Returns the name of the interaction, see Interaction.h. More...
 

Additional Inherited Members

- Public Types inherited from EmptyFrictionInteraction
typedef EmptyFrictionSpecies SpeciesType
 An alias name for EmptyFrictionSpecies. More...
 
- Public Types inherited from EmptyAdhesiveInteraction
typedef EmptyAdhesiveSpecies SpeciesType
 An alias name for EmptyAdhesiveSpecies data type. More...
 
- Protected Member Functions inherited from BaseInteraction
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...
 
void writeInteraction (std::ostream &os, bool created) const
 Writes information about a interaction to the interaction file. More...
 

Detailed Description

template<class NormalForceInteraction, class FrictionForceInteraction = EmptyFrictionInteraction, class AdhesiveForceInteraction = EmptyAdhesiveInteraction>
class Interaction< NormalForceInteraction, FrictionForceInteraction, AdhesiveForceInteraction >

Contains information about the contact between two interactables, BaseInteraction::P_ and BaseInteraction::I_;.

An instance is created every time two BaseInteractables (particles or walls) get into contact with another, and gets deleted when the contact ends.

Next, the call process is described for this function for the case of two particles (it is very similar for a particle-wall contact.

Then, in each time step, every time that a contact is detected, DPMBase::computeInternalForces is called, which calls BaseParticle::getInteractionWith to create a new Interaction (setting the links to the interactables P_ and I_ and adds it to the InteractionHandler) or find an existing one. When a new Interaction is created, the Species determines what kind of Interaction it will be. DPMBase::computeInternalForces also sets the timeStamp_, normal_, overlap_, distance_, and contactPoint_ of the Interaction.

Then, computeForce is called, which sets the force_, which sets BaseInteraction::force_ and BaseInteraction::torque_ of the Interaction, and a few temporary values to communicate between the three different computeForce routines (see diamond inheritance below).

The force_ and torque_ is then used in DPMBase::integrateBeforeForceComputation and DPMBase::integrateAfterForceComputation to calcutate the new positions and velocities.

Todo:
MX: I do not think the above is correct. integrateBeforeForceComputation() updates the positions

As there are many types of contact forces, the class is templated to allow for different force models. This is done in a diamond inheritance structure: First, three kinds of Interactions are created:

  • NormalForceInteraction: Computes the normal contact force and sets the torque to zero (we currently only have spherical particles). Also sets relativeVelocity_, normalRelativeVelocity_, absoluteNormalForce_.
  • FrictionForceInteraction: Computes tangential contact force and torques.
  • AdhesiveForceInteraction: Computes the short-range normal contact force.

A full Interaction object is then derived by inheriting from all of the above:

Constructor & Destructor Documentation

◆ Interaction() [1/3]

template<class NormalForceInteraction , class FrictionForceInteraction , class AdhesiveForceInteraction >
Interaction< NormalForceInteraction, FrictionForceInteraction, AdhesiveForceInteraction >::Interaction ( BaseInteractable P,
BaseInteractable I,
unsigned  timeStamp 
)

The default constructor.

186  : BaseInteraction(P, I, timeStamp), NormalForceInteraction(P, I, timeStamp),
187  FrictionForceInteraction(P, I, timeStamp), AdhesiveForceInteraction(P, I, timeStamp)
188 {
189 #ifdef DEBUG_CONSTRUCTOR
190  std::cout<<"Interaction::Interaction() finished"<<std::endl;
191 #endif
192 }
BaseInteraction()
Definition: BaseInteraction.cc:65
double P
Uniform pressure.
Definition: TwenteMeshGluing.cpp:73

◆ Interaction() [2/3]

template<class NormalForceInteraction , class FrictionForceInteraction , class AdhesiveForceInteraction >
Interaction< NormalForceInteraction, FrictionForceInteraction, AdhesiveForceInteraction >::Interaction

Empty constructor.

197  : BaseInteraction(), NormalForceInteraction(), FrictionForceInteraction(), AdhesiveForceInteraction()
198 {
199 #ifdef DEBUG_CONSTRUCTOR
200  std::cout<<"Interaction::Interaction() finished"<<std::endl;
201 #endif
202 }

◆ Interaction() [3/3]

template<class NormalForceInteraction , class FrictionForceInteraction , class AdhesiveForceInteraction >
Interaction< NormalForceInteraction, FrictionForceInteraction, AdhesiveForceInteraction >::Interaction ( const Interaction< NormalForceInteraction, FrictionForceInteraction, AdhesiveForceInteraction > &  p)

The default copy constructor.

207  : BaseInteraction(p), NormalForceInteraction(p), FrictionForceInteraction(p), AdhesiveForceInteraction(p)
208 {
209 #ifdef DEBUG_CONSTRUCTOR
210  std::cout<<"Interaction::Interaction(const Interaction &p finished"<<std::endl;
211 #endif
212 }

◆ ~Interaction()

template<class NormalForceInteraction , class FrictionForceInteraction , class AdhesiveForceInteraction >
Interaction< NormalForceInteraction, FrictionForceInteraction, AdhesiveForceInteraction >::~Interaction
virtual

The default destructor.

216 {
217 #ifdef DEBUG_DESTRUCTOR
218  std::cout<<"Interaction::~Interaction() finished"<<std::endl;
219 #endif
220 }

Member Function Documentation

◆ actionsAfterTimeStep()

template<class NormalForceInteraction , class FrictionForceInteraction , class AdhesiveForceInteraction >
void Interaction< NormalForceInteraction, FrictionForceInteraction, AdhesiveForceInteraction >::actionsAfterTimeStep
virtual

Reimplemented from BaseInteraction.

335 {
336  AdhesiveForceInteraction::actionsAfterTimeStep();
337 }

◆ computeForce()

template<class NormalForceInteraction , class FrictionForceInteraction , class AdhesiveForceInteraction >
void Interaction< NormalForceInteraction, FrictionForceInteraction, AdhesiveForceInteraction >::computeForce
finalvirtual

Computes the normal, tangential, and adhesive forces.

Computes the normal, tangential, and adhesive forces (in that order). The order is important, as the normal force computation also calculates some additional parameters required by the other force laws: relativeVelocity_, normalRelativeVelocity_, absoluteNormalForce_.

Reimplemented from BaseInteraction.

313 {
314  NormalForceInteraction::computeNormalForce();
315  FrictionForceInteraction::computeFrictionForce();
316  AdhesiveForceInteraction::computeAdhesionForce();
317 }

◆ computeInteraction()

template<class NormalForceInteraction , class FrictionForceInteraction = EmptyFrictionInteraction, class AdhesiveForceInteraction = EmptyAdhesiveInteraction>
void Interaction< NormalForceInteraction, FrictionForceInteraction, AdhesiveForceInteraction >::computeInteraction ( )

Computes the interaction parameters based on the forces and torques.

◆ copy()

template<class NormalForceInteraction , class FrictionForceInteraction , class AdhesiveForceInteraction >
Interaction< NormalForceInteraction, FrictionForceInteraction, AdhesiveForceInteraction > * Interaction< NormalForceInteraction, FrictionForceInteraction, AdhesiveForceInteraction >::copy
finalvirtual

Creates a copy of this Interaction.

Useful for polymorphism as it can be called from a BaseInteraction* pointer.

Implements BaseInteraction.

228 {
229  return new Interaction(*this);
230 }
Interaction()
Empty constructor.
Definition: Interaction.h:196

◆ createMPIInteractionDataArray()

template<class NormalForceInteraction , class FrictionForceInteraction , class AdhesiveForceInteraction >
void * Interaction< NormalForceInteraction, FrictionForceInteraction, AdhesiveForceInteraction >::createMPIInteractionDataArray ( unsigned int  numberOfInteractions) const
finalvirtual

Reimplemented from BaseInteraction.

393 {
395  void* interactionArray = static_cast<void*>(array);
396  return interactionArray;
397 }
Definition: MPIInteraction.h:48

◆ createMPIType()

template<class NormalForceInteraction , class FrictionForceInteraction , class AdhesiveForceInteraction >
void Interaction< NormalForceInteraction, FrictionForceInteraction, AdhesiveForceInteraction >::createMPIType
finalvirtual

Reimplemented from BaseInteraction.

410 {
411 #ifdef MERCURYDPM_USE_MPI
412  MPIContainer& communicator = MPIContainer::Instance();
414 
415  communicator.createMercuryMPIType(dummyHistoryInteraction, MercuryMPIType::INTERACTION);
416 #endif
417 }
@ INTERACTION
Definition: MpiContainer.h:67
This class contains all information and functions required for communication between processors.
Definition: MpiContainer.h:130
static MPIContainer & Instance()
fetch the instance to be used for communication
Definition: MpiContainer.h:134
void createMercuryMPIType(T t, MercuryMPIType type)
Get the communicator used for MPI commands.
Definition: MpiContainer.h:564

References MPIContainer::createMercuryMPIType(), MPIContainer::Instance(), and INTERACTION.

◆ deleteMPIInteractionDataArray()

template<class NormalForceInteraction , class FrictionForceInteraction , class AdhesiveForceInteraction >
void Interaction< NormalForceInteraction, FrictionForceInteraction, AdhesiveForceInteraction >::deleteMPIInteractionDataArray ( void *  dataArray)
finalvirtual

◆ getElasticEnergy()

template<class NormalForceInteraction , class FrictionForceInteraction , class AdhesiveForceInteraction >
Mdouble Interaction< NormalForceInteraction, FrictionForceInteraction, AdhesiveForceInteraction >::getElasticEnergy
finalvirtual

Returns the elastic energy stored in the Interaction.

Returns the elastic energy stored in the Interaction, adding up contributions from the normal, frictional and adhesive interaction The elastic (=potential) energy is defined as the energy gained by separating P_ and I_.

Returns
the computed elastic energy.

Reimplemented from EmptyAdhesiveInteraction.

328 {
329  return NormalForceInteraction::getElasticEnergy() + FrictionForceInteraction::getElasticEnergy() +
330  AdhesiveForceInteraction::getElasticEnergy();
331 }

◆ getElasticEnergyAtEquilibrium()

template<class NormalForceInteraction , class FrictionForceInteraction , class AdhesiveForceInteraction >
Mdouble Interaction< NormalForceInteraction, FrictionForceInteraction, AdhesiveForceInteraction >::getElasticEnergyAtEquilibrium ( Mdouble  adhesiveForce) const
virtual

returns the overlap at which the repulsive elastic force equals a given adhesive force; to be implemented in the normal force

Reimplemented from BaseInteraction.

346 {
347  return NormalForceInteraction::getElasticEnergyAtEquilibrium(adhesiveForce);
348 };

◆ getInteractionDetails()

template<class NormalForceInteraction , class FrictionForceInteraction , class AdhesiveForceInteraction >
void Interaction< NormalForceInteraction, FrictionForceInteraction, AdhesiveForceInteraction >::getInteractionDetails ( void *  interactionDataArray,
unsigned int  index,
unsigned int &  identificationP,
unsigned int &  identificationI,
bool isWallInteraction,
unsigned &  timeStamp 
)
virtual

◆ getMPIInteraction()

template<class NormalForceInteraction , class FrictionForceInteraction , class AdhesiveForceInteraction >
void Interaction< NormalForceInteraction, FrictionForceInteraction, AdhesiveForceInteraction >::getMPIInteraction ( void *  historyDataArray,
unsigned int  index 
) const
finalvirtual

copies the history interactions into the data array

Reimplemented from BaseInteraction.

354 {
356 
357  interactionData.copyFromInteraction(this);
358 
360  array[index] = interactionData;
361 }
void copyFromInteraction(const Interaction< NormalForceInteraction, FrictionForceInteraction, AdhesiveForceInteraction > *interaction)
Definition: MPIInteraction.h:330

References MPIInteraction< NormalForceInteraction, FrictionForceInteraction, AdhesiveForceInteraction >::copyFromInteraction().

◆ getName()

template<class NormalForceInteraction , class FrictionForceInteraction , class AdhesiveForceInteraction >
std::string Interaction< NormalForceInteraction, FrictionForceInteraction, AdhesiveForceInteraction >::getName
finalvirtual

Returns the name of the Interaction.

Returns the name of the Interaction, which depends on the template parameters.

Returns
the string to which the name is written.

Reimplemented from BaseInteraction.

286 {
287  return NormalForceInteraction::getBaseName() + FrictionForceInteraction::getBaseName() +
288  AdhesiveForceInteraction::getBaseName() + "Interaction";
289 }

◆ integrate()

template<class NormalForceInteraction , class FrictionForceInteraction , class AdhesiveForceInteraction >
void Interaction< NormalForceInteraction, FrictionForceInteraction, AdhesiveForceInteraction >::integrate ( Mdouble timeStep  )
finalvirtual

Integrates the time-dependent parameters of the contact force.

Called by ??? to integrate time-dependent parameters of the contact force, such as the SlidingFrictionInteraction::slidingSpring_

Parameters
[in]thetime step.

Reimplemented from EmptyFrictionInteraction.

299 {
300  FrictionForceInteraction::integrate(timeStep);
301 }

◆ read()

template<class NormalForceInteraction , class FrictionForceInteraction , class AdhesiveForceInteraction >
void Interaction< NormalForceInteraction, FrictionForceInteraction, AdhesiveForceInteraction >::read ( std::istream &  is)
finalvirtual

Read Interaction properties from a file.

Reads Interaction properties in human-readable form from a file, typically Files::restartFile.

Parameters
[in]isthe istream from which the data is read.

Reimplemented from EmptyAdhesiveInteraction.

252 {
253  NormalForceInteraction::read(is);
254  FrictionForceInteraction::read(is);
255  AdhesiveForceInteraction::read(is);
256 }

◆ reverseHistory()

template<class NormalForceInteraction , class FrictionForceInteraction , class AdhesiveForceInteraction >
void Interaction< NormalForceInteraction, FrictionForceInteraction, AdhesiveForceInteraction >::reverseHistory
finalvirtual

Reverses the parameters of the contact force.

Called by BaseInteraction::copySwitchPointer to reverse the
parameters of the contact force in the case that the interactables P_ and I_ are switched. This is needed to deal with periodic particles.

Reimplemented from BaseInteraction.

265 {
266  NormalForceInteraction::reverseHistory();
267  FrictionForceInteraction::reverseHistory();
268  AdhesiveForceInteraction::reverseHistory();
269 }

◆ rotateHistory()

template<class NormalForceInteraction , class FrictionForceInteraction , class AdhesiveForceInteraction >
void Interaction< NormalForceInteraction, FrictionForceInteraction, AdhesiveForceInteraction >::rotateHistory ( Matrix3D rotationMatrix)
finalvirtual

When periodic particles are used, some interactions need certain history properties rotated (e.g. tangential springs). This is the function for that.

Todo:
some of these might be unneccesary

Reimplemented from BaseInteraction.

274 {
275  NormalForceInteraction::rotateHistory(rotationMatrix);
276  FrictionForceInteraction::rotateHistory(rotationMatrix);
277  AdhesiveForceInteraction::rotateHistory(rotationMatrix);
278 }

◆ setMPIInteraction()

template<class NormalForceInteraction , class FrictionForceInteraction , class AdhesiveForceInteraction >
void Interaction< NormalForceInteraction, FrictionForceInteraction, AdhesiveForceInteraction >::setMPIInteraction ( void *  historyDataArray,
unsigned int  index,
const bool  resetPointers 
)
finalvirtual

Reimplemented from BaseInteraction.

366 {
369 
370  //Copy the interaction data into the interaction
371  interactionData.copyToInteraction(this, resetPointers);
372 }
void copyToInteraction(Interaction< NormalForceInteraction, FrictionForceInteraction, AdhesiveForceInteraction > *interaction, const bool resetPointers)
Definition: MPIInteraction.h:363

References MPIInteraction< NormalForceInteraction, FrictionForceInteraction, AdhesiveForceInteraction >::copyToInteraction().

◆ write()

template<class NormalForceInteraction , class FrictionForceInteraction , class AdhesiveForceInteraction >
void Interaction< NormalForceInteraction, FrictionForceInteraction, AdhesiveForceInteraction >::write ( std::ostream &  os) const
finalvirtual

Writes Interaction properties to a file.

Writes Interaction properties in human-readable form to a file, typically Files::restartFile.

Parameters
[out]osthe ostream to which the data is written.

Reimplemented from EmptyAdhesiveInteraction.

239 {
240  NormalForceInteraction::write(os);
241  FrictionForceInteraction::write(os);
242  AdhesiveForceInteraction::write(os);
243 
244 }

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