MercuryDPM
Alpha
|
Contains contact force properties for contacts between particles with two different species. More...
#include <MixedSpecies.h>
Public Member Functions | |
MixedSpecies () | |
The default constructor. More... | |
MixedSpecies (const MixedSpecies &s) | |
The default copy constructor. More... | |
MixedSpecies (const Species< NormalForceSpecies, FrictionForceSpecies, AdhesiveForceSpecies > &s) | |
Creates a mixed species with the same force properties as a Species. More... | |
virtual | ~MixedSpecies () |
The default destructor. More... | |
MixedSpecies < NormalForceSpecies, FrictionForceSpecies, AdhesiveForceSpecies > * | copy () const |
Creates a deep copy of the MixedSpecies from which it is called. More... | |
void | read (std::istream &is) |
Reads the species properties from an input stream. More... | |
void | write (std::ostream &os) const |
Writes the MixedSpecies properties to an output stream. More... | |
std::string | getName () const |
Returns the name of the MixedSpecies as it is used in the restart file. More... | |
BaseInteraction * | getNewInteraction (BaseInteractable *P, BaseInteractable *I, Mdouble timeStamp) const |
When a contact between two particles is determined, an Interaction object is created, as the type of Interaction depends on the MixedSpecies type. More... | |
bool | getUseAngularDOFs () const |
Returns true if torques have to be calculated. More... | |
void | mixAll (BaseSpecies *const S, BaseSpecies *const T) |
sets the MixedSpecies properties by mixing the properties of two particle species More... | |
Mdouble | getInteractionDistance () const |
Returns the particle distance below which adhesive forces can occur (needed for contact detection) More... | |
Contains contact force properties for contacts between particles with two different species.
See Species for details.
Definition at line 40 of file MixedSpecies.h.
MixedSpecies< NormalForceSpecies, FrictionForceSpecies, AdhesiveForceSpecies >::MixedSpecies | ( | ) |
The default constructor.
Definition at line 92 of file MixedSpecies.h.
MixedSpecies< NormalForceSpecies, FrictionForceSpecies, AdhesiveForceSpecies >::MixedSpecies | ( | const MixedSpecies< NormalForceSpecies, FrictionForceSpecies, AdhesiveForceSpecies > & | s | ) |
The default copy constructor.
Definition at line 101 of file MixedSpecies.h.
MixedSpecies< NormalForceSpecies, FrictionForceSpecies, AdhesiveForceSpecies >::MixedSpecies | ( | const Species< NormalForceSpecies, FrictionForceSpecies, AdhesiveForceSpecies > & | s | ) |
Creates a mixed species with the same force properties as a Species.
Definition at line 110 of file MixedSpecies.h.
|
virtual |
The default destructor.
Definition at line 119 of file MixedSpecies.h.
MixedSpecies< NormalForceSpecies, FrictionForceSpecies, AdhesiveForceSpecies > * MixedSpecies< NormalForceSpecies, FrictionForceSpecies, AdhesiveForceSpecies >::copy | ( | ) | const |
Creates a deep copy of the MixedSpecies from which it is called.
MixedSpecies copy method. It calls to copy constructor of this MixedSpecies, useful for polymorphism.
Definition at line 129 of file MixedSpecies.h.
Mdouble MixedSpecies< NormalForceSpecies, FrictionForceSpecies, AdhesiveForceSpecies >::getInteractionDistance | ( | ) | const |
Returns the particle distance below which adhesive forces can occur (needed for contact detection)
Definition at line 244 of file MixedSpecies.h.
std::string MixedSpecies< NormalForceSpecies, FrictionForceSpecies, AdhesiveForceSpecies >::getName | ( | ) | const |
Returns the name of the MixedSpecies as it is used in the restart file.
Returns the name of the MixedSpecies as it is used in the restart file. The name of the species is a concatenation of the names of the three force components, e.g.
MixedSpecies<LinearViscoelasticNormalSpecies,SlidingFrictionSpecies,ReversibleAdhesiveSpecies> species; std::cout << species.getName();
will output "LinearViscoelasticSlidingFrictionReversibleAdhesiveMixedSpecies". The EmptyFrictionSpecies and the EmptyAdhesiveSpecies return empty strings, such that
MixedSpecies<LinearViscoelasticNormalSpecies> species; std::cout << species.getName();
will output "LinearViscoelasticMixedSpecies".
Definition at line 188 of file MixedSpecies.h.
BaseInteraction * MixedSpecies< NormalForceSpecies, FrictionForceSpecies, AdhesiveForceSpecies >::getNewInteraction | ( | BaseInteractable * | P, |
BaseInteractable * | I, | ||
Mdouble | timeStamp | ||
) | const |
When a contact between two particles is determined, an Interaction object is created, as the type of Interaction depends on the MixedSpecies type.
The input parameters of this function are directly passed into the constructor for the new interaction. See Interaction for details.
[in] | P | first of the two objects that interact |
[in] | I | second of the two objects that interact |
[in] | timeStamp | current value of DPMBase::time_ |
Definition at line 204 of file MixedSpecies.h.
bool MixedSpecies< NormalForceSpecies, FrictionForceSpecies, AdhesiveForceSpecies >::getUseAngularDOFs | ( | ) | const |
Returns true if torques have to be calculated.
Returns true for any FrictionForceSpecies except EmptyFrictionSpecies, because for spherical particles, torques are only caused by tangential forces. See SpeciesHandler::useAngularDOFs for more details
Definition at line 216 of file MixedSpecies.h.
void MixedSpecies< NormalForceSpecies, FrictionForceSpecies, AdhesiveForceSpecies >::mixAll | ( | BaseSpecies *const | S, |
BaseSpecies *const | T | ||
) |
sets the MixedSpecies properties by mixing the properties of two particle species
Uses the harmonic mean for most properties. Calls the mix function for each of the force species from which MixedSpecies is derived.
[in] | S | the first of two species whose properties are mixed to create the new species |
[in] | T | the second of two species whose properties are mixed to create the new species |
Definition at line 228 of file MixedSpecies.h.
void MixedSpecies< NormalForceSpecies, FrictionForceSpecies, AdhesiveForceSpecies >::read | ( | std::istream & | is | ) |
Reads the species properties from an input stream.
Called by SpeciesHandler::readObject
[in] | is | input stream (typically the restart file) |
Definition at line 159 of file MixedSpecies.h.
References BaseObject::setId(), and BaseObject::setIndex().
void MixedSpecies< NormalForceSpecies, FrictionForceSpecies, AdhesiveForceSpecies >::write | ( | std::ostream & | os | ) | const |
Writes the MixedSpecies properties to an output stream.
It prints human readable MixedSpecies information to the output stream, typically to Files::restartFile::fstream_. The basic species information is written in ParticleSpecies::write; then the three force types write additional information to the stream.
[out] | os | output stream (typically the restart file) |
Definition at line 143 of file MixedSpecies.h.
References BaseObject::getId(), and BaseObject::getIndex().