35 template<
class NormalForceSpecies,
class FrictionForceSpecies,
class AdhesiveForceSpecies>
class Species;
106 template<
class NormalForceInteraction,
class FrictionForceInteraction=EmptyFrictionInteraction,
class AdhesiveForceInteraction=EmptyAdhesiveInteraction>
127 void read(std::istream& is)
final;
130 void write(std::ostream& os)
const final;
133 std::string
getName()
const final;
147 template<
class NormalForceInteraction,
class FrictionForceInteraction,
class AdhesiveForceInteraction>
149 :
BaseInteraction(P, I, timeStamp),
NormalForceInteraction(P, I, timeStamp),
FrictionForceInteraction(P, I, timeStamp),
AdhesiveForceInteraction(P, I, timeStamp)
151 #ifdef DEBUG_CONSTRUCTOR
152 std::cout<<
"Interaction::Interaction() finished"<<std::endl;
156 template<
class NormalForceInteraction,
class FrictionForceInteraction,
class AdhesiveForceInteraction>
160 #ifdef DEBUG_CONSTRUCTOR
161 std::cout<<
"Interaction::Interaction(const Interaction &p finished"<<std::endl;
165 template<
class NormalForceInteraction,
class FrictionForceInteraction,
class AdhesiveForceInteraction>
168 #ifdef DEBUG_DESTRUCTOR
169 std::cout<<
"Interaction::~Interaction() finished"<<std::endl;
176 template<
class NormalForceInteraction,
class FrictionForceInteraction,
class AdhesiveForceInteraction>
186 template<
class NormalForceInteraction,
class FrictionForceInteraction,
class AdhesiveForceInteraction>
189 NormalForceInteraction::write(os);
190 FrictionForceInteraction::write(os);
191 AdhesiveForceInteraction::write(os);
198 template<
class NormalForceInteraction,
class FrictionForceInteraction,
class AdhesiveForceInteraction>
201 NormalForceInteraction::read(is);
202 FrictionForceInteraction::read(is);
203 AdhesiveForceInteraction::read(is);
211 template<
class NormalForceInteraction,
class FrictionForceInteraction,
class AdhesiveForceInteraction>
214 NormalForceInteraction::reverseHistory();
215 FrictionForceInteraction::reverseHistory();
216 AdhesiveForceInteraction::reverseHistory();
219 template<
class NormalForceInteraction,
class FrictionForceInteraction,
class AdhesiveForceInteraction>
222 NormalForceInteraction::rotateHistory(rotationMatrix);
223 FrictionForceInteraction::rotateHistory(rotationMatrix);
224 AdhesiveForceInteraction::rotateHistory(rotationMatrix);
231 template<
class NormalForceInteraction,
class FrictionForceInteraction,
class AdhesiveForceInteraction>
234 return NormalForceInteraction::getBaseName() + FrictionForceInteraction::getBaseName() + AdhesiveForceInteraction::getBaseName() +
"Interaction";
242 template<
class NormalForceInteraction,
class FrictionForceInteraction,
class AdhesiveForceInteraction>
245 FrictionForceInteraction::integrate(timeStep);
256 template<
class NormalForceInteraction,
class FrictionForceInteraction,
class AdhesiveForceInteraction>
259 NormalForceInteraction::computeNormalForce();
260 FrictionForceInteraction::computeFrictionForce();
261 AdhesiveForceInteraction::computeAdhesionForce();
270 template<
class NormalForceInteraction,
class FrictionForceInteraction,
class AdhesiveForceInteraction>
273 return NormalForceInteraction::getElasticEnergy() + FrictionForceInteraction::getElasticEnergy() + AdhesiveForceInteraction::getElasticEnergy();
Mdouble getElasticEnergy() const final
Returns the elastic energy stored in the Interaction.
void read(std::istream &is) final
Read Interaction properties from a file.
Stores information about interactions between two interactable objects; often particles but could be ...
void integrate(Mdouble timeStep) final
Integrates the time-dependent parameters of the contact force.
std::string getName() const final
Returns the name of the Interaction.
void reverseHistory() final
Reverses the parameters of the contact force.
Interaction< NormalForceInteraction, FrictionForceInteraction, AdhesiveForceInteraction > * copy() const final
Creates a copy of this Interaction.
Interaction(BaseInteractable *P, BaseInteractable *I, Mdouble timeStamp)
The default constructor.
virtual ~Interaction()
The default destructor.
void rotateHistory(Matrix3D &rotationMatrix) final
void computeForce() final
Computes the normal, tangential, and adhesive forces.
Defines the basic properties that a interactable object can have.
Contains material and contact force properties.
Implementation of a 3D matrix.
void write(std::ostream &os) const final
Writes Interaction properties to a file.
Contains information about the contact between two interactables, BaseInteraction::P_ and BaseInterac...