26 #ifndef BOUNDARIES_INSERTIONBOUNDARY_H
27 #define BOUNDARIES_INSERTIONBOUNDARY_H
106 void read(std::istream& is);
111 void write(std::ostream& os)
const;
virtual void checkBoundaryBeforeTimeStep(DPMBase *md)
Fills the boundary with particles.
The DPMBase header includes quite a few header files, defining all the handlers, which are essential...
InsertionBoundary()
Default constructor: set everything to 0/nullptr.
unsigned int getMaxFailed() const
Gets the number of times that the boundary may fail to insert a particle.
BaseParticle * particleToCopy_
Particle that will be inserted through the insertion boundary.
void setMaxFailed(unsigned int maxFailed)
Sets the number of times that the wall may fail to insert a particle.
unsigned int maxFailed_
Number of times that the wall may fail to insert a particle.
Boundary structure for boundaries used for insertion of particles.
void setParticleToCopy(BaseParticle *particleToCopy)
Sets the particle that will be inserted through the insertion boundary.
This is a class that generates random numbers i.e. named the Random Number Generator (RNG)...
unsigned int getNumberOfParticlesInserted() const
Gets the number of particles inserted by the boundary.
BaseParticle * getParticleToCopy() const
Gets the particle that will be inserted through the insertion boundary.
void set(BaseParticle *particleToCopy, unsigned int maxFailed)
Sets the particle that will be inserted and the maximum number of times for which insertion may fail...
virtual BaseParticle * generateParticle(RNG &random)=0
Purely virtual function that generates one particle.
virtual ~InsertionBoundary()
Destructor: delete the particle that has to be copied at every insertion.
unsigned int numberOfParticlesInserted_
Number of particles that are already inserted.
void read(std::istream &is)
Reads the boundary's id_ and maxFailed_.
void write(std::ostream &os) const
Writes the boundary's id_ and maxFailed_.