MercuryDPM
Alpha
|
#include <BaseBoundary.h>
Public Member Functions | |
BaseBoundary () | |
default constructor. More... | |
BaseBoundary (const BaseBoundary &b) | |
copy constructor More... | |
virtual | ~BaseBoundary () |
destructor More... | |
virtual BaseBoundary * | copy () const =0 |
Used to create a copy of the object NB: purely virtual function. More... | |
void | read (std::istream &is)=0 |
Reads the object's id_ from given istream NB: purely virtual function, overriding the version of BaseObject. More... | |
void | write (std::ostream &os) const =0 |
Adds object's id_ to given ostream NB: purely virtual function, overriding the version of BaseObject. 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 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 | |
BoundaryHandler * | handler_ |
pointer to the boundary's BoundaryHandler More... | |
Inherits from BaseObject
Definition at line 42 of file BaseBoundary.h.
BaseBoundary::BaseBoundary | ( | ) |
default constructor.
Default constructor
Definition at line 32 of file BaseBoundary.cc.
References handler_.
BaseBoundary::BaseBoundary | ( | const BaseBoundary & | b | ) |
copy constructor
Note: shallow copy! Otherwise the HGrid causes a stack overflow.
Copy constructor
Definition at line 44 of file BaseBoundary.cc.
|
virtual |
|
virtual |
Checks if given particle passed the boundary.
checks whether given particle passed the boundary, and if so, does something special with it. NB: virtual function
[in] | P | Particle checked |
[out] | pH | the particle handler. |
Definition at line 100 of file BaseBoundary.cc.
|
virtual |
Fills a (3D) boundary with particles.
Is used to fill the insides of a 3D boundary with particles untill it is filled up.
[in] | md | the problem's DPMBase object |
Definition at line 110 of file BaseBoundary.cc.
|
pure virtual |
Used to create a copy of the object NB: purely virtual function.
Implemented in LeesEdwardsBoundary, ShearBoxBoundary, HopperInsertionBoundary, CubeInsertionBoundary, CircularPeriodicBoundary, PeriodicBoundary, ChuteInsertionBoundary, DeletionBoundary, AngledPeriodicBoundary, and MaserBoundary.
|
virtual |
Creates periodic copies of given particle in case of periodic boundaries.
Used to create periodic copies of particles in classes which implement periodic boundary conditions NB: virtual function
[in] | P | particle of which periodic copies are to be created |
[out] | pH | the particle handler |
Definition at line 88 of file BaseBoundary.cc.
BoundaryHandler * BaseBoundary::getHandler | ( | ) | const |
Returns the boundary's BoundaryHandler.
Returns the pointer to the BoundaryHandler the boundary belongs to
Definition at line 127 of file BaseBoundary.cc.
References handler_.
Referenced by MaserBoundary::addParticleToMaser(), LeesEdwardsBoundary::getCurrentShift(), LeesEdwardsBoundary::getCurrentVelocity(), ShearBoxBoundary::shiftHorizontalPosition(), LeesEdwardsBoundary::shiftVerticalPosition(), and LeesEdwardsBoundary::write().
|
pure virtual |
Reads the object's id_ from given istream NB: purely virtual function, overriding the version of BaseObject.
Reads the object's id_ from the given istream
[in,out] | is | istream the id_ is read from |
Implements BaseObject.
Implemented in PeriodicBoundary, InsertionBoundary, AngledPeriodicBoundary, CircularPeriodicBoundary, HopperInsertionBoundary, DeletionBoundary, CubeInsertionBoundary, ChuteInsertionBoundary, MaserBoundary, LeesEdwardsBoundary, and ShearBoxBoundary.
Definition at line 67 of file BaseBoundary.cc.
References BaseObject::read().
Referenced by LeesEdwardsBoundary::read(), ShearBoxBoundary::read(), MaserBoundary::read(), DeletionBoundary::read(), CircularPeriodicBoundary::read(), AngledPeriodicBoundary::read(), InsertionBoundary::read(), and PeriodicBoundary::read().
void BaseBoundary::setHandler | ( | BoundaryHandler * | handler | ) |
Sets the boundary's BoundaryHandler.
Sets the pointer to the BounadaryHandler the boundary belongs to
[in] | handler | pointer to the boundary handler |
Definition at line 118 of file BaseBoundary.cc.
References handler_.
Referenced by BoundaryHandler::addObject().
|
pure virtual |
Adds object's id_ to given ostream NB: purely virtual function, overriding the version of BaseObject.
Adds the object's id_ to the given ostream
[in] | os | ostream the id_ is added to |
Implements BaseObject.
Implemented in PeriodicBoundary, InsertionBoundary, AngledPeriodicBoundary, HopperInsertionBoundary, CircularPeriodicBoundary, DeletionBoundary, CubeInsertionBoundary, ChuteInsertionBoundary, MaserBoundary, LeesEdwardsBoundary, and ShearBoxBoundary.
Definition at line 76 of file BaseBoundary.cc.
References BaseObject::write().
Referenced by LeesEdwardsBoundary::write(), ShearBoxBoundary::write(), MaserBoundary::write(), DeletionBoundary::write(), CircularPeriodicBoundary::write(), AngledPeriodicBoundary::write(), InsertionBoundary::write(), and PeriodicBoundary::write().
|
private |
pointer to the boundary's BoundaryHandler
Definition at line 108 of file BaseBoundary.h.
Referenced by BaseBoundary(), getHandler(), and setHandler().