26 #ifndef LEESEDWARDSBOUNDARY_H
27 #define LEESEDWARDSBOUNDARY_H
54 void read(std::istream& is);
59 void write(std::ostream& os)
const;
64 virtual std::string
getName()
const;
115 void setShift(std::function<
double (
double)>);
std::function< double(double)> shift_
(signed) Vertical distance between the top wall and the origin
void setShift(std::function< double(double)>)
void set(std::function< double(double)> shift, std::function< double(double)> velocity, Mdouble left, Mdouble right, Mdouble down, Mdouble up)
Sets all boundary properties.
Class which creates a boundary with Lees-Edwards type periodic boundary conditions.
std::function< double(double)> velocity_
void setVelocity(std::function< double(double)>)
void createPeriodicParticles(BaseParticle *p, ParticleHandler &pH)
Creates horizontal and vertical periodic copies of given particle, if needed.
Mdouble getCurrentShift()
void createHorizontalPeriodicParticles(BaseParticle *p, ParticleHandler &pH)
Creates horizontal periodic copies of given particle, if needed.
virtual std::string getName() const
Returns the name of the object.
void shiftVerticalPosition(BaseParticle *p, bool positive)
Applies a vertical shift to the given particle.
Mdouble up_
(signed) Vertical distance between the bottom wall and the origin
Mdouble getCurrentVelocity()
void createVerticalPeriodicParticles(BaseParticle *p, ParticleHandler &pH)
Creates vertical periodic copies of given particle, if needed.
Mdouble down_
(signed) Horizontal distance between the right wall and the origin
void write(std::ostream &os) const
Writes all boundary properties to a stream.
Container to store all BaseParticle.
void shiftHorizontalPosition(BaseParticle *p, bool positive)
Applies a horizontal shift to the given particle.
bool checkBoundaryAfterParticleMoved(BaseParticle *p, ParticleHandler &pH UNUSED)
Checks if particle crossed a boundary wall and if so, applies periodic shift.
LeesEdwardsBoundary * copy() const
Creates a copy of the object.
Mdouble right_
(signed) Horizontal distance between the left wall and the origin
void read(std::istream &is)
Reads all boundary properties from a stream.
Mdouble getHorizontalDistance(BaseParticle &p, bool &positive)
Returns distance from given particle to the closest horizontal wall.
Mdouble getVerticalDistance(BaseParticle &p, bool &positive)
Returns distance from given particle to the closest vertical wall.