ls1-MarDyn
ls1-MarDyn molecular dynamics code
CavityEnsemble.h
1
2#ifndef CAVITYENSEMBLE_H_
3#define CAVITYENSEMBLE_H_
4
5#include <map>
6#include <set>
7
8#include "utils/Random.h"
9
10using namespace std;
11
13
15
16class Component;
17
18#include "molecules/MoleculeForwardDeclaration.h"
19
21public:
23
24 void setSystem(double x, double y, double z, int maxNeighbors, float radius);
25
26 double systemSize(int d) { return this->system[d]; }
27
28 void setSubdomain(int rank, double x0, double x1, double y0, double y1, double z0, double z1);
29
30 void submitTemperature(double T_in) { this->T = T_in; }
31
32 void setControlVolume(
33 double x0, double y0, double z0, double x1, double y1, double z1
34 );
35
36 void setMaxNeighbours(unsigned n, double rr) {
37 this->maxNeighbours = n;
38 this->r2n = rr;
39 }
40
41 double getRR() const { return this->r2n; }
42
43 void init(Component *component, unsigned Nx, unsigned Ny, unsigned Nz);
44
45 void preprocessStep();
46
47 bool decideActivity(unsigned neighbours, unsigned long tmid);
48
49 bool decideActivity(double uPotTilde, unsigned long tmid);
50
51 void setIdOffset(unsigned long offset) { this->idoffset = offset; }
52
53 unsigned long communicateNumCavities(DomainDecompBase *comm);
54
55 unsigned long numCavities() { return this->globalActive; }
56
57 map<unsigned long, Molecule *> *particleContainer() { return &(this->reservoir); }
58
59 map<unsigned long, Molecule *> activeParticleContainer();
60
61 void determineBoundary();
62
63 void processBoundary();
64
65 void cavityStep(ParticleContainer *globalMoleculeContainer);
66
67private:
72 unsigned countNeighbours(ParticleContainer *container, Molecule *m1) const;
73
74 int ownrank; // for debugging purposes (indicate rank in console output)
75 bool initialized;
76 bool rotated;
77
78 unsigned componentid;
79 double T;
80
81 double globalV;
82 double system[3]; // extent of the system
83 float minredco[3]; // minimal coordinates of the subdomain reduced w. r. t. the system size
84 float maxredco[3]; // maximal coordinates of the subdomain reduced w. r. t. the system size
85
86 bool restrictedControlVolume;
87 double control_bottom[3];
88 double control_top[3];
89
90 unsigned long idoffset;
91 set<unsigned long> active;
92 map<unsigned long, Molecule *> reservoir;
93 unsigned long globalActive;
94
95 bool boundarySpecified;
96 double init_bottom[3];
97 double init_top[3];
98
99 unsigned maxNeighbours;
100 double r2n;
101
102 Random async;
103};
104
105#endif
Definition: CavityEnsemble.h:20
Class implementing molecules as rigid rotators consisting out of different interaction sites (LJcente...
Definition: Component.h:14
handle boundary region and multiple processes
Definition: DomainDecompBase.h:51
FullMolecule modeled as LJ sphere with point polarities.
Definition: FullMolecule.h:18
This Interface is used to get access to particles and pairs of particles.
Definition: ParticleContainer.h:69
Definition: Random.h:12
typedef::xsd::cxx::tree::type container
Alias for the anyType type.
Definition: vtk-punstructured.h:130