ls1-MarDyn
ls1-MarDyn molecular dynamics code
ExamplePlugin.h
1/*
2 * ExamplePlugin.h
3 *
4 * Created on: 4 Jun 2018
5 * Author: tchipevn
6 */
7
8#ifndef SRC_PLUGINS_EXAMPLEPLUGIN_H_
9#define SRC_PLUGINS_EXAMPLEPLUGIN_H_
10
11#include "PluginBase.h"
12
19private:
20 enum class WhereToDisplay {
21 ALL=0,
22 BEFORE_EVENT_NEW_TIMESTEP = 1,
23 BEFORE_FORCES = 2,
24 AFTER_FORCES = 3,
25 END_STEP = 4,
26 AT_INIT = 5,
27 AT_FINISH = 6,
28 };
29
30public:
31 ExamplePlugin() {}
32 virtual ~~ExamplePlugin() {}
33
34 void init(ParticleContainer* particleContainer,
35 DomainDecompBase* domainDecomp, Domain* domain);
36
37 void readXML(XMLfileUnits& xmlconfig);
38
40 ParticleContainer* particleContainer, DomainDecompBase* domainDecomp,
41 unsigned long simstep
42 );
43
44 void beforeForces(
45 ParticleContainer* particleContainer, DomainDecompBase* domainDecomp,
46 unsigned long simstep
47 );
48
49 void afterForces(
50 ParticleContainer* particleContainer, DomainDecompBase* domainDecomp,
51 unsigned long simstep
52 );
53
54 void endStep(
55 ParticleContainer* particleContainer, DomainDecompBase* domainDecomp,
56 Domain* domain, unsigned long simstep);
57
58 void finish(ParticleContainer* particleContainer,
59 DomainDecompBase* domainDecomp, Domain* domain);
60
62 return std::string("ExamplePlugin");
63 }
64
65 static PluginBase* createInstance() { return new ExamplePlugin(); }
66
67private:
68 std::string _message;
69 unsigned long _writeFrequency;
70 WhereToDisplay _displaySelector;
71};
72
73#endif /* SRC_PLUGINS_EXAMPLEPLUGIN_H_ */
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: ExamplePlugin.h:18
void endStep(ParticleContainer *particleContainer, DomainDecompBase *domainDecomp, Domain *domain, unsigned long simstep)
Method endStep will be called at the end of each time step.
Definition: ExamplePlugin.cpp:102
void readXML(XMLfileUnits &xmlconfig)
Method readXML will be called once for each plugin section in the input file.
Definition: ExamplePlugin.cpp:16
std::string getPluginName()
return the name of the plugin
Definition: ExamplePlugin.h:61
void finish(ParticleContainer *particleContainer, DomainDecompBase *domainDecomp, Domain *domain)
Method finish will be called at the end of the simulation.
Definition: ExamplePlugin.cpp:111
void afterForces(ParticleContainer *particleContainer, DomainDecompBase *domainDecomp, unsigned long simstep)
Method afterForces will be called after forcefields have been applied no sitewise Forces can be appli...
Definition: ExamplePlugin.cpp:93
void beforeForces(ParticleContainer *particleContainer, DomainDecompBase *domainDecomp, unsigned long simstep)
Method beforeForces will be called before forcefields have been applied no alterations w....
Definition: ExamplePlugin.cpp:84
void init(ParticleContainer *particleContainer, DomainDecompBase *domainDecomp, Domain *domain)
Method init will be called at the begin of the simulation.
Definition: ExamplePlugin.cpp:66
void beforeEventNewTimestep(ParticleContainer *particleContainer, DomainDecompBase *domainDecomp, unsigned long simstep)
Method will be called first thing in a new timestep.
Definition: ExamplePlugin.cpp:74
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