ls1-MarDyn
ls1-MarDyn molecular dynamics code
MettDeamonFeedrateDirector.h
1//Calculation of the Fluid Wall interaction by a function
2
3#ifndef METTDEAMON_FEEDRATE_DIRECTOR_H_
4#define METTDEAMON_FEEDRATE_DIRECTOR_H_
5
6#include "plugins/PluginBase.h"
7#include "utils/Random.h"
8#include "plugins/NEMD/MettDeamon.h"
9
10#include <string>
11#include <map>
12#include <list>
13#include <cstdint>
14#include <vector>
15
16#include "utils/CommVar.h"
17
20class Domain;
21
23{
24public:
25 // constructor and destructor
28
41 void readXML(XMLfileUnits& xmlconfig) override;
42
43 void init(ParticleContainer *particleContainer,
44 DomainDecompBase *domainDecomp, Domain *domain) override;
45
46 void beforeForces(
47 ParticleContainer* particleContainer, DomainDecompBase* domainDecomp,
48 unsigned long simstep
49 ) override;
50
55 void afterForces(
56 ParticleContainer* particleContainer, DomainDecompBase* domainDecomp,
57 unsigned long simstep
58 ) override;
59
60 void endStep(
61 ParticleContainer *particleContainer,
62 DomainDecompBase *domainDecomp, Domain *domain,
63 unsigned long simstep) override {}
64
65 void finish(ParticleContainer *particleContainer,
66 DomainDecompBase *domainDecomp, Domain *domain) override {}
67
68 std::string getPluginName() override {return std::string("MettDeamonFeedrateDirector");}
69 static PluginBase* createInstance() {return new MettDeamonFeedrateDirector();}
70
71private:
72 void calcFeedrate(MettDeamon* mettDeamon);
73 void resetLocalValues();
74 void csv_str2list(const std::string& strCSV, std::list<double>& list);
75 void writeRestartfile();
76
77private:
78 uint32_t _mirror_id;
79 struct Feedrate {
80 double init;
81 double actual;
82 double sum;
83 std::list<double> list;
84 uint32_t numvals;
85 double avg;
86 } _feedrate;
87 struct UpdateControl {
88 uint32_t updateFreq;
89 uint32_t sampledTimestepCount;
90 } _updateControl;
91 struct ParticleManipCount {
94 } _particleManipCount;
95 struct Restart {
96 uint32_t writefreq;
97 } _restart;
98};
99
100#endif /*METTDEAMON_FEEDRATE_DIRECTOR_H_*/
Definition: CommVar.h:17
handle boundary region and multiple processes
Definition: DomainDecompBase.h:51
This class is used to read in the phasespace and to handle macroscopic values.
Definition: Domain.h:47
Definition: MettDeamonFeedrateDirector.h:23
void readXML(XMLfileUnits &xmlconfig) override
Read in XML configuration for MettDeamonFeedrateDirector and all its included objects.
Definition: MettDeamonFeedrateDirector.cpp:63
void beforeForces(ParticleContainer *particleContainer, DomainDecompBase *domainDecomp, unsigned long simstep) override
Method beforeForces will be called before forcefields have been applied no alterations w....
Definition: MettDeamonFeedrateDirector.cpp:116
std::string getPluginName() override
return the name of the plugin
Definition: MettDeamonFeedrateDirector.h:68
void afterForces(ParticleContainer *particleContainer, DomainDecompBase *domainDecomp, unsigned long simstep) override
Method afterForces will be called after forcefields have been applied.
Definition: MettDeamonFeedrateDirector.cpp:162
void finish(ParticleContainer *particleContainer, DomainDecompBase *domainDecomp, Domain *domain) override
Method finish will be called at the end of the simulation.
Definition: MettDeamonFeedrateDirector.h:65
void endStep(ParticleContainer *particleContainer, DomainDecompBase *domainDecomp, Domain *domain, unsigned long simstep) override
Method endStep will be called at the end of each time step.
Definition: MettDeamonFeedrateDirector.h:60
void init(ParticleContainer *particleContainer, DomainDecompBase *domainDecomp, Domain *domain) override
Method init will be called at the begin of the simulation.
Definition: MettDeamonFeedrateDirector.cpp:40
Definition: MettDeamon.h:144
This Interface is used to get access to particles and pairs of particles.
Definition: ParticleContainer.h:69
The PluginBase class provides the interface for any kind of output/plugin classes - called "(output) ...
Definition: PluginBase.h:47
XML file with unit attributes abstraction.
Definition: xmlfileUnits.h:25
::xsd::cxx::tree::string< char, simple_type > string
C++ type corresponding to the string XML Schema built-in type.
Definition: vtk-punstructured.h:270