MercuryDPM
Alpha
|
used to create a circular periodic boundary More...
#include <CircularPeriodicBoundary.h>
Public Member Functions | |
CircularPeriodicBoundary () | |
default constructor More... | |
CircularPeriodicBoundary (double innerRadius) | |
Constructor. More... | |
~CircularPeriodicBoundary () | |
destructor More... | |
CircularPeriodicBoundary * | copy () const |
Used to create a copy of the object NB: purely virtual function. More... | |
void | rotateParticle (BaseParticle *P, double angle) |
void | createPeriodicParticles (BaseParticle *P, ParticleHandler &pH) |
bool | checkBoundaryAfterParticleMoved (BaseParticle *P, ParticleHandler &pH) |
void | read (std::istream &is) |
reads the CircularPeriodicBoundary More... | |
void | oldRead (std::istream &is) |
void | write (std::ostream &os) const |
outputs the CircularPeriodicBoundary More... | |
virtual std::string | getName () const |
Returns the name of the object. 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 | |
double | innerRadius_ |
used to create a circular periodic boundary
Definition at line 38 of file CircularPeriodicBoundary.h.
CircularPeriodicBoundary::CircularPeriodicBoundary | ( | ) |
default constructor
Definition at line 30 of file CircularPeriodicBoundary.cc.
References innerRadius_.
Referenced by copy().
CircularPeriodicBoundary::CircularPeriodicBoundary | ( | double | innerRadius | ) |
Constructor.
Definition at line 39 of file CircularPeriodicBoundary.cc.
References innerRadius_.
CircularPeriodicBoundary::~CircularPeriodicBoundary | ( | ) |
destructor
Definition at line 48 of file CircularPeriodicBoundary.cc.
bool CircularPeriodicBoundary::checkBoundaryAfterParticleMoved | ( | BaseParticle * | P, |
ParticleHandler & | pH | ||
) |
Definition at line 122 of file CircularPeriodicBoundary.cc.
References ParticleHandler::addObject(), BaseParticle::copy(), BaseParticle::getDisplacement(), BaseObject::getIndex(), BaseInteractable::getPosition(), innerRadius_, mathsFunc::log(), constants::pi, R, ParticleHandler::removeObject(), rotateParticle(), BaseParticle::setDisplacement(), Vec3D::X, and Vec3D::Y.
|
virtual |
Used to create a copy of the object NB: purely virtual function.
Implements BaseBoundary.
Definition at line 55 of file CircularPeriodicBoundary.cc.
References CircularPeriodicBoundary().
void CircularPeriodicBoundary::createPeriodicParticles | ( | BaseParticle * | P, |
ParticleHandler & | pH | ||
) |
[in] |
Definition at line 77 of file CircularPeriodicBoundary.cc.
References ParticleHandler::addObject(), BaseParticle::copy(), mathsFunc::cos(), BaseParticle::getInteractionRadius(), ParticleHandler::getLargestParticle(), BaseParticle::getPeriodicFromParticle(), BaseInteractable::getPosition(), innerRadius_, mathsFunc::log(), constants::pi, R, rotateParticle(), BaseParticle::setPeriodicFromParticle(), Vec3D::X, and Vec3D::Y.
|
virtual |
Returns the name of the object.
Implements BaseObject.
Definition at line 213 of file CircularPeriodicBoundary.cc.
void CircularPeriodicBoundary::oldRead | ( | std::istream & | is | ) |
|
virtual |
reads the CircularPeriodicBoundary
Implements BaseBoundary.
Definition at line 194 of file CircularPeriodicBoundary.cc.
References innerRadius_, and BaseBoundary::read().
void CircularPeriodicBoundary::rotateParticle | ( | BaseParticle * | P, |
double | angle | ||
) |
[in] |
todo{Do we need to update rotations and rotational velocitys?}
Definition at line 63 of file CircularPeriodicBoundary.cc.
References mathsFunc::cos(), BaseInteractable::getPosition(), BaseInteractable::getVelocity(), R, BaseInteractable::setPosition(), BaseInteractable::setVelocity(), mathsFunc::sin(), Vec3D::X, Vec3D::Y, and Vec3D::Z.
Referenced by checkBoundaryAfterParticleMoved(), and createPeriodicParticles().
|
virtual |
outputs the CircularPeriodicBoundary
Implements BaseBoundary.
Definition at line 207 of file CircularPeriodicBoundary.cc.
References innerRadius_, and BaseBoundary::write().
|
private |
Definition at line 104 of file CircularPeriodicBoundary.h.
Referenced by checkBoundaryAfterParticleMoved(), CircularPeriodicBoundary(), createPeriodicParticles(), oldRead(), read(), and write().