BaseParticle * getLargestParticle() const
Gets a pointer to the largest BaseParticle (by interactionRadius) in this ParticleHandler.
void reverseTangentialSprings()
Mdouble get_InteractionRadius() const
BaseParticle * get_PeriodicFromParticle() const
void set(Vec3D normal_, Mdouble position_left_, Mdouble position_right_, Vec3D shift_direction)
For general parallelogramic domains, the direction of the shift vector has to be set manually...
Defines a pair of periodic walls. The particles are in {x: position_left<=normal*x
void set_periodicFromParticle(BaseParticle *_new)
void read(std::istream &is)
reads wall
void print(std::ostream &os) const
outputs wall
void shift_positions(Vec3D &PI, Vec3D &PJ)
shifts two particles
Vec3D normal
outward unit normal vector for right wall
Mdouble distance(BaseParticle &P)
Returns the distance of the wall to the particle, and sets left_wall = true, if the left wall is the ...
Vec3D get_shifted_position(Vec3D &Position)
returns the shifted particle w/o actually shifting
virtual PeriodicBoundary * copy() const
BaseBoundary copy method.
virtual void addObject(BaseParticle *P)
Adds a BaseParticle to the ParticleHandler.
Mdouble distance(const Vec3D &P)
void move(const Vec3D &_new)
void shift_position(BaseParticle *F0)
shifts the particle (after distance set the left_wall value)
const Vec3D & get_Position() const
Container to store all BaseParticle.
Mdouble factor
This is the normal to rescale to unit vectoers.
void set(Vec3D normal_, Mdouble position_left_, Mdouble position_right_)
Defines a periodic wall, given a normal vector s.t.
Mdouble position_right
position of right wall, s.t. normal*x=position_right
void move_left(Mdouble position_)
Allows the left periodic wall to be moved to a new position and automatically changes its shift value...
Implementation of a 3D vector (by Vitaliy).
void get_close_together(Vec3D &P, Vec3D &Q)
shift P such that it is closest to Q
Vec3D shift
shift from left to right boundary
int createPeriodicParticles(BaseParticle *P, ParticleHandler &pH)
virtual BaseParticle * copy() const
Particle copy method. It calls to copy contrustor of this Particle, usefull for polymorfism.