16#include "plugins/PluginBase.h"
17#include "utils/ObserverBase.h"
18#include "utils/Region.h"
19#include "utils/CommVar.h"
20#include "molecules/MoleculeForwardDeclaration.h"
29#define FORMAT_SCI_MAX_DIGITS std::setw(24) << std::scientific << std::setprecision(std::numeric_limits<double>::digits10)
31enum DistControlUpdateMethods
34 DCUM_DENSITY_PROFILE = 1,
35 DCUM_DENSITY_PROFILE_DERIVATION = 2,
39enum DistControlInitMethods
42 DCIM_START_CONFIGURATION = 1,
43 DCIM_MIDPOINT_VALUES = 2,
44 DCIM_READ_FROM_FILE = 3,
91 unsigned long simstep)
override {};
94 unsigned long simstep)
override;
97 unsigned long simstep)
override {};
99 unsigned long simstep)
override {}
103 unsigned long simstep)
override {};
112 void SetSubdivision(
const uint32_t& numBins) {_binParams.count = numBins; _nSubdivisionOpt = SDOPT_BY_NUM_SLABS;}
113 void SetSubdivision(
const double& dBinWidth) {_binParams.width = dBinWidth; _nSubdivisionOpt = SDOPT_BY_SLAB_WIDTH;}
114 void PrepareSubdivision();
117 void PrepareDataStructures();
120 void InitPositions(
const double& dInterfaceMidLeft,
const double& dInterfaceMidRight);
122 double GetInterfaceMidLeft() {
return _dInterfaceMidLeft;}
123 double GetInterfaceMidRight() {
return _dInterfaceMidRight;}
124 unsigned int GetUpdateFreq() {
return _controlFreqs.update;}
125 unsigned int GetWriteFreqProfiles() {
return _controlFreqs.write.profiles;}
129 void WriteData(
const uint64_t& simstep);
130 void WriteDataProfiles(
const uint64_t& simstep);
136 void UpdatePositions(
const uint64_t& simstep);
140 void unregisterObserver(
ObserverBase* observer)
override;
141 void informObserver()
override;
146 void EstimateInterfaceMidpoint();
147 void EstimateInterfaceMidpointsByForce();
148 void ResetLocalValues();
151 void InitDataStructures();
154 void SmoothProfile(
double* dData,
double* dSmoothData,
const uint64_t& nNumVals,
const uint32_t& nNeighbourVals);
155 void SmoothProfiles(
const uint32_t& nNeighbourVals);
156 void DerivateProfile(
double* dDataX,
double* dDataY,
double* dDerivDataY,
const uint64_t& nNumVals,
const uint32_t& nNeighbourVals);
157 void DerivateProfiles(
const uint32_t& nNeighbourVals);
161 double _dInterfaceMidLeft;
162 double _dInterfaceMidRight;
164 uint16_t _nNumComponents;
165 uint16_t _nTargetCompID;
166 uint64_t _nNumValuesScalar;
167 std::vector<uint64_t> _nOffsets;
171 std::vector<double> _dMidpointPositions;
172 std::vector<double> _dDensityProfile;
173 std::vector<double> _dDensityProfileSmoothed;
174 std::vector<double> _dDensityProfileSmoothedDerivation;
175 std::vector<double> _dForceProfile;
176 std::vector<double> _dForceProfileSmoothed;
180 double _dVaporDensity;
181 uint16_t _nNeighbourValsSmooth;
182 uint16_t _nNeighbourValsDerivate;
186 uint64_t _nRestartTimestep;
193 std::vector<ObserverBase*> _observer;
195 int _nSubdivisionOpt;
205 struct ControlFreqType
Definition: DistControl.h:48
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: DistControl.h:98
std::string getPluginName() override
return the name of the plugin
Definition: DistControl.h:108
void finish(ParticleContainer *particleContainer, DomainDecompBase *domainDecomp, Domain *domain) override
Method finish will be called at the end of the simulation.
Definition: DistControl.h:105
void readXML(XMLfileUnits &xmlconfig) override
Read in XML configuration for DistControl and all its included objects.
Definition: DistControl.cpp:59
void beforeEventNewTimestep(ParticleContainer *particleContainer, DomainDecompBase *domainDecomp, unsigned long simstep) override
Method will be called first thing in a new timestep.
Definition: DistControl.h:90
void beforeForces(ParticleContainer *particleContainer, DomainDecompBase *domainDecomp, unsigned long simstep) override
Method beforeForces will be called before forcefields have been applied no alterations w....
Definition: DistControl.cpp:236
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: DistControl.h:101
void init(ParticleContainer *particleContainer, DomainDecompBase *domainDecomp, Domain *domain) override
Method init will be called at the begin of the simulation.
Definition: DistControl.cpp:227
void siteWiseForces(ParticleContainer *particleContainer, DomainDecompBase *domainDecomp, unsigned long simstep) override
Method siteWiseForces will be called before forcefields have been applied alterations to sitewise for...
Definition: DistControl.h:96
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
FullMolecule modeled as LJ sphere with point polarities.
Definition: FullMolecule.h:18
Definition: ObserverBase.h:13
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: ObserverBase.h:20
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
Definition: DistControl.h:209