26 #ifndef PeriodicBoundary_H
27 #define PeriodicBoundary_H
118 void read(std::istream& is);
124 void oldRead(std::istream& is);
129 void write(std::ostream& os)
const;
134 virtual std::string
getName()
const;
Mdouble getDistance(BaseParticle &p)
Returns the distance of the wall to the particle.
void set(Vec3D normal, Mdouble distanceLeft, Mdouble distanceRight)
Defines a periodic wall.
bool closestToLeftBoundary_
true if closest wall is the left wall
void shiftPosition(BaseParticle *p)
shifts the particle
MERCURY_DEPRECATED void oldRead(std::istream &is)
deprecated version of CubeInsertionBoundary::read().
Mdouble scaleFactor_
This is the normal to rescale the normal vector to a unit vectors.
void createPeriodicParticles(BaseParticle *p, ParticleHandler &pH)
Checks distance of particle to closest wall and creates periodic copy if necessary.
void moveRight(Mdouble distanceRight)
Sets the distance from the origin of the 'right' periodic wall.
void write(std::ostream &os) const
writes boundary properties to ostream
Mdouble distanceRight_
position of right wall, s.t. normal*x=position_right
PeriodicBoundary()
default constructor
Vec3D normal_
outward unit normal vector for right wall
#define MERCURY_DEPRECATED
~PeriodicBoundary()
destructor
Defines a pair of periodic walls. Inherits from BaseBoundary.
bool checkBoundaryAfterParticleMoved(BaseParticle *p, ParticleHandler &pH UNUSED)
Checks if particle has crossed either boundary wall, and applies a shift if that is the case...
void read(std::istream &is)
reads boundary properties from istream
void moveLeft(Mdouble distanceLeft)
Sets the distance from the origin of the 'left' periodic wall.
bool isClosestToLeftBoundary() const
Returns TRUE if last particle/position checked is closest to the 'left' wall, and FALSE if it is clos...
Mdouble distanceLeft_
position of left wall, s.t. normal*x=position_left
Container to store all BaseParticle.
Vec3D shift_
shift from left to right boundary
void shiftPositions(Vec3D &postition1, Vec3D &postion2)
shifts two positions
PeriodicBoundary * copy() const
copy method
Implementation of a 3D vector (by Vitaliy).
virtual std::string getName() const
Returns the name of the object.