CubeDeletionBoundary.h
Go to the documentation of this file.
1 // This file is part of the MercuryDPM project (https://www.mercurydpm.org).
2 // Copyright (c), The MercuryDPM Developers Team. All rights reserved.
3 // License: BSD 3-Clause License; see the LICENSE file in the root directory.
4 
5 #ifndef CUBEDELETIONBOUNDARY_H
6 #define CUBEDELETIONBOUNDARY_H
7 
8 #include "DeletionBoundary.h"
9 #include "BaseBoundary.h"
10 #include "Math/Vector.h"
11 
12 class ParticleHandler;
13 
14 class BaseParticle;
15 
17 {
18 public:
23 
27  ~CubeDeletionBoundary() override;
28 
32  CubeDeletionBoundary* copy() const override;
33 
37  void set(Vec3D posMin, Vec3D posMax);
38 
42  Mdouble getDistance(const Vec3D& position) const override;
43 
47  void read(std::istream& is) override;
48 
52  void write(std::ostream& os) const override;
53 
57  std::string getName() const override;
58 
59 private:
60 
65 };
66 
67 #endif
Definition: BaseParticle.h:33
Definition: CubeDeletionBoundary.h:17
void set(Vec3D posMin, Vec3D posMax)
Sets boundary position based on two opposite corners.
Definition: CubeDeletionBoundary.cc:25
Mdouble getDistance(const Vec3D &position) const override
Returns a negative value if and only if the particle is inside the boundary.
Definition: CubeDeletionBoundary.cc:39
void write(std::ostream &os) const override
writes boundary properties to ostream
Definition: CubeDeletionBoundary.cc:58
void read(std::istream &is) override
reads boundary properties from istream
Definition: CubeDeletionBoundary.cc:50
CubeDeletionBoundary * copy() const override
Copy method; creates copy on the heap and returns a pointer to it.
Definition: CubeDeletionBoundary.cc:31
std::string getName() const override
Returns the name of the object.
Definition: CubeDeletionBoundary.cc:68
Vec3D posMin_
Minimal and maximal positions defining the boundary's boundaries.
Definition: CubeDeletionBoundary.h:64
CubeDeletionBoundary()
default constructor
Definition: CubeDeletionBoundary.cc:13
~CubeDeletionBoundary() override
destructor
Definition: CubeDeletionBoundary.cc:20
Vec3D posMax_
Definition: CubeDeletionBoundary.h:64
Used for removing particles from the problem. Inherits from BaseBoundary. By default,...
Definition: DeletionBoundary.h:23
Container to store pointers to all particles.
Definition: ParticleHandler.h:28
Definition: Kernel/Math/Vector.h:30
std::string string(const unsigned &i)
Definition: oomph_definitions.cc:286