34 #ifdef DEBUG_CONSTRUCTOR
35 std::cout <<
"CircularPeriodicBoundary::CircularPeriodicBoundary() finished" << std::endl;
43 #ifdef DEBUG_CONSTRUCTOR
44 std::cout <<
"CircularPeriodicBoundary::CircularPeriodicBoundary(double innerRadius) finished" << std::endl;
50 #ifdef DEBUG_DESTRUCTOR
51 std::cerr <<
"CircularPeriodicBoundary::~CircularPeriodicBoundary() finished" << std::endl;
57 #ifdef DEBUG_CONSTRUCTOR
58 std::cerr <<
"CircularPeriodicBoundary::copy() const finished" << std::endl;
133 if (i > 0 && i > oldI)
136 if (alpha < 0 || alpha > pieSize)
138 if (alpha > 2.0 * pieSize)
154 else if (i >= 0 && i < oldI)
166 else if (alpha < 0.5 * pieSize)
170 else if (alpha < pieSize)
181 else if (i > 0 && alpha < 0)
186 else if (i > 0 && alpha > pieSize)
215 return "CircularPeriodicBoundary";
virtual std::string getName() const
Returns the name of the object.
void oldRead(std::istream &is)
BaseParticle * getLargestParticle() const
Gets a pointer to the largest BaseParticle (by interactionRadius) in this ParticleHandler.
unsigned int getIndex() const
Returns the index of the object in the handler.
void write(std::ostream &os) const
outputs the CircularPeriodicBoundary
Mdouble X
the vector components
CircularPeriodicBoundary * copy() const
Used to create a copy of the object NB: purely virtual function.
void setVelocity(const Vec3D &velocity)
set the velocity of the BaseInteractable.
virtual void removeObject(unsigned const int index)
Removes a BaseParticle from the ParticleHandler.
CircularPeriodicBoundary()
default constructor
void setDisplacement(const Vec3D &disp)
Sets the particle's displacement (= difference between current position and that of the previous time...
void write(std::ostream &os) const =0
Adds object's id_ to given ostream NB: purely virtual function, overriding the version of BaseObject...
void setPeriodicFromParticle(BaseParticle *p)
Assigns the pointer to the 'original' particle this one's a periodic copy of.
Mdouble log(Mdouble Power)
const Vec3D & getPosition() const
Returns the position of this BaseInteractable.
used to create a circular periodic boundary
void createPeriodicParticles(BaseParticle *P, ParticleHandler &pH)
BaseParticle * getPeriodicFromParticle() const
Returns the 'original' particle this one's a periodic copy of.
void rotateParticle(BaseParticle *P, double angle)
const Vec3D & getDisplacement() const
Returns the particle's displacement relative to the previous time step.
~CircularPeriodicBoundary()
destructor
virtual void addObject(BaseParticle *P)
Adds a BaseParticle to the ParticleHandler.
Container to store all BaseParticle.
void read(std::istream &is)
reads the CircularPeriodicBoundary
void setPosition(const Vec3D &position)
Sets the position of this BaseInteractable.
virtual const Vec3D & getVelocity() const
Returns the velocity of this interactable.
Implementation of a 3D vector (by Vitaliy).
Mdouble getInteractionRadius() const
Returns the particle's interaction radius, which might be different from radius_ (e.g., when dealing with wet particles)
virtual BaseParticle * copy() const
Particle copy method. It calls to copy constructor of this Particle, useful for polymorfism.
void read(std::istream &is)=0
Reads the object's id_ from given istream NB: purely virtual function, overriding the version of Base...
bool checkBoundaryAfterParticleMoved(BaseParticle *P, ParticleHandler &pH)