MercuryDPM  Trunk
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
DeletionBoundary Class Reference

Used for removing particles from the problem. Inherits from BaseBoundary. By default, a plane that deletes everything past it, but there are derived classes such as CubeDeletionBoundary. More...

#include <DeletionBoundary.h>

+ Inheritance diagram for DeletionBoundary:

Public Member Functions

 DeletionBoundary ()
 default constructor More...
 
 DeletionBoundary (DeletionBoundary const &d)
 default copy constructor More...
 
 ~DeletionBoundary () override
 destructor More...
 
DeletionBoundarycopy () const override
 Copy method; creates copy on the heap and returns a pointer to it. More...
 
virtual void set (const Vec3D &normal, Mdouble distance)
 Sets boundary position based on a normal and distance. More...
 
void move (Mdouble position)
 Sets the boundary's distance property to the given one. More...
 
virtual Mdouble getDistance (const Vec3D &position) const
 Returns a negative value if and only if the particle is inside the boundary (and therefore to be deleted). More...
 
bool checkBoundaryAfterParticleMoved (BaseParticle *p, ParticleHandler &pH)
 Checks if particle is inside the boundary, and deletes the particle if so. More...
 
void checkBoundaryAfterParticlesMove (ParticleHandler &pH) override
 
unsigned int getNumberOfParticlesDeleted () const
 Gets the number of particles deleted by the boundary. More...
 
double getMassOfParticlesDeleted () const
 
double getVolumeOfParticlesDeleted () const
 
void reset ()
 
void activate ()
 Turns on the DeletionBoundary. More...
 
void deactivate ()
 Turns off the DeletionBoundary. More...
 
void trackOutflow (bool trackOutflow=true)
 Turns on the outflow tracker. More...
 
void read (std::istream &is) override
 Reads some boundary properties from an std::istream. More...
 
MERCURY_DEPRECATED void oldRead (std::istream &is)
 Deprecated read method. use DeletionBoundary::read() instead. More...
 
void write (std::ostream &os) const override
 Writes the boundary properties to an std::ostream. More...
 
std::string getName () const override
 Returns the name of the object. More...
 
- Public Member Functions inherited from BaseBoundary
 BaseBoundary ()
 default constructor. More...
 
 BaseBoundary (const BaseBoundary &b)
 copy constructor More...
 
 ~BaseBoundary () override
 destructor More...
 
virtual void createPeriodicParticle (BaseParticle *p UNUSED, ParticleHandler &pH UNUSED)
 Creates a periodic particle in case of periodic boundaries in serial build. More...
 
virtual void createPeriodicParticles (ParticleHandler &pH UNUSED)
 Creates periodic copies of given particle in case of periodic boundaries. More...
 
virtual void checkBoundaryBeforeTimeStep (DPMBase *md)
 Virtual function that does things before each time step. More...
 
virtual void actionsBeforeTimeLoop ()
 Virtual function that does something after DPMBase::setupInitialConditions but before the first time step. More...
 
virtual void modifyGhostAfterCreation (BaseParticle *particle, int i)
 
virtual void writeVTK (std::fstream &file)
 
void setHandler (BoundaryHandler *handler)
 Sets the boundary's BoundaryHandler. More...
 
BoundaryHandlergetHandler () const
 Returns the boundary's BoundaryHandler. More...
 
- Public Member Functions inherited from BaseObject
 BaseObject ()=default
 Default constructor. More...
 
 BaseObject (const BaseObject &p)=default
 Copy constructor, copies all the objects BaseObject contains. More...
 
virtual ~BaseObject ()=default
 virtual destructor More...
 
virtual void moveInHandler (unsigned int index)
 Except that it is virtual, it does the same thing as setIndex() does. More...
 
void setIndex (unsigned int index)
 Allows one to assign an index to an object in the handler/container. More...
 
void setId (unsigned long id)
 Assigns a unique identifier to each object in the handler (container) which remains constant even after the object is deleted from the container/handler. More...
 
unsigned int getIndex () const
 Returns the index of the object in the handler. More...
 
unsigned int getId () const
 Returns the unique identifier of any particular object. More...
 
void setGroupId (unsigned groupId)
 
unsigned getGroupId () const
 

Private Attributes

Vec3D normal_
 outward unit normal vector More...
 
Mdouble scaleFactor_
 This is the factor to rescale the given normal vector to a unit vectors. More...
 
Mdouble distance_
 The boundary's distance from the origin. More...
 
unsigned int numberOfParticlesDeleted_
 Number of particles that have been deleted by this boundary. More...
 
double massDeleted_
 
double trackMassDeleted_
 
double volumeDeleted_
 
bool isActivated_
 The DeletionBoundary is activated by default. If the DeletionBoundary is deactivated, then it deletes no particles. More...
 
bool trackOutflow_
 
std::ofstream tracker
 

Detailed Description

Used for removing particles from the problem. Inherits from BaseBoundary. By default, a plane that deletes everything past it, but there are derived classes such as CubeDeletionBoundary.

Definition at line 43 of file DeletionBoundary.h.

Constructor & Destructor Documentation

DeletionBoundary::DeletionBoundary ( )

default constructor

Default constructor (calls the parent-constructor of BaseBoundary as well)

Definition at line 39 of file DeletionBoundary.cc.

References DEBUG, distance_, isActivated_, logger, massDeleted_, numberOfParticlesDeleted_, scaleFactor_, trackOutflow_, and volumeDeleted_.

Referenced by copy().

40  : BaseBoundary()
41 {
42  distance_ = std::numeric_limits<double>::quiet_NaN();
43  scaleFactor_ = std::numeric_limits<double>::quiet_NaN();
44  isActivated_ = true;
45  trackOutflow_ = false;
47  massDeleted_ = 0;
48  volumeDeleted_ = 0;
49 
50  logger(DEBUG, "DeletionBoundary::DeletionBoundary() finished");
51 }
Logger< MERCURY_LOGLEVEL > logger("MercuryKernel")
Mdouble scaleFactor_
This is the factor to rescale the given normal vector to a unit vectors.
Mdouble distance_
The boundary's distance from the origin.
bool isActivated_
The DeletionBoundary is activated by default. If the DeletionBoundary is deactivated, then it deletes no particles.
unsigned int numberOfParticlesDeleted_
Number of particles that have been deleted by this boundary.
BaseBoundary()
default constructor.
Definition: BaseBoundary.cc:32
DeletionBoundary::DeletionBoundary ( DeletionBoundary const &  d)
inline

default copy constructor

Definition at line 54 of file DeletionBoundary.h.

55  : normal_(d.normal_), scaleFactor_(d.scaleFactor_), distance_(d.distance_),
56  numberOfParticlesDeleted_(d.numberOfParticlesDeleted_), massDeleted_(d.massDeleted_),
57  volumeDeleted_(d.volumeDeleted_), isActivated_(d.isActivated_), trackOutflow_(d.trackOutflow_) {}
Vec3D normal_
outward unit normal vector
Mdouble scaleFactor_
This is the factor to rescale the given normal vector to a unit vectors.
Mdouble distance_
The boundary's distance from the origin.
bool isActivated_
The DeletionBoundary is activated by default. If the DeletionBoundary is deactivated, then it deletes no particles.
unsigned int numberOfParticlesDeleted_
Number of particles that have been deleted by this boundary.
DeletionBoundary::~DeletionBoundary ( )
override

destructor

Destructor

Definition at line 56 of file DeletionBoundary.cc.

References DEBUG, and logger.

57 {
58  logger(DEBUG, "DeletionBoundary::~DeletionBoundary() finished");
59 }
Logger< MERCURY_LOGLEVEL > logger("MercuryKernel")

Member Function Documentation

void DeletionBoundary::activate ( )

Turns on the DeletionBoundary.

Definition at line 300 of file DeletionBoundary.cc.

References isActivated_.

301 {
302  isActivated_ = true;
303 }
bool isActivated_
The DeletionBoundary is activated by default. If the DeletionBoundary is deactivated, then it deletes no particles.
bool DeletionBoundary::checkBoundaryAfterParticleMoved ( BaseParticle p,
ParticleHandler pH 
)

Checks if particle is inside the boundary, and deletes the particle if so.

Todo:
: MX: update the above comment

Checks if particle has passed the boundary, and if so, deletes the particle.

Parameters
[in]ppointer to the particle which is to be checked
[out]pHthe particle's ParticleHandler, from which the particle is removed in case it has passed the boundary.
Returns
TRUE if the particle has actually passed the boundary and is thus deleted.
Todo:
JMFT: The mass and volume counters need to be updated in the MPI code.

Definition at line 123 of file DeletionBoundary.cc.

References ParticleHandler::computeLargestParticle(), ParticleHandler::computeSmallestParticle(), BaseInteractable::getAngularVelocity(), getDistance(), BaseHandler< T >::getDPMBase(), BaseBoundary::getHandler(), BaseObject::getId(), BaseObject::getIndex(), BaseInteractable::getIndSpecies(), BaseParticle::getMass(), BaseInteractable::getPosition(), BaseParticle::getRadius(), BaseInteractable::getVelocity(), BaseParticle::getVolume(), INFO, BaseParticle::isInMPIDomain(), logger, massDeleted_, NUMBER_OF_PROCESSORS, numberOfParticlesDeleted_, PROCESSOR_ID, ParticleHandler::removeGhostObject(), ParticleHandler::removeObject(), helpers::to_string(), tracker, trackMassDeleted_, trackOutflow_, volumeDeleted_, Vec3D::X, Vec3D::Y, and Vec3D::Z.

Referenced by checkBoundaryAfterParticlesMove().

124 {
125  if (getDistance(p->getPosition()) < 0)
126  {
127  if (trackOutflow_) {
128  auto dpm = getHandler()->getDPMBase();
129  trackMassDeleted_ += p->getMass();
130  if (!tracker.is_open()) {
131  std::string name = dpm->getName()
134  logger(INFO,"Open file %",name);
135  tracker.open(name);
136  tracker << std::setw(13) << "Time "
137  << std::setw(8) << "Species "
138  << std::setw(8) << "ID "
139  << std::setw(13) << "Position_x "
140  << std::setw(13) << "Position_y "
141  << std::setw(13) << "Position_z "
142  << std::setw(13) << "Velocity_x "
143  << std::setw(13) << "Velocity_y "
144  << std::setw(13) << "Velocity_z "
145  << std::setw(13) << "Radius "
146  << std::setw(13) << "AnVelocity_x "
147  << std::setw(13) << "AnVelocity_y "
148  << std::setw(13) << "AnVelocity_z "
149  << std::setw(13) << "Mass "
150  << std::setw(13) << "TotalMass"
151  << '\n';
152  }
153  tracker << std::setw(12) << dpm->getTime() << ' '
154  << std::setw(8) << p->getIndSpecies() << ' '
155  << std::setw(8) << p->getId() << ' '
156  << std::setw(12) << p->getPosition().X << ' '
157  << std::setw(12) << p->getPosition().Y << ' '
158  << std::setw(12) << p->getPosition().Z << ' '
159  << std::setw(12) << p->getVelocity().X << ' '
160  << std::setw(12) << p->getVelocity().Y << ' '
161  << std::setw(12) << p->getVelocity().Z << ' '
162  << std::setw(12) << p->getRadius() << ' '
163  << std::setw(12) << p->getAngularVelocity().X << ' '
164  << std::setw(12) << p->getAngularVelocity().Y << ' '
165  << std::setw(12) << p->getAngularVelocity().Z << ' '
166  << std::setw(12) << p->getMass() << ' '
167  << std::setw(12) << trackMassDeleted_ << '\n';
168  }
169 
170  #ifdef MERCURY_USE_MPI
171  //Check if the particle is in the mpi communication zone
172  if(p->isInMPIDomain())
173  {
174  //Add the particle to a list so we can flush it later on
175  //The particles are not deleted yet. This is done in dpmBase after this function is called
176  particlesToBeDeleted_.insert(p);
177  return false;
178  }
179  else
180  {
181  pH.removeGhostObject(p->getIndex());
182  return true;
183  }
184  #else
186  massDeleted_ += p->getMass();
187  volumeDeleted_ += p->getVolume();
188  pH.removeObject(p->getIndex());
191  return true;
192  #endif
193  }
194  else
195  {
196  return false;
197  }
198 }
unsigned int getId() const
Returns the unique identifier of any particular object.
Definition: BaseObject.h:125
unsigned int getIndex() const
Returns the index of the object in the handler.
Definition: BaseObject.h:118
const Vec3D & getPosition() const
Returns the position of this BaseInteractable.
Mdouble X
the vector components
Definition: Vector.h:65
void removeObject(unsigned int index) override
Removes a BaseParticle from the ParticleHandler.
virtual Mdouble getVolume() const
Get Particle volume function, which required a reference to the Species vector. It returns the volume...
Logger< MERCURY_LOGLEVEL > logger("MercuryKernel")
virtual const Vec3D & getAngularVelocity() const
Returns the angular velocity of this interactable.
std::ofstream tracker
bool isInMPIDomain()
Indicates if the particle is in the communication zone of the mpi domain.
Mdouble getMass() const
Returns the particle's mass.
Definition: BaseParticle.h:322
virtual Mdouble getDistance(const Vec3D &position) const
Returns a negative value if and only if the particle is inside the boundary (and therefore to be dele...
#define PROCESSOR_ID
Definition: GeneralDefine.h:63
BoundaryHandler * getHandler() const
Returns the boundary's BoundaryHandler.
Mdouble getRadius() const
Returns the particle's radius.
Definition: BaseParticle.h:345
void removeGhostObject(unsigned int index)
Removes a BaseParticle from the ParticleHandler without a global check, this is only to be done for m...
#define NUMBER_OF_PROCESSORS
For the MPI communication routines this quantity is often required. defining this macro makes the cod...
Definition: GeneralDefine.h:62
Mdouble Y
Definition: Vector.h:65
std::string to_string(const T &n)
Definition: Helpers.h:227
void computeSmallestParticle()
Computes the smallest particle (by interaction radius) and sets it in smallestParticle_.
void computeLargestParticle()
Computes the largest particle (by interaction radius) and sets it in largestParticle_.
unsigned int getIndSpecies() const
Returns the index of the species associated with the interactable object.
virtual const Vec3D & getVelocity() const
Returns the velocity of this interactable.
DPMBase * getDPMBase()
Gets the problem that is solved using this handler.
Definition: BaseHandler.h:725
unsigned int numberOfParticlesDeleted_
Number of particles that have been deleted by this boundary.
Mdouble Z
Definition: Vector.h:65
void DeletionBoundary::checkBoundaryAfterParticlesMove ( ParticleHandler pH)
overridevirtual
Todo:
MX: I changed the syntax to a more mpi compatible (and neater) code. Need to update the comments of the checkBoundaryAfterParticleMoved function

Reimplemented from BaseBoundary.

Definition at line 200 of file DeletionBoundary.cc.

References checkBoundaryAfterParticleMoved(), BaseHandler< T >::getObject(), BaseHandler< T >::getSize(), constants::i, and isActivated_.

201 {
202  if (!isActivated_)
203  return;
204 
205 #ifdef MERCURY_USE_MPI
206  particlesToBeDeleted_.clear();
207 #endif
208  for (unsigned int i = 0; i < pH.getSize(); i++)
209  {
210  //If the particle is deleted, change the iterator
212  {
213  i--;
214  }
215  }
216 }
unsigned int getSize() const
Gets the size of the particleHandler (including mpi and periodic particles)
Definition: BaseHandler.h:655
bool checkBoundaryAfterParticleMoved(BaseParticle *p, ParticleHandler &pH)
Checks if particle is inside the boundary, and deletes the particle if so.
const std::complex< Mdouble > i
Definition: ExtendedMath.h:50
T * getObject(const unsigned int id)
Gets a pointer to the Object at the specified index in the BaseHandler.
Definition: BaseHandler.h:613
bool isActivated_
The DeletionBoundary is activated by default. If the DeletionBoundary is deactivated, then it deletes no particles.
DeletionBoundary * DeletionBoundary::copy ( ) const
overridevirtual

Copy method; creates copy on the heap and returns a pointer to it.

Copy function, which creates a copy and returns a pointer to that copy (on the heap)

Returns
pointer to the copy

Implements BaseBoundary.

Definition at line 66 of file DeletionBoundary.cc.

References DeletionBoundary().

67 {
68  return new DeletionBoundary(*this);
69 }
DeletionBoundary()
default constructor
void DeletionBoundary::deactivate ( )

Turns off the DeletionBoundary.

Definition at line 305 of file DeletionBoundary.cc.

References isActivated_.

306 {
307  isActivated_ = false;
308 }
bool isActivated_
The DeletionBoundary is activated by default. If the DeletionBoundary is deactivated, then it deletes no particles.
Mdouble DeletionBoundary::getDistance ( const Vec3D position) const
virtual

Returns a negative value if and only if the particle is inside the boundary (and therefore to be deleted).

The default DeletionBoundary is a half-space (specified by a plane) but the geometry can be overridden (e.g. by CubeDeletionBoundary). Calculates the shortest distance between the wall and given position.

Parameters
[in]positionthe position of which the distance should be calculated.

Reimplemented in CubeDeletionBoundary.

Definition at line 108 of file DeletionBoundary.cc.

References distance_, Vec3D::dot(), and normal_.

Referenced by checkBoundaryAfterParticleMoved().

109 {
110  return distance_ - Vec3D::dot(position, normal_);
111 }
Vec3D normal_
outward unit normal vector
static Mdouble dot(const Vec3D &a, const Vec3D &b)
Calculates the dot product of two Vec3D: .
Definition: Vector.cc:76
Mdouble distance_
The boundary's distance from the origin.
double DeletionBoundary::getMassOfParticlesDeleted ( ) const

Definition at line 218 of file DeletionBoundary.cc.

References massDeleted_.

219 {
220  return massDeleted_;
221 }
std::string DeletionBoundary::getName ( ) const
overridevirtual

Returns the name of the object.

Returns the object's class name (i.e. 'DeletionBoundary').

Returns
the object's class name

Implements BaseObject.

Definition at line 285 of file DeletionBoundary.cc.

286 {
287  return "DeletionBoundary";
288 }
unsigned int DeletionBoundary::getNumberOfParticlesDeleted ( ) const

Gets the number of particles deleted by the boundary.

Returns the number of particles deleted by this boundary. TODO For some reason, this causes a segfault — DO NOT USE. valgrind complains that 'numberOfParticlesDeleted_' is not initialised.

Definition at line 295 of file DeletionBoundary.cc.

References numberOfParticlesDeleted_.

296 {
298 }
unsigned int numberOfParticlesDeleted_
Number of particles that have been deleted by this boundary.
double DeletionBoundary::getVolumeOfParticlesDeleted ( ) const

Definition at line 223 of file DeletionBoundary.cc.

References volumeDeleted_.

224 {
225  return volumeDeleted_;
226 }
void DeletionBoundary::move ( Mdouble  distance)

Sets the boundary's distance property to the given one.

Resets the boundary's 'distance' from the origin to be the one given.

Parameters
[in]distancethe new 'distance' between boundary and origin. see also comments of DeletionBoundary::set().

Definition at line 97 of file DeletionBoundary.cc.

References distance_, and scaleFactor_.

98 {
99  distance_ = distance * scaleFactor_;
100 }
Mdouble scaleFactor_
This is the factor to rescale the given normal vector to a unit vectors.
Mdouble distance_
The boundary's distance from the origin.
void DeletionBoundary::oldRead ( std::istream &  is)

Deprecated read method. use DeletionBoundary::read() instead.

the deprecated version of the read-method. Should not be used by new users!

Deprecated:
Should be gone by Mercury 2.0. Use DeletionBoundary::read() instead.

Definition at line 258 of file DeletionBoundary.cc.

References distance_, normal_, and scaleFactor_.

259 {
260  std::string dummy;
261  is >> dummy >> normal_ >> dummy >> scaleFactor_ >> dummy >> distance_;
262 }
Vec3D normal_
outward unit normal vector
Mdouble scaleFactor_
This is the factor to rescale the given normal vector to a unit vectors.
Mdouble distance_
The boundary's distance from the origin.
void DeletionBoundary::read ( std::istream &  is)
overridevirtual

Reads some boundary properties from an std::istream.

Reads a number of boundary properties from the given std::istream.

Parameters
[in,out]isthe istream

Implements BaseBoundary.

Definition at line 239 of file DeletionBoundary.cc.

References distance_, isActivated_, massDeleted_, normal_, numberOfParticlesDeleted_, BaseBoundary::read(), scaleFactor_, trackOutflow_, and volumeDeleted_.

Referenced by CubeDeletionBoundary::read().

240 {
241  BaseBoundary::read(is);
242  std::string dummy;
243  is >> dummy >> normal_
244  >> dummy >> scaleFactor_
245  >> dummy >> distance_
246  >> dummy >> numberOfParticlesDeleted_
247  >> dummy >> massDeleted_
248  >> dummy >> volumeDeleted_
249  >> dummy >> isActivated_
250  >> dummy >> trackOutflow_;
251 }
Vec3D normal_
outward unit normal vector
Mdouble scaleFactor_
This is the factor to rescale the given normal vector to a unit vectors.
void read(std::istream &is) override=0
Reads the object's id_ from given istream NB: purely virtual function, overriding the version of Base...
Definition: BaseBoundary.cc:61
Mdouble distance_
The boundary's distance from the origin.
bool isActivated_
The DeletionBoundary is activated by default. If the DeletionBoundary is deactivated, then it deletes no particles.
unsigned int numberOfParticlesDeleted_
Number of particles that have been deleted by this boundary.
void DeletionBoundary::reset ( )

Definition at line 228 of file DeletionBoundary.cc.

References massDeleted_, numberOfParticlesDeleted_, and volumeDeleted_.

229 {
231  massDeleted_ = 0;
232  volumeDeleted_ = 0;
233 }
unsigned int numberOfParticlesDeleted_
Number of particles that have been deleted by this boundary.
void DeletionBoundary::set ( const Vec3D normal,
Mdouble  distance 
)
virtual

Sets boundary position based on a normal and distance.

Defines the placing of the (2D) boundary based on the given normal and distance.

Parameters
[in]normalboundary normal vector
[in]distance'distance' between the origin and the boundary, such that the following relation is satisfied:

\[ \mathbf{r} \cdot \mathbf{\hat{n}} = d \]

in which \( \mathbf{\hat{n}} \) and \( d \) are the given normal vector and distance, respectively. NB: If the distance is the ACTUAL distance from the origin, the normal vector must be of UNIT LENGTH for the placing of the boundary to be done correctly.

Definition at line 85 of file DeletionBoundary.cc.

References distance_, Vec3D::dot(), normal_, and scaleFactor_.

86 {
87  scaleFactor_ = 1. / std::sqrt(Vec3D::dot(normal, normal));
88  normal_ = normal * scaleFactor_;
89  distance_ = distance * scaleFactor_;
90 }
Vec3D normal_
outward unit normal vector
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: .
Definition: Vector.cc:76
Mdouble distance_
The boundary's distance from the origin.
void DeletionBoundary::trackOutflow ( bool  trackOutflow = true)
inline

Turns on the outflow tracker.

Definition at line 121 of file DeletionBoundary.h.

References trackOutflow(), and trackOutflow_.

Referenced by trackOutflow().

void trackOutflow(bool trackOutflow=true)
Turns on the outflow tracker.
void DeletionBoundary::write ( std::ostream &  os) const
overridevirtual

Writes the boundary properties to an std::ostream.

Writes the boundary properties to an std::ostream.

Parameters
[out]osthe ostream the properties are to be written to.

Implements BaseBoundary.

Definition at line 268 of file DeletionBoundary.cc.

References distance_, isActivated_, massDeleted_, normal_, numberOfParticlesDeleted_, scaleFactor_, trackOutflow_, volumeDeleted_, and BaseBoundary::write().

Referenced by CubeDeletionBoundary::write().

269 {
271  os << " normal " << normal_
272  << " scaleFactor " << scaleFactor_
273  << " distance " << distance_
274  << " numberOfParticlesDeleted " << numberOfParticlesDeleted_
275  << " massDeleted " << massDeleted_
276  << " volumeDeleted " << volumeDeleted_
277  << " isActivated " << isActivated_
278  << " trackOutflow " << trackOutflow_;
279 }
Vec3D normal_
outward unit normal vector
Mdouble scaleFactor_
This is the factor to rescale the given normal vector to a unit vectors.
Mdouble distance_
The boundary's distance from the origin.
void write(std::ostream &os) const override=0
Adds object's id_ to given ostream NB: purely virtual function, overriding the version of BaseObject...
Definition: BaseBoundary.cc:70
bool isActivated_
The DeletionBoundary is activated by default. If the DeletionBoundary is deactivated, then it deletes no particles.
unsigned int numberOfParticlesDeleted_
Number of particles that have been deleted by this boundary.

Member Data Documentation

Mdouble DeletionBoundary::distance_
private

The boundary's distance from the origin.

Definition at line 163 of file DeletionBoundary.h.

Referenced by DeletionBoundary(), getDistance(), move(), oldRead(), read(), set(), and write().

bool DeletionBoundary::isActivated_
private

The DeletionBoundary is activated by default. If the DeletionBoundary is deactivated, then it deletes no particles.

Definition at line 177 of file DeletionBoundary.h.

Referenced by activate(), checkBoundaryAfterParticlesMove(), deactivate(), DeletionBoundary(), read(), and write().

double DeletionBoundary::massDeleted_
private
Vec3D DeletionBoundary::normal_
private

outward unit normal vector

Definition at line 148 of file DeletionBoundary.h.

Referenced by getDistance(), oldRead(), read(), set(), and write().

unsigned int DeletionBoundary::numberOfParticlesDeleted_
private

Number of particles that have been deleted by this boundary.

Definition at line 168 of file DeletionBoundary.h.

Referenced by checkBoundaryAfterParticleMoved(), DeletionBoundary(), getNumberOfParticlesDeleted(), read(), reset(), and write().

Mdouble DeletionBoundary::scaleFactor_
private

This is the factor to rescale the given normal vector to a unit vectors.

NB: Not only the normal vector is rescaled by this factor, also the 'distance' from the origin of the boundary is scaled by this factor! Also, once the boundary position is set with DeletionBoundary::set(), the arguments of any reset of the distance_ property (i.e. usage of DeletionBoundary::move()) will be rescaled by the same factor!

Definition at line 158 of file DeletionBoundary.h.

Referenced by DeletionBoundary(), move(), oldRead(), read(), set(), and write().

std::ofstream DeletionBoundary::tracker
private

Definition at line 181 of file DeletionBoundary.h.

Referenced by checkBoundaryAfterParticleMoved().

double DeletionBoundary::trackMassDeleted_
private

Definition at line 170 of file DeletionBoundary.h.

Referenced by checkBoundaryAfterParticleMoved().

bool DeletionBoundary::trackOutflow_
private
double DeletionBoundary::volumeDeleted_
private

The documentation for this class was generated from the following files: