ls1-MarDyn
ls1-MarDyn molecular dynamics code
TestPlugin.h
1/*
2 * FlopRateWriter.h
3 *
4 * Created on: 7 Feburary 2018
5 * Author: kruegener
6 */
7
8#ifndef SRC_UTILS_TESTPLUGIN_H_
9#define SRC_UTILS_TESTPLUGIN_H_
10
11#include "PluginBase.h"
12
13class TestPlugin: public PluginBase {
14public:
15 TestPlugin() {}
16 ~~TestPlugin() {}
17
23 void init(ParticleContainer* particleContainer,
24 DomainDecompBase* domainDecomp, Domain* domain) {
25 global_log->debug() << "[TESTPLUGIN] TESTPLUGIN INIT" << std::endl;
26 }
27
28 void readXML(XMLfileUnits& xmlconfig) {
29 global_log -> debug() << "[TESTPLUGIN] READING XML" << endl;
30 }
31
34 ParticleContainer* particleContainer, DomainDecompBase* domainDecomp,
35 unsigned long simstep
36 ) {
37 global_log -> debug() << "[TESTPLUGIN] BEFORE EVENT NEW TIMESTEP" << endl;
38 };
39
46 ParticleContainer* particleContainer, DomainDecompBase* domainDecomp,
47 unsigned long simstep
48 ) {
49 global_log -> debug() << "[TESTPLUGIN] BEFORE FORCES" << endl;
50 }
51
57 ParticleContainer* particleContainer, DomainDecompBase* domainDecomp,
58 unsigned long simstep
59 ) {
60 global_log->debug() << "[TESTPLUGIN] TESTPLUGIN AFTER FORCES" << endl;
61 }
62
71 void endStep(
72 ParticleContainer* particleContainer, DomainDecompBase* domainDecomp,
73 Domain* domain, unsigned long simstep
74 ) {
75 global_log->debug() << "[TESTPLUGIN] ENDSTEP" << endl;
76 }
77
86 void finish(ParticleContainer* particleContainer,
87 DomainDecompBase* domainDecomp, Domain* domain) {
88 global_log->debug() << "[TESTPLUGIN] FINISHING" << endl;
89 }
90
93 global_log->debug() << "[TESTPLUGIN] GETTING NAME" << endl;
94 return "TestPlugin";}
95 static PluginBase* createInstance() {
96 global_log->debug() << "[TESTPLUGIN] CREATE INSTANCE" << endl;
97 return new TestPlugin(); }
98
99private:
100
101 std::ofstream _fileStream;
102 unsigned long _writeFrequency;
103 std::string _outputPrefix;
104};
105
106#endif /* SRC_UTILS_TESTPLUGIN_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
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
Definition: TestPlugin.h:13
void beforeForces(ParticleContainer *particleContainer, DomainDecompBase *domainDecomp, unsigned long simstep)
Method beforeForces will be called before forcefields have been applied.
Definition: TestPlugin.h:45
void readXML(XMLfileUnits &xmlconfig)
Method readXML will be called once for each plugin section in the input file.
Definition: TestPlugin.h:28
std::string getPluginName()
return the name of the plugin
Definition: TestPlugin.h:92
void finish(ParticleContainer *particleContainer, DomainDecompBase *domainDecomp, Domain *domain)
Method finalOutput will be called at the end of the simulation.
Definition: TestPlugin.h:86
void init(ParticleContainer *particleContainer, DomainDecompBase *domainDecomp, Domain *domain)
will be called at the beginning of the simulation
Definition: TestPlugin.h:23
void endStep(ParticleContainer *particleContainer, DomainDecompBase *domainDecomp, Domain *domain, unsigned long simstep)
Method endStep will be called at the end of each time step.
Definition: TestPlugin.h:71
void beforeEventNewTimestep(ParticleContainer *particleContainer, DomainDecompBase *domainDecomp, unsigned long simstep)
Method will be called first thing in a new timestep.
Definition: TestPlugin.h:33
void afterForces(ParticleContainer *particleContainer, DomainDecompBase *domainDecomp, unsigned long simstep)
Method afterForces will be called after forcefields have been applied.
Definition: TestPlugin.h:56
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