38 distance_ = std::numeric_limits<double>::quiet_NaN();
40 logger(
DEBUG,
"DeletionBoundary::DeletionBoundary() finished");
48 logger(
DEBUG,
"DeletionBoundary::~DeletionBoundary() finished");
163 return "DeletionBoundary";
unsigned int getIndex() const
Returns the index of the object in the handler.
Vec3D normal_
outward unit normal vector
void read(std::istream &is)
Reads some boundary properties from an std::istream.
virtual std::string getName() const
Returns the name of the object.
~DeletionBoundary()
destructor
void write(std::ostream &os) const
Writes the boundary properties to an std::ostream.
virtual void removeObject(unsigned const int index)
Removes a BaseParticle from the ParticleHandler.
Logger< MERCURY_LOGLEVEL > logger("MercuryKernel")
bool checkBoundaryAfterParticleMoved(BaseParticle *p, ParticleHandler &pH)
Checks if particle passed the boundary and deletes the particle if so.
void write(std::ostream &os) const =0
Adds object's id_ to given ostream NB: purely virtual function, overriding the version of BaseObject...
Used for removing particles from the problem. Inherits from BaseBoundary.
Mdouble scaleFactor_
This is the factor to rescale the given normal vector to a unit vectors.
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.
DeletionBoundary * copy() const
Copy method; creates copy on the heap and returns a pointer to it.
DeletionBoundary()
default constructor
Mdouble getDistance(const Vec3D &position) const
Returns the shortest distance between the boundary and given position.
MERCURY_DEPRECATED void oldRead(std::istream &is)
Deprecated read method. use DeletionBoundary::read() instead.
Mdouble distance_
The boundary's distance from the origin.
Container to store all BaseParticle.
Implementation of a 3D vector (by Vitaliy).
void move(Mdouble position)
Sets the boundary's distance property to the given one.
void set(const Vec3D &normal, Mdouble distance)
Sets boundary position based on a normal and distance.
void read(std::istream &is)=0
Reads the object's id_ from given istream NB: purely virtual function, overriding the version of Base...