ls1-MarDyn
ls1-MarDyn molecular dynamics code
Classes | Public Member Functions | Static Public Member Functions | List of all members
DistControl Class Reference
Inheritance diagram for DistControl:
PluginBase ControlInstance SubjectBase

Public Member Functions

std::string getShortName () override
 
void readXML (XMLfileUnits &xmlconfig) override
 Read in XML configuration for DistControl and all its included objects. More...
 
void init (ParticleContainer *particleContainer, DomainDecompBase *domainDecomp, Domain *domain) override
 Method init will be called at the begin of the simulation. More...
 
void beforeEventNewTimestep (ParticleContainer *particleContainer, DomainDecompBase *domainDecomp, unsigned long simstep) override
 Method will be called first thing in a new timestep. More...
 
void beforeForces (ParticleContainer *particleContainer, DomainDecompBase *domainDecomp, unsigned long simstep) override
 Method beforeForces will be called before forcefields have been applied no alterations w.r.t. Forces shall be made here. More...
 
void siteWiseForces (ParticleContainer *particleContainer, DomainDecompBase *domainDecomp, unsigned long simstep) override
 Method siteWiseForces will be called before forcefields have been applied alterations to sitewise forces and fullMolecule forces can be made here. More...
 
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 applied here. More...
 
void endStep (ParticleContainer *particleContainer, DomainDecompBase *domainDecomp, Domain *domain, unsigned long simstep) override
 Method endStep will be called at the end of each time step. More...
 
void finish (ParticleContainer *particleContainer, DomainDecompBase *domainDecomp, Domain *domain) override
 Method finish will be called at the end of the simulation. More...
 
std::string getPluginName () override
 return the name of the plugin More...
 
void SetSubdivision (const uint32_t &numBins)
 
void SetSubdivision (const double &dBinWidth)
 
void PrepareSubdivision ()
 
void PrepareDataStructures ()
 
void InitPositions (const double &dInterfaceMidLeft, const double &dInterfaceMidRight)
 
double GetInterfaceMidLeft ()
 
double GetInterfaceMidRight ()
 
unsigned int GetUpdateFreq ()
 
unsigned int GetWriteFreqProfiles ()
 
void Init (ParticleContainer *particleContainer)
 
void WriteHeader ()
 
void WriteData (const uint64_t &simstep)
 
void WriteDataProfiles (const uint64_t &simstep)
 
void SampleProfiles (Molecule *mol)
 
void UpdatePositionsInit (ParticleContainer *particleContainer)
 
void UpdatePositions (const uint64_t &simstep)
 
void registerObserver (ObserverBase *observer) override
 
void unregisterObserver (ObserverBase *observer) override
 
void informObserver () override
 
- Public Member Functions inherited from PluginBase
 PluginBase ()
 Subclasses should use their constructur to pass parameters (e.g. filenames)
 
virtual void registerCallbacks (std::map< std::string, FunctionWrapper > &callbackMap)
 
virtual void accessAllCallbacks (const std::map< std::string, FunctionWrapper > &callbackMap)
 

Static Public Member Functions

static PluginBasecreateInstance ()
 

Member Function Documentation

◆ afterForces()

void DistControl::afterForces ( ParticleContainer particleContainer,
DomainDecompBase domainDecomp,
unsigned long  simstep 
)
inlineoverridevirtual

Method afterForces will be called after forcefields have been applied no sitewise Forces can be applied here.

Reimplemented from PluginBase.

◆ beforeEventNewTimestep()

void DistControl::beforeEventNewTimestep ( ParticleContainer particleContainer,
DomainDecompBase domainDecomp,
unsigned long  simstep 
)
inlineoverridevirtual

Method will be called first thing in a new timestep.

Reimplemented from PluginBase.

◆ beforeForces()

void DistControl::beforeForces ( ParticleContainer particleContainer,
DomainDecompBase domainDecomp,
unsigned long  simstep 
)
overridevirtual

Method beforeForces will be called before forcefields have been applied no alterations w.r.t. Forces shall be made here.

Reimplemented from PluginBase.

◆ endStep()

void DistControl::endStep ( ParticleContainer particleContainer,
DomainDecompBase domainDecomp,
Domain domain,
unsigned long  simstep 
)
inlineoverridevirtual

Method endStep will be called at the end of each time step.

This method will be called every time step passing the simstep as an additional parameter. It can be used e.g. to write per time step data to a file or perform additional computations.

Parameters
particleContainerparticle container storing the (local) molecules
domainDecompdomain decomposition in use
domain

Implements PluginBase.

◆ finish()

void DistControl::finish ( ParticleContainer particleContainer,
DomainDecompBase domainDecomp,
Domain domain 
)
inlineoverridevirtual

Method finish will be called at the end of the simulation.

This method will be called once at the end of the simulation. It can be used e.g. to closing output files or writing final statistics.

Parameters
particleContainerparticle container storing the (local) molecules
domainDecompdomain decomposition in use
domain

Implements PluginBase.

◆ getPluginName()

std::string DistControl::getPluginName ( )
inlineoverridevirtual

return the name of the plugin

Implements PluginBase.

◆ getShortName()

std::string DistControl::getShortName ( )
inlineoverridevirtual

Implements ControlInstance.

◆ informObserver()

void DistControl::informObserver ( )
overridevirtual

Implements SubjectBase.

◆ init()

void DistControl::init ( ParticleContainer particleContainer,
DomainDecompBase domainDecomp,
Domain domain 
)
overridevirtual

Method init will be called at the begin of the simulation.

This method will be called once at the begin of the simulation just right before the main time step loop. It can be used e.g. to open output files or initialize statistics.

Parameters
particleContainerparticle container storing the (local) molecules
domainDecompdomain decomposition in use
domain

Implements PluginBase.

◆ readXML()

void DistControl::readXML ( XMLfileUnits xmlconfig)
overridevirtual

Read in XML configuration for DistControl and all its included objects.

The following XML object structure is handled by this method:

<plugin name="DistControl">
<control>
<update>5000</update> <!-- update frequency -->
</control>
<filenames>
<control>DistControl.dat</control> <!-- log file of updated positions -->
<profiles>DistControlProfiles</profiles> <!-- file prefix for density profiles to determine interface position(s) -->
</filenames>
<subdivision type="width"> <!-- type="number|width" for subdivision of domain into bins for density profile sampling -->
<width>FLOAT</width> <!-- bin width -->
<number>1</number> <!-- number of bins -->
</subdivision>
<init type="startconfig"> <!-- type="startconfig|values|file" for init positions-->
<values> <left>FLOAT</left> <right>FLOAT</right> </values> <!-- specify init values for left and right interface -->
<file>../path/to/file/DistControl.dat</file> <!-- read values from specified file -->
<simstep>INT</simstep> <!-- read from file in line simstep=INT -->
</init>
<method type="denderiv"> <!-- type="density"|denderiv" method to determine interface positions-->
<componentID>INT</componentID> <!-- target component, 0:all components -->
<neighbourvals algorithm="smooth">INT</neighbourvals> <!-- neighbour values used to smooth the profile -->
<neighbourvals algorithm="derivate">INT</neighbourvals> <!-- neighbour values used to calculate derivation profile by linear regression -->
<density>FLOAT</density> <!-- vapor density to identify vapor phase -->
</method>
</plugin>

Implements PluginBase.

◆ registerObserver()

void DistControl::registerObserver ( ObserverBase observer)
overridevirtual

Implements SubjectBase.

◆ siteWiseForces()

void DistControl::siteWiseForces ( ParticleContainer particleContainer,
DomainDecompBase domainDecomp,
unsigned long  simstep 
)
inlineoverridevirtual

Method siteWiseForces will be called before forcefields have been applied alterations to sitewise forces and fullMolecule forces can be made here.

Reimplemented from PluginBase.

◆ unregisterObserver()

void DistControl::unregisterObserver ( ObserverBase observer)
overridevirtual

Implements SubjectBase.


The documentation for this class was generated from the following files: