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;
154 template<
class NormalForceInteraction,
class FrictionForceInteraction,
class AdhesiveForceInteraction>
156 :
BaseInteraction(P, I, timeStamp),
NormalForceInteraction(P, I, timeStamp),
FrictionForceInteraction(P, I, timeStamp),
AdhesiveForceInteraction(P, I, timeStamp)
158 #ifdef DEBUG_CONSTRUCTOR
159 std::cout<<
"Interaction::Interaction() finished"<<std::endl;
163 template<
class NormalForceInteraction,
class FrictionForceInteraction,
class AdhesiveForceInteraction>
167 #ifdef DEBUG_CONSTRUCTOR
168 std::cout<<
"Interaction::Interaction(const Interaction &p finished"<<std::endl;
172 template<
class NormalForceInteraction,
class FrictionForceInteraction,
class AdhesiveForceInteraction>
175 #ifdef DEBUG_DESTRUCTOR
176 std::cout<<
"Interaction::~Interaction() finished"<<std::endl;
183 template<
class NormalForceInteraction,
class FrictionForceInteraction,
class AdhesiveForceInteraction>
193 template<
class NormalForceInteraction,
class FrictionForceInteraction,
class AdhesiveForceInteraction>
196 NormalForceInteraction::write(os);
197 FrictionForceInteraction::write(os);
198 AdhesiveForceInteraction::write(os);
205 template<
class NormalForceInteraction,
class FrictionForceInteraction,
class AdhesiveForceInteraction>
208 NormalForceInteraction::read(is);
209 FrictionForceInteraction::read(is);
210 AdhesiveForceInteraction::read(is);
218 template<
class NormalForceInteraction,
class FrictionForceInteraction,
class AdhesiveForceInteraction>
221 NormalForceInteraction::reverseHistory();
222 FrictionForceInteraction::reverseHistory();
223 AdhesiveForceInteraction::reverseHistory();
226 template<
class NormalForceInteraction,
class FrictionForceInteraction,
class AdhesiveForceInteraction>
229 NormalForceInteraction::rotateHistory(rotationMatrix);
230 FrictionForceInteraction::rotateHistory(rotationMatrix);
231 AdhesiveForceInteraction::rotateHistory(rotationMatrix);
238 template<
class NormalForceInteraction,
class FrictionForceInteraction,
class AdhesiveForceInteraction>
241 return NormalForceInteraction::getBaseName() + FrictionForceInteraction::getBaseName() + AdhesiveForceInteraction::getBaseName() +
"Interaction";
249 template<
class NormalForceInteraction,
class FrictionForceInteraction,
class AdhesiveForceInteraction>
252 FrictionForceInteraction::integrate(timeStep);
263 template<
class NormalForceInteraction,
class FrictionForceInteraction,
class AdhesiveForceInteraction>
266 NormalForceInteraction::computeNormalForce();
267 FrictionForceInteraction::computeFrictionForce();
268 AdhesiveForceInteraction::computeAdhesionForce();
277 template<
class NormalForceInteraction,
class FrictionForceInteraction,
class AdhesiveForceInteraction>
280 return NormalForceInteraction::getElasticEnergy() + FrictionForceInteraction::getElasticEnergy() + AdhesiveForceInteraction::getElasticEnergy();
283 template<
class NormalForceInteraction,
class FrictionForceInteraction,
class AdhesiveForceInteraction>
286 AdhesiveForceInteraction::actionsAfterTimeStep();
292 template<
class NormalForceInteraction,
class FrictionForceInteraction,
class AdhesiveForceInteraction>
295 return NormalForceInteraction::getElasticEnergyAtEquilibrium(adhesiveForce);
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.
Mdouble getElasticEnergyAtEquilibrium(Mdouble adhesiveForce) const
returns the overlap at which the repulsive elastic force equals a given adhesive force; to be impleme...
std::string getName() const final
Returns the name of the Interaction.
void actionsAfterTimeStep()
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...