20 template<
class NormalForceSpecies,
class FrictionForceSpecies = EmptyFrictionSpecies,
class AdhesiveForceSpecies = EmptyAdhesiveSpecies>
48 void read(std::istream& is)
final;
51 void write(std::ostream& os)
const final;
80 template<
class NormalForceSpecies,
class FrictionForceSpecies,
class AdhesiveForceSpecies>
90 logger(
DEBUG,
"MixedSpecies::MixedSpecies() finished");
93 template<
class NormalForceSpecies,
class FrictionForceSpecies,
class AdhesiveForceSpecies>
103 logger(
DEBUG,
"MixedSpecies::MixedSpecies(const MixedSpecies &p) finished");
106 template<
class NormalForceSpecies,
class FrictionForceSpecies,
class AdhesiveForceSpecies>
117 logger(
DEBUG,
"MixedSpecies::MixedSpecies(const MixedSpecies &p) finished");
120 template<
class NormalForceSpecies,
class FrictionForceSpecies,
class AdhesiveForceSpecies>
123 logger(
DEBUG,
"MixedSpecies::~MixedSpecies() finished");
127 template<
class NormalForceSpecies,
class FrictionForceSpecies,
class AdhesiveForceSpecies>
142 template<
class NormalForceSpecies,
class FrictionForceSpecies,
class AdhesiveForceSpecies>
148 logger(
WARN,
"Error in %::copyInto: cannot copy into a nullptr");
167 template<
class NormalForceSpecies,
class FrictionForceSpecies,
class AdhesiveForceSpecies>
184 template<
class NormalForceSpecies,
class FrictionForceSpecies,
class AdhesiveForceSpecies>
190 unsigned int id, index;
192 is >> dummy >> index;
200 AdhesiveForceSpecies::setInteractionDistance();
217 template<
class NormalForceSpecies,
class FrictionForceSpecies,
class AdhesiveForceSpecies>
220 return NormalForceSpecies::getBaseName()
221 + FrictionForceSpecies::getBaseName()
222 + AdhesiveForceSpecies::getBaseName() +
"MixedSpecies";
233 template<
class NormalForceSpecies,
class FrictionForceSpecies,
class AdhesiveForceSpecies>
242 template<
class NormalForceSpecies,
class FrictionForceSpecies,
class AdhesiveForceSpecies>
249 template<
class NormalForceSpecies,
class FrictionForceSpecies,
class AdhesiveForceSpecies>
255 delete interactionDestroyer;
264 template<
class NormalForceSpecies,
class FrictionForceSpecies,
class AdhesiveForceSpecies>
267 return FrictionForceSpecies::getUseAngularDOFs();
276 template<
class NormalForceSpecies,
class FrictionForceSpecies,
class AdhesiveForceSpecies>
280 logger.assert_always(
T!=
nullptr &&
S!=
nullptr,
"Arguments of mixAll cannot be null pointers");
282 logger.assert_always(
S->getNormalForce()->getConstantRestitution() ==
T->getNormalForce()->getConstantRestitution(),
"mixing two LinearPlasticViscoelasticNormalSpecies, but only one has constantRestitution");
283 NormalForceSpecies::setConstantRestitution(
S->getNormalForce()->getConstantRestitution());
288 logger.assert_always(TN!=
nullptr && TF!=
nullptr && TA!=
nullptr,
289 "Cannot mix two species of different type (% and %)",
S->getName(),
T->getName());
294 logger.assert_always(SN!=
nullptr && SF!=
nullptr && SA!=
nullptr,
295 "Cannot mix two species of different type (% and %)",
S->getName(),
T->getName());
297 NormalForceSpecies::mix(SN,TN);
298 FrictionForceSpecies::mix(SF,TF);
299 AdhesiveForceSpecies::mix(SA,TA);
std::string getName(int argc, char *argv[])
Definition: CombineParallelDataFiles.cpp:16
Eigen::Triplet< double > T
Definition: EigenUnitTest.cpp:11
Logger< MERCURYDPM_LOGLEVEL > logger("MercuryKernel")
Definition of different loggers with certain modules. A user can define its own custom logger here.
LL< Log::WARN > WARN
Warning log level.
Definition: Logger.cc:33
Defines a short-range (non-contact) force parallel to the contact normal, usually adhesive.
void setBaseSpecies(BaseSpecies *baseSpecies)
Definition: BaseForce.h:21
Defines the basic properties that a interactable object can have.
Definition: BaseInteractable.h:34
Stores information about interactions between two interactable objects; often particles but could be ...
Definition: BaseInteraction.h:39
unsigned int getId() const
Returns the unique identifier of any particular object.
Definition: BaseObject.h:104
unsigned int getIndex() const
Returns the index of the object in the handler.
Definition: BaseObject.h:97
void setIndex(unsigned int index)
Allows one to assign an index to an object in the handler/container.
Definition: BaseObject.cc:42
void setId(unsigned long id)
Assigns a unique identifier to each object in the handler (container) which remains constant even aft...
Definition: BaseObject.cc:50
BaseSpecies is the class from which all other species are derived.
Definition: BaseSpecies.h:29
BaseAdhesiveForce * adhesiveForce_
A pointer to the adhesive force parameters.
Definition: BaseSpecies.h:166
void read(std::istream &is) override
Definition: BaseSpecies.cc:119
BaseFrictionForce * frictionForce_
A pointer to the friction force parameters.
Definition: BaseSpecies.h:159
BaseNormalForce * normalForce_
A pointer to the normal force parameters.
Definition: BaseSpecies.h:152
void write(std::ostream &os) const override
Sets the boolean constantRestitution_.
Definition: BaseSpecies.cc:110
Defines a contact force orthogonal to the contact normal.
Contains information about the contact between two interactables, BaseInteraction::P_ and BaseInterac...
Definition: Interaction.h:95
Contains contact force properties for contacts between particles with two different species.
Definition: MixedSpecies.h:22
void deleteEmptyInteraction(BaseInteraction *interaction) const final
Definition: MixedSpecies.h:250
BaseInteraction * getNewInteraction(BaseInteractable *const P, BaseInteractable *const I, unsigned timeStamp) const final
When a contact between two particles is determined, an Interaction object is created,...
Definition: MixedSpecies.h:234
bool getUseAngularDOFs() const final
Returns true if torques have to be calculated.
Definition: MixedSpecies.h:265
std::string getName() const final
Returns the name of the MixedSpecies as it is used in the restart file.
Definition: MixedSpecies.h:218
BaseInteraction * getEmptyInteraction() const final
Definition: MixedSpecies.h:244
void mixAll(BaseSpecies *const S, BaseSpecies *const T) final
sets the MixedSpecies properties by mixing the properties of two particle species
Definition: MixedSpecies.h:277
MixedSpecies()
The default constructor.
Definition: MixedSpecies.h:81
MixedSpecies< NormalForceSpecies, FrictionForceSpecies, AdhesiveForceSpecies > * copy() const final
Creates a deep copy of the MixedSpecies from which it is called.
Definition: MixedSpecies.h:130
virtual ~MixedSpecies()
The default destructor.
Definition: MixedSpecies.h:121
void read(std::istream &is) final
Reads the species properties from an input stream.
Definition: MixedSpecies.h:186
void write(std::ostream &os) const final
Writes the MixedSpecies properties to an output stream.
Definition: MixedSpecies.h:169
void copyInto(BaseSpecies *bs) const final
Copies the content of this into the species bs, if they are of the same type.
Definition: MixedSpecies.h:144
Defines a contact force parallel to the contact normal.
Contains material and contact force properties.
Definition: Species.h:14
RealScalar s
Definition: level1_cplx_impl.h:130
#define I
Definition: main.h:127
#define DEBUG
Definition: main.h:181
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE std::enable_if_t< dt !=data_source::global_mem, void > write(PacketType &packet_data, DataScalar ptr)
write, a template function used for storing the data to local memory. This function is used to guaran...
Definition: TensorContractionSycl.h:221
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE std::enable_if_t< PacketLoad, PacketType > read(const TensorMapper &tensorMapper, const StorageIndex &NCIndex, const StorageIndex &CIndex, const StorageIndex &ld)
read, a template function used for loading the data from global memory. This function is used to guar...
Definition: TensorContractionSycl.h:162
double P
Uniform pressure.
Definition: TwenteMeshGluing.cpp:77
std::string string(const unsigned &i)
Definition: oomph_definitions.cc:286
@ S
Definition: quadtree.h:62