|
#include <RandomClusterInsertionBoundary.h>
Public Member Functions | |
RandomClusterInsertionBoundary () | |
Constructor: inherits from BaseClusterInsertionBoundary constructor. More... | |
RandomClusterInsertionBoundary (const RandomClusterInsertionBoundary &other) | |
Copy constructor with deep copy. More... | |
~RandomClusterInsertionBoundary () override | |
Destructor: default destructor. More... | |
RandomClusterInsertionBoundary * | copy () const override |
Creates a copy on the heap and returns a pointer. More... | |
void | set (BaseParticle *particleToCopy, unsigned int maxFailed, Vec3D posMin, Vec3D posMax, Vec3D velMin, Vec3D velMax, Mdouble rMicroParticle) |
Sets the properties of the ClusterInsertionBoundary. More... | |
void | set (BaseParticle &particleToCopy, unsigned int maxFailed, Vec3D posMin, Vec3D posMax, Vec3D velMin, Vec3D velMax, Mdouble rMicroParticle) |
void | set (BaseParticle *particleToCopy, unsigned int maxFailed, Vec3D posMin, Vec3D posMax, unsigned int nParticlesPerCluster, Vec3D velMin, Vec3D velMax) |
Sets the properties of the ClusterInsertionBoundary. More... | |
void | set (BaseParticle &particleToCopy, unsigned int maxFailed, Vec3D posMin, Vec3D posMax, unsigned int nParticlesPerCluster, Vec3D velMin, Vec3D velMax) |
void | setNumberOfParticlesPerCluster (unsigned int nParticlesPeCluster) |
sets the number of particles per cluster More... | |
void | checkBoundaryBeforeTimeStep (DPMBase *md) override |
inserts cluster, if no interactions are detected. More... | |
void | placeParticle (BaseParticle *p, RNG &random) override |
sets random position and velocity for the cluster. More... | |
Public Member Functions inherited from BaseClusterInsertionBoundary | |
BaseClusterInsertionBoundary () | |
Constructor; sets everything to 0. More... | |
BaseClusterInsertionBoundary (const BaseClusterInsertionBoundary &other) | |
Copy constructor with deep copy. More... | |
~BaseClusterInsertionBoundary () override | |
Destructor: default destructor. More... | |
void | setRandomised (bool randomised) |
this turns off the randomise(): created for UnitTests. More... | |
bool | getRandomised () |
this returns a bool which indicates if the process is randomised (true) or not (false). More... | |
unsigned int | getNumberOfClusterInserted () |
this returns the number of cluster inserted. More... | |
void | setRadiusMicroParticle (Mdouble rMP) |
this sets the radius of the micro particle composing the cluster. More... | |
void | setGeometry (Vec3D posMin, Vec3D posMax) |
Sets the geometry (position and velocity distribution) of the ClusterInsertionBoundary. More... | |
void | setVelocityRange (Vec3D velMin, Vec3D velMax) |
Sets the velocity range of the ClusterInsertionBoundary. More... | |
void | setAdditionalClusterProperties (Mdouble collisionTimeOverTimeStep, Mdouble velocityDampingModulus, Mdouble energyRatioTolerance) |
sets additional cluster properties as: More... | |
void | setOutputClusterProperties (bool doCdatOutput, bool doOverlOutput, bool doAmatOutput, bool doIntStrucOutput, bool doVtkOutput, bool doRestartOutput, bool doFStatOutput, bool doEneOutput) |
sets cluster whether or not cluster output files will be created, for example: More... | |
void | read (std::istream &is) override |
reads boundary properties from istream More... | |
void | write (std::ostream &os) const override |
writes boundary properties to ostream More... | |
Public Member Functions inherited from InsertionBoundary | |
InsertionBoundary () | |
InsertionBoundary (const InsertionBoundary &other) | |
Copy constructor (with deep copy) More... | |
~InsertionBoundary () override | |
Destructor: delete the particle that has to be copied at every insertion. More... | |
virtual BaseParticle * | generateParticle (RNG &random) |
Sets the properties of the InsertionBoundary for a single particle type / virtual void set(BaseParticle* particleToCopy, unsigned int maxFailed, Vec3D velMin, Vec3D velMax, double radMin, double radMax)=0;. More... | |
void | insertParticles (DPMBase *md) |
Fill a certain domain with particles. More... | |
unsigned int | getNumberOfParticlesInserted () const |
Gets the number of particles inserted by the boundary. More... | |
Mdouble | getMassOfParticlesInserted () const |
Gets the mass of particles inserted by the boundary. More... | |
Mdouble | getVolumeOfParticlesInserted () const |
Gets the volume of particles inserted by the boundary. More... | |
void | reset () |
resets particle property counter variables. More... | |
void | activate () |
Turns on the InsertionBoundary. More... | |
void | deactivate () |
Turns off the InsertionBoundary. More... | |
bool | isActivated () |
Returns whether the InsertionBoundary is activated. More... | |
unsigned int | getMaxFailed () const |
Gets the number of times that the boundary may fail to insert a particle. More... | |
void | setParticleToCopy (std::vector< BaseParticle * > particleToCopy) |
Sets multiple different particles that will be inserted through the insertion boundary. More... | |
void | setParticleToCopy (BaseParticle *particleToCopy) |
Sets the particle that will be inserted through the insertion boundary. More... | |
std::vector< BaseParticle * > | getParticleToCopy () |
Gets the particles that will be inserted through the insertion boundary. More... | |
void | read (std::istream &is) override |
Reads the boundary's id_ and maxFailed_. More... | |
void | write (std::ostream &os) const override |
Writes the boundary's id_ and maxFailed_. More... | |
Mdouble | getVolumeFlowRate () const |
Gets the volume flow rate of the insertion routine. More... | |
void | setVolumeFlowRate (Mdouble volumeFlowRate_) |
Sets the volume flow rate of the insertion routine. More... | |
Mdouble | getInitialVolume () const |
Gets the initialVolume() . More... | |
void | setInitialVolume (Mdouble initialVolume) |
Gets the Volume which should be inserted by the insertion routine. More... | |
void | setPSD (const PSD psd) |
Sets the range of particle radii that may be generated from a user defined PSD. More... | |
void | setPSD (std::vector< PSD > psd, std::vector< Mdouble > probability) |
Sets the ranges of particle radii that may be generated from user defined PSDs. More... | |
std::vector< PSD > | getPSD () |
Gets the particle size distributions set by the user. More... | |
void | setVariableVolumeFlowRate (const std::vector< Mdouble > &variableCumulativeVolumeFlowRate, Mdouble samplingInterval) |
Sets a variable volume flow rate. More... | |
bool | insertParticle (Mdouble time) |
Checks the inserted total volume and returns if a particle is still allowed to be inserted. More... | |
bool | getCheckParticleForInteraction () const |
Gets the variable that checks if a particle has an interaction. More... | |
void | setCheckParticleForInteraction (bool checkParticleForInteraction) |
Sets the variable that checks if a particle has an interaction. More... | |
void | setManualInsertion (bool manualInsertion) |
Set the flag for a manual PSD insertion routine. More... | |
Public Member Functions inherited from BaseBoundary | |
BaseBoundary () | |
default constructor. More... | |
BaseBoundary (const BaseBoundary &b) | |
copy constructor More... | |
~BaseBoundary () override | |
destructor More... | |
virtual void | createPeriodicParticle (BaseParticle *p UNUSED, ParticleHandler &pH UNUSED) |
Creates a periodic particle in case of periodic boundaries in serial build. More... | |
virtual void | createPeriodicParticles (ParticleHandler &pH UNUSED) |
Creates periodic copies of given particle in case of periodic boundaries. More... | |
virtual void | checkBoundaryAfterParticlesMove (ParticleHandler &pH) |
Virtual function that does things to particles, each time step after particles have moved. More... | |
virtual void | actionsBeforeTimeLoop () |
Virtual function that does something after DPMBase::setupInitialConditions but before the first time step. More... | |
virtual void | modifyGhostAfterCreation (BaseParticle *particle, int i) |
virtual void | writeVTK (std::fstream &file) |
void | setHandler (BoundaryHandler *handler) |
Sets the boundary's BoundaryHandler. More... | |
BoundaryHandler * | getHandler () const |
Returns the boundary's BoundaryHandler. More... | |
Public Member Functions inherited from BaseObject | |
BaseObject ()=default | |
Default constructor. More... | |
BaseObject (const BaseObject &p)=default | |
Copy constructor, copies all the objects BaseObject contains. More... | |
virtual | ~BaseObject ()=default |
virtual destructor More... | |
virtual void | moveInHandler (unsigned int index) |
Except that it is virtual, it does the same thing as setIndex() does. More... | |
void | setIndex (unsigned int index) |
Allows one to assign an index to an object in the handler/container. More... | |
void | setId (unsigned long 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... | |
void | setGroupId (unsigned groupId) |
unsigned | getGroupId () const |
Private Member Functions | |
std::string | getName () const override |
Returns the name of the object. More... | |
Additional Inherited Members | |
Public Attributes inherited from InsertionBoundary | |
std::vector< BaseParticle * > | particleToCopy_ |
read Distribution class from file. / friend std::istream& operator>>(std::istream& is, InsertionBoundary::Distribution& type); More... | |
unsigned int | maxFailed_ |
Number of times that the wall may fail to insert a particle. More... | |
unsigned int | numberOfParticlesInserted_ |
Number of particles that are already inserted. More... | |
Mdouble | massInserted_ |
Total mass of particles inserted. More... | |
Mdouble | volumeInserted_ |
Total volume of particles inserted. More... | |
bool | isActivated_ |
The InsertionBoundary is activated by default. If the InsertionBoundary is deactivated, then it introduces no particles (useful for trying to maintain a certain insertion rate). More... | |
Mdouble | volumeFlowRate_ |
Mdouble | initialVolume_ |
std::vector< Mdouble > | variableCumulativeVolumeFlowRate_ |
Mdouble | samplingInterval_ |
bool | checkParticleForInteraction_ |
Checks if a particle has an interaction with a wall or other particles. More... | |
std::vector< PSD > | particleSizeDistributionVector_ |
Defines a particle size distribution as an object of the PSD class; if particleSizeDistributionVector_ is empty, distribution_ is used instead. More... | |
Vec3D | velMin_ |
Minimum and maximum velocity of the particles to be inserted. More... | |
Vec3D | velMax_ |
bool | isManuallyInserting_ |
A flag to enable a top-down class-by-class manual insertion of a PSD; default is FALSE. More... | |
std::vector< Mdouble > | probability_ |
vector of probabilities in range [0,1] which determine the mixing ratio of partice size distributions. More... | |
int | chosenSpecies_ |
stores the chosen species for each timestep. More... | |
Protected Attributes inherited from BaseClusterInsertionBoundary | |
unsigned int | nClusterInserted_ |
Mdouble | radiusParticle_ |
int | nParticles_ |
LinearPlasticViscoelasticFrictionSpecies * | clusterSpecies_ |
bool | isCdatOutputOn_ |
bool | isOverlOutputOn_ |
bool | isAmatOutputOn_ |
bool | isIntStrucOutputOn_ |
bool | isVtkOutputOn_ |
bool | isRestartOutputOn_ |
bool | isFStatOutputOn_ |
bool | isEneOutputOn_ |
Mdouble | sizeDispersityParticle_ |
Mdouble | velocityDampingModulus_ |
int | nInternalStructurePoints_ |
Mdouble | energyRatioTolerance_ |
Mdouble | collisionTimeOverTimeStep_ |
Vec3D | posMin_ |
Vec3D | posMax_ |
Vec3D | velMin_ |
Vec3D | velMax_ |
bool | setRadiusParticleAndNotNumberOfParticles_ |
std::vector< Vec3D > | clusterPositions_ |
std::vector< Mdouble > | clusterRadii_ |
bool | randomised_ |
RandomClusterInsertionBoundary This class works exactly like CubeInsertionBoundary class but inserts clusters instead of particles. MPI: It does not work with MPI. One of the reasons is the need to adapt function DPMBase::importParticlesAs(). In particular particles and interaction should be imported as MPIParticle and MPIInteraction. In addition to this, the same should be done inside BaseCluster::actionsAfterSolve() when particles are centred around the desired position.
RandomClusterInsertionBoundary::RandomClusterInsertionBoundary | ( | ) |
Constructor: inherits from BaseClusterInsertionBoundary constructor.
Default constructor: inherits from BaseClusterInsertionBoundary constructor.
Referenced by copy().
RandomClusterInsertionBoundary::RandomClusterInsertionBoundary | ( | const RandomClusterInsertionBoundary & | other | ) |
Copy constructor with deep copy.
Copy constructor
|
overridedefault |
Destructor: default destructor.
Default Destructor.
|
overridevirtual |
inserts cluster, if no interactions are detected.
Reimplemented from BaseClusterInsertionBoundary.
References MPIContainer::broadcast(), DPMBase::checkParticleForInteraction(), BaseClusterInsertionBoundary::collisionTimeOverTimeStep_, BaseHandler< T >::copyAndAddObject(), copyDataFromMPIParticleToParticle(), copyDataFromParticleToMPIParticle(), BaseCluster::doAmatOutput(), BaseCluster::doCdatOutput(), BaseCluster::doEneOutput(), BaseCluster::doFStatOutput(), BaseCluster::doIntStrucOutput(), BaseCluster::doOverlOutput(), BaseCluster::doRestartOutput(), BaseCluster::doVtkOutput(), BaseClusterInsertionBoundary::energyRatioTolerance_, InsertionBoundary::generateParticle(), ParticleHandler::getMass(), DPMBase::getMax(), DPMBase::getMin(), BaseHandler< T >::getNextGroupId(), DPMBase::getNextTime(), DPMBase::getNumberOfDomains(), BaseHandler< T >::getObject(), BaseClusterInsertionBoundary::getRandomised(), BaseHandler< T >::getSize(), ParticleHandler::getVolume(), DPMBase::importParticlesAs(), InsertionBoundary::insertParticle(), MPIContainer::Instance(), DPMBase::interactionHandler, InsertionBoundary::isActivated_, BaseClusterInsertionBoundary::isAmatOutputOn_, BaseClusterInsertionBoundary::isCdatOutputOn_, BaseClusterInsertionBoundary::isEneOutputOn_, BaseClusterInsertionBoundary::isFStatOutputOn_, BaseClusterInsertionBoundary::isIntStrucOutputOn_, BaseClusterInsertionBoundary::isOverlOutputOn_, BaseClusterInsertionBoundary::isRestartOutputOn_, BaseClusterInsertionBoundary::isVtkOutputOn_, logger, InsertionBoundary::massInserted_, InsertionBoundary::maxFailed_, BaseClusterInsertionBoundary::nClusterInserted_, BaseClusterInsertionBoundary::nInternalStructurePoints_, BaseClusterInsertionBoundary::nParticles_, NUMBER_OF_PROCESSORS, InsertionBoundary::numberOfParticlesInserted_, PARTICLE, DPMBase::particleHandler, placeParticle(), PROCESSOR_ID, BaseClusterInsertionBoundary::radiusParticle_, DPMBase::random, RNG::randomise(), BaseCluster::setClusterId(), BaseCluster::setCollisionTimeOverTimeStep(), DPMBase::setDomain(), BaseCluster::setEnergyRatioTolerance(), DPMBase::setNumberOfDomains(), BaseCluster::setNumberOfInternalStructurePoints(), BaseCluster::setNumberOfParticles(), BaseCluster::setParticleSpecies(), BaseCluster::setPosition(), BaseCluster::setRadiusCluster(), BaseCluster::setRadiusParticle(), BaseClusterInsertionBoundary::setRadiusParticleAndNotNumberOfParticles_, BaseCluster::setSizeDispersityParticle(), BaseCluster::setVelocity(), BaseCluster::setVelocityDampingModulus(), BaseClusterInsertionBoundary::sizeDispersityParticle_, DPMBase::solve(), DPMBase::speciesHandler, BaseClusterInsertionBoundary::velocityDampingModulus_, VERBOSE, and InsertionBoundary::volumeInserted_.
|
overridevirtual |
Creates a copy on the heap and returns a pointer.
Copy method; creates a copy on the heap and returns its pointer.
Reimplemented from BaseClusterInsertionBoundary.
References RandomClusterInsertionBoundary().
|
overrideprivatevirtual |
Returns the name of the object.
Returns the name of the object class
Reimplemented from BaseClusterInsertionBoundary.
|
overridevirtual |
sets random position and velocity for the cluster.
this sets position and velocity of the cluster.
Reimplemented from BaseClusterInsertionBoundary.
References BaseClusterInsertionBoundary::getRandomised(), RNG::getRandomNumber(), BaseClusterInsertionBoundary::posMax_, BaseClusterInsertionBoundary::posMin_, RNG::randomise(), BaseInteractable::setPosition(), BaseInteractable::setVelocity(), BaseClusterInsertionBoundary::velMax_, BaseClusterInsertionBoundary::velMin_, Vec3D::X, Vec3D::Y, and Vec3D::Z.
Referenced by checkBoundaryBeforeTimeStep().
void RandomClusterInsertionBoundary::set | ( | BaseParticle & | particleToCopy, |
unsigned int | maxFailed, | ||
Vec3D | posMin, | ||
Vec3D | posMax, | ||
unsigned int | nParticlesPerCluster, | ||
Vec3D | velMin, | ||
Vec3D | velMax | ||
) |
References set().
void RandomClusterInsertionBoundary::set | ( | BaseParticle * | particleToCopy, |
unsigned int | maxFailed, | ||
Vec3D | posMin, | ||
Vec3D | posMax, | ||
unsigned int | nParticlesPerCluster, | ||
Vec3D | velMin, | ||
Vec3D | velMax | ||
) |
Sets the properties of the ClusterInsertionBoundary.
Sets all the properties of the cuboidal insertion boundary.
[in] | particleToCopy | Pointer to the BaseParticle which is used as a basis for clusters to be inserted |
[in] | maxFailed | The maximum number of times the insertion of a particle may be tried and failed before the insertion of particles is considered done NB: this property is used in the parent's InsertionBoundary::checkBoundaryBeforeTimeStep(). |
[in] | posMin | First defining corner of cuboidal insertion boundary |
[in] | posMax | Second defining corner of cuboidal insertion boundary |
[in] | nParticlesPerCluster | Number of particles composing the cluster. |
[in] | velMin | Minimum velocity of inserted particles |
[in] | velMax | Maximum velocity of inserted particles |
Important: this function differs from the class above because gives the possiblity to set the number of particles instead of the radius of the micro particle.
References InsertionBoundary::maxFailed_, BaseClusterInsertionBoundary::setGeometry(), setNumberOfParticlesPerCluster(), InsertionBoundary::setParticleToCopy(), BaseClusterInsertionBoundary::velMax_, and BaseClusterInsertionBoundary::velMin_.
void RandomClusterInsertionBoundary::set | ( | BaseParticle * | particleToCopy, |
unsigned int | maxFailed, | ||
Vec3D | posMin, | ||
Vec3D | posMax, | ||
Vec3D | velMin, | ||
Vec3D | velMax, | ||
Mdouble | rMicroParticle | ||
) |
Sets the properties of the ClusterInsertionBoundary.
Sets all the properties of the cuboidal insertion boundary.
[in] | particleToCopy | Pointer to the BaseParticle which is used as a basis for clusters to be inserted |
[in] | maxFailed | The maximum number of times the insertion of a particle may be tried and failed before the insertion of particles is considered done NB: this property is used in the parent's InsertionBoundary::checkBoundaryBeforeTimeStep(). |
[in] | posMin | First defining corner of cuboidal insertion boundary |
[in] | posMax | Second defining corner of cuboidal insertion boundary |
[in] | velMin | Minimum velocity of inserted particles |
[in] | velMax | Maximum velocity of inserted particles |
[in] | rMicroParticle | Radius of the single particle composing the cluster. |
References InsertionBoundary::maxFailed_, BaseClusterInsertionBoundary::setGeometry(), InsertionBoundary::setParticleToCopy(), BaseClusterInsertionBoundary::setRadiusMicroParticle(), BaseClusterInsertionBoundary::velMax_, and BaseClusterInsertionBoundary::velMin_.
Referenced by set(), and RandomClusterInsertionBoundarySelfTest::setupInitialConditions().
void RandomClusterInsertionBoundary::setNumberOfParticlesPerCluster | ( | unsigned int | nParticlesPeCluster | ) |
sets the number of particles per cluster
References ERROR, logger, BaseClusterInsertionBoundary::nParticles_, and BaseClusterInsertionBoundary::setRadiusParticleAndNotNumberOfParticles_.
Referenced by set().