ls1-MarDyn
ls1-MarDyn molecular dynamics code
Dropaligner.h
1/*
2 * Dropaligner.h
3 *
4 * Created on: 22 June 2020
5 * Author: Marx
6 */
7
8#pragma once
9
10// class DropalignerTest;
11#include "Domain.h"
12#include "PluginBase.h"
13#include "parallel/DomainDecompBase.h"
14#include "particleContainer/ParticleContainer.h"
15
37class Dropaligner : public PluginBase {
38private:
39 bool _enabled = true;
40
41 int _interval = 1;
42
43 double _alignmentCorrection = 1.0;
44 double _motion[3];
45 double _balance[3];
46 double _mass = 0.0;
47 double _boxLength[3];
48 double _radius;
49 double _xPos;
50 double _yPos;
51 double _zPos;
52
53public:
54 void init(ParticleContainer* particleContainer, DomainDecompBase* domainDecomp, Domain* domain) override {
55 global_log->debug() << "DropletRealignment enabled" << std::endl;
56
57 for (unsigned d = 0; d < 3; d++) {
58 _boxLength[d] = domain->getGlobalLength(d);
59 }
60 }
61
62 void readXML(XMLfileUnits& xmlconfig) override;
63
64 void beforeForces(ParticleContainer* particleContainer, DomainDecompBase* domainDecomp,
65 unsigned long simstep) override;
66
67 void endStep(ParticleContainer* particleContainer, DomainDecompBase* domainDecomp, Domain* domain,
68 unsigned long simstep) override;
69
70 void finish(ParticleContainer* particleContainer, DomainDecompBase* domainDecomp, Domain* domain) override{};
71
72 std::string getPluginName() override { return std::string("Dropaligner"); }
73
74 static PluginBase* createInstance() { return new Dropaligner(); }
75};
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
double getGlobalLength(int d) const
return the length of the domain
Definition: Domain.h:163
Plugin: can be enabled via config.xml
Definition: Dropaligner.h:37
void readXML(XMLfileUnits &xmlconfig) override
will be called to read configuration
Definition: Dropaligner.cpp:15
void init(ParticleContainer *particleContainer, DomainDecompBase *domainDecomp, Domain *domain) override
Method init will be called at the begin of the simulation.
Definition: Dropaligner.h:54
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: Dropaligner.cpp:114
std::string getPluginName() override
return the name of the plugin
Definition: Dropaligner.h:72
void finish(ParticleContainer *particleContainer, DomainDecompBase *domainDecomp, Domain *domain) override
Method finish will be called at the end of the simulation.
Definition: Dropaligner.h:70
void beforeForces(ParticleContainer *particleContainer, DomainDecompBase *domainDecomp, unsigned long simstep) override
Method beforeForces will be called before forcefields have been applied no alterations w....
Definition: Dropaligner.cpp:43
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