126 template<
class NormalForceSpecies,
class FrictionForceSpecies = EmptyFrictionSpecies,
class AdhesiveForceSpecies = EmptyAdhesiveSpecies>
162 void read(std::istream& is) final;
165 void write(std::ostream& os) const final;
168 std::
string getName() const final;
194 #ifdef DEBUG_CONSTRUCTOR
195 std::cout <<
"Species::Species() finished" << std::endl;
202 template<
class NormalForceSpecies,
class FrictionForceSpecies,
class AdhesiveForceSpecies>
206 #ifdef DEBUG_CONSTRUCTOR
207 std::cout <<
"Species::Species(const Species &p) finished" << std::endl;
211 template<
class NormalForceSpecies,
class FrictionForceSpecies,
class AdhesiveForceSpecies>
214 #ifdef DEBUG_DESTRUCTOR
215 std::cout <<
"Species::~Species() finished" << std::endl;
226 template<
class NormalForceSpecies,
class FrictionForceSpecies,
class AdhesiveForceSpecies>
234 template<
class NormalForceSpecies,
class FrictionForceSpecies,
class AdhesiveForceSpecies>
247 template<
class NormalForceSpecies,
class FrictionForceSpecies,
class AdhesiveForceSpecies>
252 NormalForceSpecies::write(os);
253 FrictionForceSpecies::write(os);
254 AdhesiveForceSpecies::write(os);
260 template<
class NormalForceSpecies,
class FrictionForceSpecies,
class AdhesiveForceSpecies>
264 NormalForceSpecies::read(is);
265 FrictionForceSpecies::read(is);
266 AdhesiveForceSpecies::read(is);
283 template<
class NormalForceSpecies,
class FrictionForceSpecies,
class AdhesiveForceSpecies>
286 return NormalForceSpecies::getBaseName()
287 + FrictionForceSpecies::getBaseName()
288 + AdhesiveForceSpecies::getBaseName() +
"Species";
299 template<
class NormalForceSpecies,
class FrictionForceSpecies,
class AdhesiveForceSpecies>
311 template<
class NormalForceSpecies,
class FrictionForceSpecies,
class AdhesiveForceSpecies>
314 return FrictionForceSpecies::getUseAngularDOFs();
325 template<
class NormalForceSpecies,
class FrictionForceSpecies,
class AdhesiveForceSpecies>
328 logger(
ERROR,
"%::mix() This function should not be called", getName());
332 template<
class NormalForceSpecies,
class FrictionForceSpecies,
class AdhesiveForceSpecies>
335 return AdhesiveForceSpecies::getInteractionDistance();
void read(std::istream &is) final
Called by SpeciesHandler::readObject.
BaseSpecies is the class from which all other species are derived.
BaseInteraction * getNewInteraction(BaseInteractable *P, BaseInteractable *I, Mdouble timeStamp) const final
When a contact between two particles is determined, an Interaction object is created, as the type of Interaction depends on the Species type.
Logger< MERCURY_LOGLEVEL > logger("MercuryKernel")
Defines a contact force orthogonal to the contact normal.
Interaction< typename NormalForceSpecies::InteractionType, typename FrictionForceSpecies::InteractionType, typename AdhesiveForceSpecies::InteractionType > InteractionType
Defines a contact force parallel to the contact normal.
bool getUseAngularDOFs() const final
Returns true if torques have to be calculated.
Species< NormalForceSpecies, FrictionForceSpecies, AdhesiveForceSpecies > * copy() const final
Creates a deep copy of the Species from which it is called.
LL< Log::ERROR > ERROR
Error log level.
Stores information about interactions between two interactable objects; often particles but could be ...
Mdouble getInteractionDistance() const final
Returns the particle distance below which adhesive forces can occur (needed for contact detection) ...
Defines a short-range (non-contact) force parallel to the contact normal, usually adhesive...
Species()
The default constructor.
void write(std::ostream &os) const
Writes the species properties to an output stream.
std::string getName() const final
Returns the name of the Species as it is used in the restart file.
MixedSpecies< NormalForceSpecies, FrictionForceSpecies, AdhesiveForceSpecies > MixedSpeciesType
The correct MixedSpecies type for this Species.
void read(std::istream &is)
Reads the species properties from an input stream.
Contains contact force properties for contacts between particles with two different species...
void mixAll(BaseSpecies *const S, BaseSpecies *const T)
This function should not be called.
Defines the basic properties that a interactable object can have.
Contains material and contact force properties.
void write(std::ostream &os) const final
Writes the Species properties to an output stream.
BaseSpecies * copyMixed() const final
Creates a new MixedSpecies with the same force properties as the Species from which it is called...
virtual ~Species()
The default destructor.
Contains information about the contact between two interactables, BaseInteraction::P_ and BaseInterac...