MercuryDPM  Trunk
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
DropletBoundary.h
Go to the documentation of this file.
1 #ifndef DROPLETBOUNDARY_H
2 #define DROPLETBOUNDARY_H
3 
4 #include "DPMBase.h"
5 #include "BaseBoundary.h"
6 #include "Math/Vector.h"
7 #include "Math/RNG.h"
8 
9 class DPMBase;
10 
11 class ParticleHandler;
12 
13 class BaseParticle;
14 
15 class RNG;
16 
26 {
27 public:
28 
29  struct Droplet {
32  double radius;
33  };
34 
35  std::vector<Droplet> droplets_;
36 
37 private:
38 
39  std::function<void(DropletBoundary&)> generateDroplets_
40  = [] (DropletBoundary&) {};
41 
42 public:
43 
45 
47  droplets_ = other.droplets_;
49  }
50 
51  ~DropletBoundary() override {
52  logger(VERBOSE, "A DropletBoundary has been destroyed.");
53  }
54 
55  DropletBoundary* copy() const override {
56  return new DropletBoundary(*this);
57  }
58 
59  std::string getName() const override {
60  return "DropletBoundary";
61  }
62 
67 
71  void read(std::istream& is) override;
72 
76  void write(std::ostream& os) const override;
77 
78  void setGenerateDroplets(std::function<void(DropletBoundary&)> generateDroplets) {
79  generateDroplets_=generateDroplets;
80  }
81 
82  void writeVTK(std::fstream& file) override;
83 
84 };
85 
86 #endif
The DPMBase header includes quite a few header files, defining all the handlers, which are essential...
Definition: DPMBase.h:72
void writeVTK(std::fstream &file) override
Logger< MERCURY_LOGLEVEL > logger("MercuryKernel")
std::vector< Droplet > droplets_
~DropletBoundary() override
std::function< void(DropletBoundary &)> generateDroplets_
This is a class that generates random numbers i.e. named the Random Number Generator (RNG)...
Definition: RNG.h:52
Supplies a 'constant heat flux' to a cuboidal region (specified by two corner points) by adding a ran...
Container to store all BaseParticle.
std::string getName() const override
A purely virtual function.
DropletBoundary(const DropletBoundary &other)
DropletBoundary * copy() const override
Used to create a copy of the object NB: purely virtual function.
Definition: Vector.h:49
void write(std::ostream &os) const override
Writes the boundary properties to an std::ostream.
void setGenerateDroplets(std::function< void(DropletBoundary &)> generateDroplets)
void read(std::istream &is) override
Reads some boundary properties from an std::istream.
void checkBoundaryAfterParticlesMove(ParticleHandler &pH) override
Runs at the end of each time step.