26 #ifndef LEESEDWARDSBOUNDARY_H
27 #define LEESEDWARDSBOUNDARY_H
52 #ifdef MERCURYDPM_USE_MPI
56 logger(
WARN,
"LeesEdwardsBoundaries are currently not implemented in parallel MercuryDPM");
78 void read(std::istream& is)
override;
83 void write(std::ostream& os)
const override;
88 std::string
getName()
const override;
double Mdouble
Definition: GeneralDefine.h:34
Logger< MERCURYDPM_LOGLEVEL > logger("MercuryKernel")
Definition of different loggers with certain modules. A user can define its own custom logger here.
Definition: BaseBoundary.h:49
Definition: BaseParticle.h:54
Class which creates a boundary with Lees-Edwards type periodic boundary conditions.
Definition: LeesEdwardsBoundary.h:47
Mdouble getVerticalDistance(BaseParticle &p, bool &positive)
Returns distance from given particle to the closest vertical wall.
Definition: LeesEdwardsBoundary.cc:142
void setVelocity(std::function< Mdouble(Mdouble)>)
Definition: LeesEdwardsBoundary.cc:341
Mdouble down_
(signed) Horizontal distance between the right wall and the origin
Definition: LeesEdwardsBoundary.h:153
LeesEdwardsBoundary * copy() const override
Creates a copy of the object.
Definition: LeesEdwardsBoundary.cc:109
void set(std::function< Mdouble(Mdouble)> shift, std::function< Mdouble(Mdouble)> velocity, Mdouble left, Mdouble right, Mdouble down, Mdouble up)
Sets all boundary properties.
Definition: LeesEdwardsBoundary.cc:50
std::string getName() const override
Returns the name of the object.
Definition: LeesEdwardsBoundary.cc:100
Mdouble left_
Definition: LeesEdwardsBoundary.h:151
void write(std::ostream &os) const override
Writes all boundary properties to a stream.
Definition: LeesEdwardsBoundary.cc:89
Mdouble right_
(signed) Horizontal distance between the left wall and the origin
Definition: LeesEdwardsBoundary.h:152
Mdouble getHorizontalDistance(BaseParticle &p, bool &positive)
Returns distance from given particle to the closest horizontal wall.
Definition: LeesEdwardsBoundary.cc:120
void checkBoundaryAfterParticlesMove(ParticleHandler &pH) override
Checks if particles need to be adjusted after their position has been updated.
Definition: LeesEdwardsBoundary.cc:315
void checkBoundaryAfterParticleMoved(BaseParticle *p)
Checks if particle crossed a boundary wall and if so, applies periodic shift.
Definition: LeesEdwardsBoundary.cc:302
void read(std::istream &is) override
Reads all boundary properties from a stream.
Definition: LeesEdwardsBoundary.cc:74
LeesEdwardsBoundary()
Definition: LeesEdwardsBoundary.h:50
void shiftHorizontalPosition(BaseParticle *p, bool positive)
Applies a horizontal shift to the given particle.
Definition: LeesEdwardsBoundary.cc:165
void createVerticalPeriodicParticle(BaseParticle *p, ParticleHandler &pH)
Creates vertical periodic copies of given particle, if needed.
Definition: LeesEdwardsBoundary.cc:245
Mdouble up_
(signed) Vertical distance between the bottom wall and the origin
Definition: LeesEdwardsBoundary.h:154
void shiftVerticalPosition(BaseParticle *p, bool positive)
Applies a vertical shift to the given particle.
Definition: LeesEdwardsBoundary.cc:184
Mdouble getCurrentShift()
Definition: LeesEdwardsBoundary.cc:324
void createPeriodicParticle(BaseParticle *p, ParticleHandler &pH) override
Definition: LeesEdwardsBoundary.cc:282
void setShift(std::function< Mdouble(Mdouble)>)
Definition: LeesEdwardsBoundary.cc:336
void createHorizontalPeriodicParticle(BaseParticle *p, ParticleHandler &pH)
Creates horizontal periodic copies of given particle, if needed.
Definition: LeesEdwardsBoundary.cc:207
std::function< Mdouble(Mdouble)> velocity_
Definition: LeesEdwardsBoundary.h:156
std::function< Mdouble(Mdouble)> shift_
(signed) Vertical distance between the top wall and the origin
Definition: LeesEdwardsBoundary.h:155
void updateBoundaries(Mdouble left, Mdouble right, Mdouble down, Mdouble up)
Definition: LeesEdwardsBoundary.cc:61
Mdouble getCurrentVelocity()
Definition: LeesEdwardsBoundary.cc:330
void createPeriodicParticles(ParticleHandler &pH) override
Creates horizontal and vertical periodic copies of given particle, if needed.
Definition: LeesEdwardsBoundary.cc:288
This class contains all information and functions required for communication between processors.
Definition: MpiContainer.h:130
std::size_t getNumberOfProcessors() const
Get the total number of processors participating in this simulation.
Definition: MpiContainer.cc:104
static MPIContainer & Instance()
fetch the instance to be used for communication
Definition: MpiContainer.h:134
Container to store all BaseParticle.
Definition: ParticleHandler.h:48