ls1-MarDyn
ls1-MarDyn molecular dynamics code
Public Member Functions | Static Public Member Functions | List of all members
FixRegion Class Reference

Plugin: can be enabled via config.xml
More...

#include <FixRegion.h>

Inheritance diagram for FixRegion:
PluginBase

Public Member Functions

void init (ParticleContainer *particleContainer, DomainDecompBase *domainDecomp, Domain *domain) override
 Method init will be called at the begin of the simulation. More...
 
void readXML (XMLfileUnits &xmlconfig) override
 will be called to read configuration 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 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 registerCallbacks (std::map< std::string, FunctionWrapper > &callbackMap) override
 
- 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 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 accessAllCallbacks (const std::map< std::string, FunctionWrapper > &callbackMap)
 

Static Public Member Functions

static PluginBasecreateInstance ()
 

Detailed Description

Plugin: can be enabled via config.xml

Fixes particles in a given region.

<plugin name="FixRegion">
<xmin>50</xmin>
<ymin>60</ymin>
<zmin>50</zmin>
<xmax>50</xmax>
<ymax>60</ymax>
<zmax>50</zmax>
</plugin>

Member Function Documentation

◆ afterForces()

void FixRegion::afterForces ( ParticleContainer particleContainer,
DomainDecompBase domainDecomp,
unsigned long  simstep 
)
overridevirtual

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

Reimplemented from PluginBase.

◆ beforeForces()

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

return the name of the plugin

Implements PluginBase.

◆ init()

void FixRegion::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 FixRegion::readXML ( XMLfileUnits xmlconfig)
overridevirtual

will be called to read configuration

Parameters
xmlconfigread from config.xml

Implements PluginBase.

◆ registerCallbacks()

void FixRegion::registerCallbacks ( std::map< std::string, FunctionWrapper > &  callbackMap)
inlineoverridevirtual

Register callbacks to callbackMap. This allows to make functions of a plugin accessible to other plugins. New callbacks should be added to callbackMap. Example syntax:

  • register a function that returns a local value:
    callbackMap["getMyLocalValue"] = [this] { return _myLocalValue; };
  • register a function that calls a local function and returns its return value:
    callbackMap["callMyFunct"] = [this] { return myFunct(); };
    Parameters
    callbackMapAdd callbacks to this map.

Reimplemented from PluginBase.


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