67 #ifdef DEBUG_CONSTRUCTOR
68 std::cout <<
"ChuteInsertionBoundary::copy() const finished" << std::endl;
97 if (particleToCopy !=
nullptr)
130 Vec3D position, velocity;
180 unsigned int maxFailed;
182 is >> dummy >> maxFailed
216 return "ChuteInsertionBoundary";
double inflowVelocityVariance_
virtual ChuteInsertionBoundary * copy() const
Copy method; creates a copy on the heap.
Mdouble X
the vector components
double radMin_
Minimum and maximum radii of the generated particles.
void setVelocity(const Vec3D &velocity)
set the velocity of the BaseInteractable.
ChuteInsertionBoundary()
Default constructor.
void setMaxFailed(unsigned int maxFailed)
Sets the number of times that the wall may fail to insert a particle.
void setRadius(const Mdouble radius)
Sets the particle's radius_ (and adjusts the mass_ accordingly, based on the particle's species) ...
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)...
void read(std::istream &is)
reads boundary properties from istream
double fixedParticleRadius_
radius of the fixed bottom particles, mean particle velocity in X-direction, and allowed maximum rand...
virtual std::string getName() const
Returns the name of the object.
Vec3D posMin_
The two extremal corners of the cuboidal insertion boundary.
BaseParticle * getParticleToCopy() const
Gets the particle that will be inserted through the insertion boundary.
virtual BaseParticle * generateParticle(RNG &random)
Generates a random particle.
Mdouble getRadius() const
Returns the particle's radius_.
bool isEqual(Mdouble v1, Mdouble v2, double absError)
Compares the difference of two Mdouble with an absolute error, useful in UnitTests.
void setPosition(const Vec3D &position)
Sets the position of this BaseInteractable.
void write(std::ostream &os) const
writes boundary properties to ostream
Used for modeling chute inflow. Inherits from InsertionBoundary.
void read(std::istream &is)
Reads the boundary's id_ and maxFailed_.
Implementation of a 3D vector (by Vitaliy).
void set(BaseParticle *particleToCopy, unsigned int maxFailed, Vec3D posMin, Vec3D posMax, double radMin, double radMax, double fixedParticleRadius, double inflowVelocity, double inflowVelocityVariance)
Sets all boundary properties at once.
void write(std::ostream &os) const
Writes the boundary's id_ and maxFailed_.
MERCURY_DEPRECATED void oldRead(std::istream &is)
deprecated version of CubeInsertionBoundary::read().
Mdouble getRandomNumber(Mdouble min, Mdouble max)
This is a random generating routine can be used for initial positions.
virtual BaseParticle * copy() const
Particle copy method. It calls to copy constructor of this Particle, useful for polymorfism.