MercuryDPM
Alpha
|
It's an insertion boundary which has cuboidal shape (yes, 'CuboidalInsertionBoundary' would have been the correct name). More...
#include <CubeInsertionBoundary.h>
Public Member Functions | |
CubeInsertionBoundary () | |
Constructor; sets everything to 0. More... | |
CubeInsertionBoundary (const CubeInsertionBoundary &other) | |
Copy constructor with deep copy. More... | |
~CubeInsertionBoundary () | |
Destructor: default destructor. More... | |
virtual CubeInsertionBoundary * | copy () const override |
Creates a copy on the heap and returns a pointer. More... | |
void | set (BaseParticle *particleToCopy, int maxFailed, Vec3D posMin, Vec3D posMax, Vec3D velMin, Vec3D velMax, double radMin, double radMax) |
Sets the properties of the cuboidal insertion boundary. More... | |
virtual BaseParticle * | generateParticle (RNG &random) override |
Generates a particle with random position, radius and velocity. More... | |
void | read (std::istream &is) override |
reads boundary properties from istream More... | |
MERCURY_DEPRECATED void | oldRead (std::istream &is) |
deprecated version of CubeInsertionBoundary::read(). More... | |
void | write (std::ostream &os) const override |
writes boundary properties to ostream More... | |
std::string | getName () const override |
Returns the name of the object. More... | |
Public Member Functions inherited from InsertionBoundary | |
InsertionBoundary () | |
Default constructor: set everything to 0/nullptr. More... | |
InsertionBoundary (const InsertionBoundary &other) | |
Copy constructor (with deep copy) More... | |
virtual | ~InsertionBoundary () |
Destructor: delete the particle that has to be copied at every insertion. More... | |
void | set (BaseParticle *particleToCopy, unsigned int maxFailed) |
Sets the particle that will be inserted and the maximum number of times for which insertion may fail. More... | |
virtual void | checkBoundaryBeforeTimeStep (DPMBase *md) |
Fills the boundary with particles. More... | |
unsigned int | getNumberOfParticlesInserted () const |
Gets the number of particles inserted by the boundary. More... | |
void | setMaxFailed (unsigned int maxFailed) |
Sets the number of times that the wall may fail to insert a particle. More... | |
unsigned int | getMaxFailed () const |
Gets the number of times that the boundary may fail to insert a particle. More... | |
void | setParticleToCopy (BaseParticle *particleToCopy) |
Sets the particle that will be inserted through the insertion boundary. More... | |
BaseParticle * | getParticleToCopy () const |
Gets the particle that will be inserted through the insertion boundary. More... | |
void | read (std::istream &is) |
Reads the boundary's id_ and maxFailed_. More... | |
void | write (std::ostream &os) const |
Writes the boundary's id_ and maxFailed_. More... | |
Public Member Functions inherited from BaseBoundary | |
BaseBoundary () | |
default constructor. More... | |
BaseBoundary (const BaseBoundary &b) | |
copy constructor More... | |
virtual | ~BaseBoundary () |
destructor More... | |
virtual void | createPeriodicParticles (BaseParticle *P UNUSED, ParticleHandler &pH UNUSED) |
Creates periodic copies of given particle in case of periodic boundaries. More... | |
virtual bool | checkBoundaryAfterParticleMoved (BaseParticle *P UNUSED, ParticleHandler &pH UNUSED) |
Checks if given particle passed the boundary. More... | |
virtual void | checkBoundaryBeforeTimeStep (DPMBase *md UNUSED) |
Fills a (3D) boundary with particles. More... | |
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 constructor. More... | |
BaseObject (const BaseObject &p) | |
Copy constructor, copies all the objects BaseObject contains. More... | |
virtual | ~BaseObject () |
virtual destructor 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 | |
Vec3D | posMin_ |
Minimal and maximal positions defining the boundary's boundaries, and minimum and maximum velocity of the particles to be inserted. More... | |
Vec3D | posMax_ |
Vec3D | velMin_ |
Vec3D | velMax_ |
double | radMin_ |
minimum and maximum radii of the particles to be inserted More... | |
double | radMax_ |
Additional Inherited Members | |
Protected Attributes inherited from InsertionBoundary | |
BaseParticle * | particleToCopy_ |
Particle that will be inserted through the insertion boundary. 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... | |
It's an insertion boundary which has cuboidal shape (yes, 'CuboidalInsertionBoundary' would have been the correct name).
Definition at line 41 of file CubeInsertionBoundary.h.
CubeInsertionBoundary::CubeInsertionBoundary | ( | ) |
Constructor; sets everything to 0.
Default constructor; sets every data member to 0.
Definition at line 33 of file CubeInsertionBoundary.cc.
References posMax_, posMin_, radMax_, radMin_, velMax_, and velMin_.
Referenced by copy().
CubeInsertionBoundary::CubeInsertionBoundary | ( | const CubeInsertionBoundary & | other | ) |
Copy constructor with deep copy.
Copy constructor
Definition at line 46 of file CubeInsertionBoundary.cc.
References posMax_, posMin_, radMax_, radMin_, velMax_, and velMin_.
CubeInsertionBoundary::~CubeInsertionBoundary | ( | ) |
Destructor: default destructor.
Destructor. Since there are no pointers in this class, there is no need for any actions here.
Definition at line 61 of file CubeInsertionBoundary.cc.
|
overridevirtual |
Creates a copy on the heap and returns a pointer.
Copy method; creates a copy on the heap and returns its pointer.
Implements BaseBoundary.
Definition at line 69 of file CubeInsertionBoundary.cc.
References CubeInsertionBoundary().
|
overridevirtual |
Generates a particle with random position, radius and velocity.
Generates a particle with random position (although within the boundary, of course), velocity and radius and returns its pointer.
[in] | random | Random number generator |
Implements InsertionBoundary.
Definition at line 115 of file CubeInsertionBoundary.cc.
References BaseParticle::copy(), InsertionBoundary::getParticleToCopy(), RNG::getRandomNumber(), posMax_, posMin_, radMax_, radMin_, BaseInteractable::setPosition(), BaseParticle::setRadius(), BaseInteractable::setVelocity(), velMax_, velMin_, Vec3D::X, Vec3D::Y, and Vec3D::Z.
|
overridevirtual |
Returns the name of the object.
Returns the name of the object class
Implements BaseObject.
Definition at line 186 of file CubeInsertionBoundary.cc.
void CubeInsertionBoundary::oldRead | ( | std::istream & | is | ) |
deprecated version of CubeInsertionBoundary::read().
Deprecated version of read().
Definition at line 153 of file CubeInsertionBoundary.cc.
References posMax_, posMin_, radMax_, radMin_, InsertionBoundary::setMaxFailed(), velMax_, and velMin_.
|
overridevirtual |
reads boundary properties from istream
Reads the boundary properties from an istream
[in,out] | is | the istream |
Implements BaseBoundary.
Definition at line 137 of file CubeInsertionBoundary.cc.
References posMax_, posMin_, radMax_, radMin_, InsertionBoundary::read(), velMax_, and velMin_.
void CubeInsertionBoundary::set | ( | BaseParticle * | particleToCopy, |
int | maxFailed, | ||
Vec3D | posMin, | ||
Vec3D | posMax, | ||
Vec3D | velMin, | ||
Vec3D | velMax, | ||
double | radMin, | ||
double | radMax | ||
) |
Sets the properties of the cuboidal insertion boundary.
Sets all the properties of the cuboidal insertion boundary.
[in] | particleToCopy | Pointer to the BaseParticle which is used as a basis for the particles 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] | radMin | Minimum radius of inserted particles |
[in] | radMax | Maximum radius of inserted particles |
Definition at line 93 of file CubeInsertionBoundary.cc.
References posMax_, posMin_, radMax_, radMin_, InsertionBoundary::setMaxFailed(), InsertionBoundary::setParticleToCopy(), velMax_, and velMin_.
|
overridevirtual |
writes boundary properties to ostream
Writes boundary's properties to an ostream
[in] | os | the ostream |
Implements BaseBoundary.
Definition at line 171 of file CubeInsertionBoundary.cc.
References posMax_, posMin_, radMax_, radMin_, velMax_, velMin_, and InsertionBoundary::write().
|
private |
Definition at line 100 of file CubeInsertionBoundary.h.
Referenced by CubeInsertionBoundary(), generateParticle(), oldRead(), read(), set(), and write().
|
private |
Minimal and maximal positions defining the boundary's boundaries, and minimum and maximum velocity of the particles to be inserted.
Definition at line 100 of file CubeInsertionBoundary.h.
Referenced by CubeInsertionBoundary(), generateParticle(), oldRead(), read(), set(), and write().
|
private |
Definition at line 104 of file CubeInsertionBoundary.h.
Referenced by CubeInsertionBoundary(), generateParticle(), oldRead(), read(), set(), and write().
|
private |
minimum and maximum radii of the particles to be inserted
Definition at line 104 of file CubeInsertionBoundary.h.
Referenced by CubeInsertionBoundary(), generateParticle(), oldRead(), read(), set(), and write().
|
private |
Definition at line 100 of file CubeInsertionBoundary.h.
Referenced by CubeInsertionBoundary(), generateParticle(), oldRead(), read(), set(), and write().
|
private |
Definition at line 100 of file CubeInsertionBoundary.h.
Referenced by CubeInsertionBoundary(), generateParticle(), oldRead(), read(), set(), and write().