CubeInsertionBoundary.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 BOUNDARIES_CUBEINSERTIONBOUNDARY_H
6 #define BOUNDARIES_CUBEINSERTIONBOUNDARY_H
7 
8 #include "InsertionBoundary.h"
9 #include "Math/Vector.h"
10 
11 class BaseParticle;
12 
13 class RNG;
14 
22 public:
23 
28 
33 
38 
42  CubeInsertionBoundary *copy() const override;
43 
47  void
48  set(BaseParticle *particleToCopy, unsigned int maxFailed, Vec3D posMin, Vec3D posMax, Vec3D velMin = {0,0,0}, Vec3D velMax = {0,0,0});
49 
50  void
51  set(BaseParticle &particleToCopy, unsigned int maxFailed, Vec3D posMin, Vec3D posMax, Vec3D velMin = {0,0,0}, Vec3D velMax = {0,0,0});
52 
56  void
57  set(std::vector<BaseParticle *> particleToCopy, unsigned int maxFailed, Vec3D posMin, Vec3D posMax, Vec3D velMin = {0,0,0},
58  Vec3D velMax = {0,0,0});
59 
63  void set(BaseParticle* particleToCopy, unsigned int maxFailed, Vec3D posMin, Vec3D posMax, Vec3D velMin,
64  Vec3D velMax, Mdouble rMin, Mdouble rMax);
65 
69  void set(BaseParticle& particleToCopy, unsigned int maxFailed, Vec3D posMin, Vec3D posMax, Vec3D velMin,
70  Vec3D velMax, Mdouble rMin, Mdouble rMax);
71 
76  void setGeometry(Vec3D posMin, Vec3D posMax);
77 
81  void placeParticle(BaseParticle* p, RNG& random) override;
82 
86  void read(std::istream& is) override;
87 
91  void write(std::ostream& os) const override;
92 
93 
94 private:
95 
99  std::string getName() const override;
100 
101 protected:
102 
108 };
109 
110 #endif
float * p
Definition: Tutorial_Map_using.cpp:9
Definition: BaseParticle.h:33
It's an insertion boundary which has cuboidal shape (yes, 'CuboidalInsertionBoundary' would have been...
Definition: CubeInsertionBoundary.h:21
Vec3D posMin_
Minimal and maximal positions defining the boundary's boundaries, and minimum and maximum velocity of...
Definition: CubeInsertionBoundary.h:107
CubeInsertionBoundary()
Constructor; sets everything to 0.
Definition: CubeInsertionBoundary.cc:13
CubeInsertionBoundary * copy() const override
Creates a copy on the heap and returns a pointer.
Definition: CubeInsertionBoundary.cc:40
Vec3D posMax_
Definition: CubeInsertionBoundary.h:107
void write(std::ostream &os) const override
writes boundary properties to ostream
Definition: CubeInsertionBoundary.cc:183
void set(BaseParticle *particleToCopy, unsigned int maxFailed, Vec3D posMin, Vec3D posMax, Vec3D velMin={0, 0, 0}, Vec3D velMax={0, 0, 0})
Sets the properties of the InsertionBoundary for mutliple different particle types.
Definition: CubeInsertionBoundary.cc:86
void setGeometry(Vec3D posMin, Vec3D posMax)
Sets the geometry (position and velocity distribution) of the CubeInsertionBoundary.
Definition: CubeInsertionBoundary.cc:129
void placeParticle(BaseParticle *p, RNG &random) override
Generates a random position, velocity for the particle p.
Definition: CubeInsertionBoundary.cc:152
std::string getName() const override
Returns the name of the object.
Definition: CubeInsertionBoundary.cc:196
void read(std::istream &is) override
reads boundary properties from istream
Definition: CubeInsertionBoundary.cc:169
~CubeInsertionBoundary() override
Destructor: default destructor.
Boundary structure for boundaries used for insertion of particles.
Definition: InsertionBoundary.h:29
This is a class that generates random numbers i.e. named the Random Number Generator (RNG).
Definition: RNG.h:32
Definition: Kernel/Math/Vector.h:30
std::string string(const unsigned &i)
Definition: oomph_definitions.cc:286