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

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 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...
 
- Public Member Functions inherited from PluginBase
 PluginBase ()
 Subclasses should use their constructur to pass parameters (e.g. filenames)
 
virtual void beforeEventNewTimestep (ParticleContainer *particleContainer, DomainDecompBase *domainDecomp, unsigned long simstep)
 Method will be called first thing in a new timestep. More...
 
virtual void beforeForces (ParticleContainer *particleContainer, DomainDecompBase *domainDecomp, unsigned long simstep)
 Method beforeForces will be called before forcefields have been applied no alterations w.r.t. Forces shall be made here. More...
 
virtual void siteWiseForces (ParticleContainer *particleContainer, DomainDecompBase *domainDecomp, unsigned long simstep)
 Method siteWiseForces will be called before forcefields have been applied alterations to sitewise forces and fullMolecule forces can be made here. More...
 
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 ()
 

Protected Member Functions

void addRegion (SampleRegion *region)
 
int getNumRegions ()
 
SampleRegiongetSampleRegion (unsigned short nRegionID)
 
void doSampling (Molecule *mol, DomainDecompBase *domainDecomp, unsigned long simstep)
 
void writeData (DomainDecompBase *domainDecomp, unsigned long simstep)
 
void prepareRegionSubdivisions ()
 

Member Function Documentation

◆ afterForces()

void RegionSampling::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.

◆ endStep()

void RegionSampling::endStep ( ParticleContainer particleContainer,
DomainDecompBase domainDecomp,
Domain domain,
unsigned long  simstep 
)
overridevirtual

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 RegionSampling::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 RegionSampling::getPluginName ( )
inlineoverridevirtual

return the name of the plugin

Implements PluginBase.

◆ getShortName()

std::string RegionSampling::getShortName ( )
inlineoverridevirtual

Implements ControlInstance.

◆ init()

void RegionSampling::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 RegionSampling::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="RegionSampling">
<region>
<coords> <!-- lc and uc: lower and upper corner of cuboid sampling region -->
<lcx>FLOAT</lcx> <lcy refcoordsID="0">FLOAT</lcy> <lcz>FLOAT</lcz>
<ucx>FLOAT</ucx> <ucy refcoordsID="0">FLOAT</ucy> <ucz>FLOAT</ucz>
</coords>
<sampling type="profiles"> <!-- Sampling profiles of various scalar and vector quantities, e.g. temperature, density, force, hydrodynamic velocity -->
<control>
<start>INT</start> <!-- start time step -->
<frequency>INT</frequency> <!-- frequency of writing profiles -->
<stop>INT</stop> <!-- stop time step -->
</control>
<subdivision type="width"> <!-- type="number | width" => subdivision of region into bins -->
<width>FLOAT</width> <!-- bin width -->
<number>INT</number> <!-- number of bins -->
</subdivision>
</sampling>
<sampling type="VDF" single_component="1"> <!-- Sampling of velocity distribution functions (VDF); Do not differ between components, if single_component is 1-->
<control>
<start>INT</start> <!-- start time step -->
<frequency>INT</frequency> <!-- frequency of writing profiles -->
<stop>INT</stop> <!-- stop time step -->
</control>
<subdivision type="width"> <!-- type="number | width" => subdivision of region into bins -->
<width>FLOAT</width> <!-- bin width -->
<number>INT</number> <!-- number of bins -->
</subdivision>
<discretizations>
<discretization cid="INT"> <!-- discretization of the velocity into discrete classes, for component cid="INT" -->
<numclasses>INT</numclasses> <!-- number of velocity classes -->
<maxvalue>FLOAT</maxvalue> <!-- maximum velocity that will be sampled -->
</discretization>
</discretizations>
</sampling>
<sampling type="fieldYR"> <!-- Sampling of a density field \rho(y,r) in cylinder shells, depending on a Cartesian coordinate y and radius r -->
<outputfile type="binary"> <!-- type="ASCII | binary" of output files -->
<prefix>STRING</prefix> <!-- file prefix of output files -->
</outputfile>
<control>
<start>INT</start> <!-- start time step -->
<frequency>INT</frequency> <!-- frequency of writing profiles -->
<stop>INT</stop> <!-- stop time step -->
</control>
<subdivision dim="y" type="width"> <!-- dim="y": subdivision of region into bins (y axis), type="number | width" -->
<width>FLOAT</width> <!-- bin width -->
<number>INT</number> <!-- number of bins -->
</subdivision>
<subdivision dim="r" type="width"> <!-- dim="r": subdivision of region into cylinder shells around y axis, type="number | width" -->
<width>FLOAT</width> <!-- width of the inner most shell, width of outer shells will be calculated such that the shell volume is const. -->
<number>INT</number> <!-- number of shells -->
</subdivision>
</sampling>
</region>
<region>
...
</region>
</plugin>

Implements PluginBase.


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