26 #ifndef ShearBoxBoundary_H
27 #define ShearBoxBoundary_H
54 void read(std::istream& is)
override;
59 void write(std::ostream& os)
const override;
64 std::string
getName()
const override;
111 void setVelocity(std::function<
double(
double,
double)>);
#define UNUSED
Definition: GeneralDefine.h:39
Definition: BaseBoundary.h:49
Definition: BaseParticle.h:54
Container to store all BaseParticle.
Definition: ParticleHandler.h:48
Class which creates a boundary with Lees-Edwards type periodic boundary conditions.
Definition: ShearBoxBoundary.h:43
void createPeriodicParticle(BaseParticle *p, ParticleHandler &pH) override
Creates horizontal and vertical periodic copies of given particle, if needed.
Definition: ShearBoxBoundary.cc:255
Mdouble getVerticalDistance(BaseParticle &p, bool &positive)
Returns distance from given particle to the closest vertical wall.
Definition: ShearBoxBoundary.cc:116
std::string getName() const override
Returns the name of the object.
Definition: ShearBoxBoundary.cc:74
Mdouble right_
(signed) Horizontal distance between the left wall and the origin
Definition: ShearBoxBoundary.h:115
void write(std::ostream &os) const override
Writes all boundary properties to a stream.
Definition: ShearBoxBoundary.cc:65
void shiftHorizontalPosition(BaseParticle *p, bool positive)
Applies a horizontal shift to the given particle.
Definition: ShearBoxBoundary.cc:139
ShearBoxBoundary * copy() const override
Creates a copy of the object.
Definition: ShearBoxBoundary.cc:83
Mdouble up_
(signed) Vertical distance between the bottom wall and the origin
Definition: ShearBoxBoundary.h:117
Mdouble getHorizontalDistance(BaseParticle &p, bool &positive)
Returns distance from given particle to the closest horizontal wall.
Definition: ShearBoxBoundary.cc:94
Mdouble down_
(signed) Horizontal distance between the right wall and the origin
Definition: ShearBoxBoundary.h:116
void createVerticalPeriodicParticle(BaseParticle *p, ParticleHandler &pH)
Creates vertical periodic copies of given particle, if needed.
Definition: ShearBoxBoundary.cc:218
void read(std::istream &is) override
Reads all boundary properties from a stream.
Definition: ShearBoxBoundary.cc:53
void set(std::function< double(double, double)> velocity, Mdouble left, Mdouble right, Mdouble down, Mdouble up)
Sets all boundary properties.
Definition: ShearBoxBoundary.cc:39
Mdouble left_
Definition: ShearBoxBoundary.h:114
void createHorizontalPeriodicParticle(BaseParticle *p, ParticleHandler &pH)
Creates horizontal periodic copies of given particle, if needed.
Definition: ShearBoxBoundary.cc:182
void shiftVerticalPosition(BaseParticle *p, bool positive)
Applies a vertical shift to the given particle.
Definition: ShearBoxBoundary.cc:162
std::function< double(double, double)> velocity_
(signed) Vertical distance between the top wall and the origin
Definition: ShearBoxBoundary.h:118
void setVelocity(std::function< double(double, double)>)
Definition: ShearBoxBoundary.cc:280
bool checkBoundaryAfterParticleMoved(BaseParticle *p, ParticleHandler &pH UNUSED)
Checks if particle crossed a boundary wall and if so, applies periodic shift.
Definition: ShearBoxBoundary.cc:266