84 return "MaserBoundary";
317 logger(
INFO,
"[MaserBoundary::addParticleToMaser()] New species conversion created");
326 logger(
VERBOSE,
"[MaserBoundary::addParticleToMaser()] Species conversion already present");
Mdouble distanceLeft_
position of left boundary wall, s.t. normal*x=position_left
Vec3D normal_
Normal unit vector of both maser walls. Points in the flowing direction.
BaseParticle * getLargestParticle() const
Gets a pointer to the largest BaseParticle (by interactionRadius) in this ParticleHandler.
unsigned int getId() const
Returns the unique identifier of any particular object.
void addParticleToMaser(BaseParticle *p)
Converts a 'normal' particle into a maser particle.
Logger< MERCURY_LOGLEVEL > logger("MercuryKernel")
Mdouble getDistance(BaseParticle &p)
Returns the distance of the wall to the particle.
bool checkBoundaryAfterParticleMoved(BaseParticle *p, ParticleHandler &pH)
Shifts the particle to its 'periodic' position if it is a maser particle and has crossed either of th...
const ParticleSpecies * getSpecies() const
Returns a pointer to the species of this BaseInteractable.
void write(std::ostream &os) const =0
Adds object's id_ to given ostream NB: purely virtual function, overriding the version of BaseObject...
void setPeriodicFromParticle(BaseParticle *p)
Assigns the pointer to the 'original' particle this one's a periodic copy of.
void setSpecies(const ParticleSpecies *species)
static Mdouble dot(const Vec3D &a, const Vec3D &b)
Calculates the dot product of two Vec3D: .
const Vec3D & getPosition() const
Returns the position of this BaseInteractable.
void write(std::ostream &os) const
writes boundary properties to ostream
Mdouble distanceRight_
position of right boundary wall, s.t. normal*x=position_right
BaseParticle * getPeriodicFromParticle() const
Returns the 'original' particle this one's a periodic copy of.
void shiftPosition(BaseParticle *p)
shifts the particle to its 'periodic' position
std::map< const ParticleSpecies *, const ParticleSpecies * > speciesConversionNormalToMaser_
List of 'normal' particles' species, and their maser counterparts.
virtual void addObject(BaseParticle *P)
Adds a BaseParticle to the ParticleHandler.
std::map< const ParticleSpecies *, const ParticleSpecies * > speciesConversionMaserToNormal_
List of 'maser' particles' species, and their normal counterparts.
void read(std::istream &is)
reads boundary properties from istream
std::enable_if<!std::is_pointer< U >::value, U * >::type copyAndAddObject(const U &object)
Creates a copy of a Object and adds it to the BaseHandler.
BoundaryHandler * getHandler() const
Returns the boundary's BoundaryHandler.
void copyInteractionsForPeriodicParticles(const BaseInteractable &p)
Copies interactions to this BaseInteractable whenever a periodic copy made.
unsigned int getNumberOfObjects() const
Gets the number of Object in this BaseHandler.
SpeciesHandler speciesHandler
A handler to that stores the species type i.e. elastic, linear visco-elastic... et cetera...
void set(Vec3D normal, Mdouble distanceLeft, Mdouble distanceRight)
Sets all boundary properties at once.
Container to store all BaseParticle.
virtual std::string getName() const
Returns the name of the object.
Variation on the PeriodicBoundary with maser-like properties.
bool closestToLeftBoundary_
Dummy variable used when checking the proximity of particles to the boundary walls. TRUE if closest wall is the left boundary wall.
Implementation of a 3D vector (by Vitaliy).
void createPeriodicParticles(BaseParticle *p, ParticleHandler &pH)
Creates periodic particle when the particle is a maser particle and is sufficiently close to one of t...
virtual void move(const Vec3D &move)
Moves this BaseInteractable by adding an amount to the position.
DPMBase * getDPMBase()
Gets the problem that is solved using this handler.
MaserBoundary * copy() const
Creates a copy on the heap.
Mdouble getInteractionRadius() const
Returns the particle's interaction radius, which might be different from radius_ (e.g., when dealing with wet particles)
Vec3D shift_
Direction in which particles are to be shifted when they cross the boundary.
virtual ParticleSpecies * copy() const =0
Creates a deep copy of the object from which it is called.
virtual BaseParticle * copy() const
Particle copy method. It calls to copy constructor of this Particle, useful for polymorfism.
void read(std::istream &is)=0
Reads the object's id_ from given istream NB: purely virtual function, overriding the version of Base...