MercuryDPM
Beta
|
#include <ParticleSpecies.h>
Public Types | |
typedef BaseInteraction | InteractionType |
Public Member Functions | |
ParticleSpecies () | |
The default constructor. More... | |
ParticleSpecies (const ParticleSpecies &p) | |
The default copy constructor. More... | |
virtual | ~ParticleSpecies () |
The default destructor. More... | |
virtual ParticleSpecies * | copy () const =0 |
Creates a deep copy of the object from which it is called. More... | |
virtual BaseSpecies * | copyMixed () const =0 |
Creates a new MixedSpecies with the same force properties as the Species from which it is called. See Species::copyMixed for details. More... | |
void | read (std::istream &is) |
Reads the species properties from an input stream. More... | |
void | write (std::ostream &os) const |
Writes the species properties to an output stream. More... | |
std::string | getBaseName () const |
Used in Species::getName to obtain a unique name for each Species. More... | |
void | setDensity (Mdouble density) |
Allows the density to be changed. More... | |
Mdouble | getMassFromRadius (const Mdouble radius) |
Mdouble | getDensity () const |
Allows the density to be accessed. More... | |
virtual void | computeMass (BaseParticle *p) const |
Compute Particle mass function, which required a reference to the Species vector. It computes the Particles mass, Inertia and the inverses. More... | |
Public Member Functions inherited from BaseSpecies | |
BaseSpecies () | |
The default constructor. More... | |
BaseSpecies (const BaseSpecies &p) | |
The copy constructor. More... | |
virtual | ~BaseSpecies () |
The default destructor. More... | |
void | setHandler (SpeciesHandler *handler) |
Sets the pointer to the handler to which this species belongs. More... | |
SpeciesHandler * | getHandler () const |
Returns the pointer to the handler to which this species belongs. More... | |
Mdouble | average (Mdouble a, Mdouble b) |
defines the average of two variables by the harmonic mean. More... | |
virtual void | mixAll (BaseSpecies *const S, BaseSpecies *const T)=0 |
creates default values for mixed species More... | |
virtual Mdouble | getInteractionDistance () const =0 |
returns the largest separation distance at which adhesive short-range forces can occur. More... | |
virtual bool | getUseAngularDOFs () const =0 |
Returns true if torques (i.e. angular degrees of freedom) have to be calculated. More... | |
virtual BaseInteraction * | getNewInteraction (BaseInteractable *P, BaseInteractable *I, Mdouble timeStamp)=0 |
returns new Interaction object. More... | |
Public Member Functions inherited from BaseObject | |
BaseObject () | |
Default constructor. More... | |
BaseObject (const BaseObject &p) | |
Copy constructor, copies all the objects BaseObject contains. More... | |
virtual | ~BaseObject () |
virtual destructor More... | |
virtual std::string | getName () const =0 |
A purely virtual function. More... | |
virtual void | moveInHandler (const unsigned int index) |
Except that it is virtual, it does the same thing as setIndex() does. More... | |
void | setIndex (const unsigned int index) |
Allows one to assign an index to an object in the handler/container. More... | |
void | setId (const unsigned int id) |
Assigns a unique identifier to each object in the handler (container) which remains constant even after the object is deleted from the container/handler. More... | |
unsigned int | getIndex () const |
Returns the index of the object in the handler. More... | |
unsigned int | getId () const |
Returns the unique identifier of any particular object. More... | |
Private Attributes | |
Mdouble | density_ |
The particle mass density. More... | |
Definition at line 36 of file ParticleSpecies.h.
Definition at line 39 of file ParticleSpecies.h.
ParticleSpecies::ParticleSpecies | ( | ) |
The default constructor.
Definition at line 36 of file ParticleSpecies.cc.
References density_.
ParticleSpecies::ParticleSpecies | ( | const ParticleSpecies & | p | ) |
The default copy constructor.
[in] | p | the species that is copied |
Definition at line 47 of file ParticleSpecies.cc.
References density_.
|
virtual |
The default destructor.
Definition at line 55 of file ParticleSpecies.cc.
|
virtual |
Compute Particle mass function, which required a reference to the Species vector. It computes the Particles mass, Inertia and the inverses.
Compute BaseParticle mass function, which required a reference to the Species vector.
It computes the Particles mass, Inertia and the inverses. this function is called, if BaseParticleHandler::addObject, SpeciesHandler::addObject, ParticleSpecies::setDensity, BaseParticle::setRadius or DPMBase::setParticleDimensions is called
Definition at line 146 of file ParticleSpecies.cc.
References ERROR, getDensity(), BaseParticle::getMass(), BaseParticle::getParticleDimensions(), BaseParticle::getRadius(), BaseParticle::inertia_, BaseParticle::invInertia_, BaseParticle::invMass_, BaseParticle::isFixed(), logger, BaseParticle::mass_, constants::pi, and mathsFunc::square().
Referenced by ParticleHandler::addObject(), BaseParticle::setRadius(), and BaseParticle::unfix().
|
pure virtual |
Creates a deep copy of the object from which it is called.
See BaseSpecies::copy for details
Implements BaseSpecies.
Implemented in Species< NormalForceSpecies, FrictionForceSpecies, AdhesiveForceSpecies >.
Referenced by MaserBoundary::addParticleToMaser().
|
pure virtual |
Creates a new MixedSpecies with the same force properties as the Species from which it is called. See Species::copyMixed for details.
Implemented in Species< NormalForceSpecies, FrictionForceSpecies, AdhesiveForceSpecies >.
Referenced by SpeciesHandler::addObject().
std::string ParticleSpecies::getBaseName | ( | ) | const |
Used in Species::getName to obtain a unique name for each Species.
Definition at line 85 of file ParticleSpecies.cc.
Mdouble ParticleSpecies::getDensity | ( | ) | const |
Allows the density to be accessed.
Definition at line 111 of file ParticleSpecies.cc.
References density_.
Referenced by computeMass(), getMassFromRadius(), and ChuteBottom::makeRoughBottom().
Definition at line 116 of file ParticleSpecies.cc.
References ERROR, getDensity(), BaseHandler< T >::getDPMBase(), BaseSpecies::getHandler(), DPMBase::getParticleDimensions(), logger, and constants::pi.
Referenced by ChuteBottom::makeRoughBottom().
|
virtual |
Reads the species properties from an input stream.
[in] | is | input stream (typically the restart file) |
Implements BaseObject.
Reimplemented in Species< NormalForceSpecies, FrictionForceSpecies, AdhesiveForceSpecies >.
Definition at line 75 of file ParticleSpecies.cc.
References density_, and BaseObject::read().
Referenced by Species< NormalForceSpecies, FrictionForceSpecies, AdhesiveForceSpecies >::read().
void ParticleSpecies::setDensity | ( | Mdouble | density | ) |
Allows the density to be changed.
[in] | density | the particle density |
Definition at line 93 of file ParticleSpecies.cc.
References ParticleHandler::computeAllMasses(), density_, ERROR, BaseHandler< T >::getDPMBase(), BaseSpecies::getHandler(), BaseObject::getIndex(), logger, and DPMBase::particleHandler.
Referenced by SpeciesHandler::readOldObject().
|
virtual |
Writes the species properties to an output stream.
[out] | os | output stream (typically the restart file) |
Implements BaseObject.
Reimplemented in Species< NormalForceSpecies, FrictionForceSpecies, AdhesiveForceSpecies >.
Definition at line 65 of file ParticleSpecies.cc.
References density_, and BaseObject::write().
Referenced by Species< NormalForceSpecies, FrictionForceSpecies, AdhesiveForceSpecies >::write().
|
private |
The particle mass density.
Definition at line 91 of file ParticleSpecies.h.
Referenced by getDensity(), ParticleSpecies(), read(), setDensity(), and write().