ls1-MarDyn
ls1-MarDyn molecular dynamics code
Dropaccelerator.h
1/*
2 * Dropaccelerator.h
3 *
4 * Created on: 26 June 2020
5 * Author: Koch
6 */
7
8#pragma once
9
10// class DropacceleratorTest;
11#include "Domain.h"
12#include "PluginBase.h"
13#include "parallel/DomainDecompBase.h"
14#include "particleContainer/ParticleContainer.h"
15
36private:
37 bool _enabled = true;
38
39 int _interval = 1;
40
41 double _motion[3];
42 double _balance[3];
43 double _mass = 0.0;
44 double _boxLength[3];
45 double _dropRadius;
46 double _xPosition;
47 double _yPosition;
48 double _zPosition;
49 double _veloc;
50 double _steps;
51 double _velocNow;
52 double _startSimStep;
53
54 std::vector<char> _particleIsInDroplet;
55
56public:
57 void init(ParticleContainer* particleContainer, DomainDecompBase* domainDecomp, Domain* domain) override {
58 global_log->debug() << "DropletAccelerator enabled" << std::endl;
59
60 for (unsigned d = 0; d < 3; d++) {
61 _boxLength[d] = domain->getGlobalLength(d);
62 }
63 }
64
65 void readXML(XMLfileUnits& xmlconfig) override;
66
67 void afterForces(ParticleContainer* particleContainer, DomainDecompBase* domainDecomp,
68 unsigned long simstep) override;
69
70 void endStep(ParticleContainer* particleContainer, DomainDecompBase* domainDecomp, Domain* domain,
71 unsigned long simstep) override;
72
73 void finish(ParticleContainer* particleContainer, DomainDecompBase* domainDecomp, Domain* domain) override{};
74
75 std::string getPluginName() override { return std::string("Dropaccelerator"); }
76
77 static PluginBase* createInstance() { return new Dropaccelerator(); }
78};
79
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: Dropaccelerator.h:35
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: Dropaccelerator.cpp:172
void readXML(XMLfileUnits &xmlconfig) override
will be called to read configuration
Definition: Dropaccelerator.cpp:19
void init(ParticleContainer *particleContainer, DomainDecompBase *domainDecomp, Domain *domain) override
Method init will be called at the begin of the simulation.
Definition: Dropaccelerator.h:57
std::string getPluginName() override
return the name of the plugin
Definition: Dropaccelerator.h:75
void afterForces(ParticleContainer *particleContainer, DomainDecompBase *domainDecomp, unsigned long simstep) override
Method afterForces will be called after forcefields have been applied no sitewise Forces can be appli...
Definition: Dropaccelerator.cpp:49
void finish(ParticleContainer *particleContainer, DomainDecompBase *domainDecomp, Domain *domain) override
Method finish will be called at the end of the simulation.
Definition: Dropaccelerator.h:73
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