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

IO-plugin: Used to create instances of CavityEnsemble and output the corresponding files containing the detected Cavity coordinates. More...

#include <CavityWriter.h>

Inheritance diagram for CavityWriter:
PluginBase

Public Member Functions

 CavityWriter ()=default
 Initialisation of all necessary field is done in readXML and init.
 
void readXML (XMLfileUnits &xmlconfig) final
 reads in parameters for CavityEnsemble and output
writefrequency: output timestep frequency AFTER initStatistics timesteps
componentid: can be multiple. Starts separate CavityEnsembles for each component.
radius: search radius around pseudo-molecules to look for neighbors with componentid=0/1...
maxNeighbours: number of neighbours allowed in radius for a pseudo-molecule to count as a cavity
Nx,Ny,Nz: grid numbers for grid of pseudo-molecules, sampling cavity properties at their grid position

for non-overlapping coverage: radius*N_xyz = domainSize_xyz

More...
 
void init (ParticleContainer *particleContainer, DomainDecompBase *domainDecomp, Domain *domain) final
 Set all necessary variables for each CavityEnsemble. One is used per Component. Ensembles are assigned subDomains depending on the rank of the MPI process. Also, if a smaller controlVolume is specified it gets passed here. More...
 
void beforeEventNewTimestep (ParticleContainer *particleContainer, DomainDecompBase *domainDecomp, unsigned long simstep) final
 Method will be called first thing in a new timestep. If the writeFrequency is reached and this is the first time, this will set the required Quaternions for the pseudo-molecules. More...
 
void afterForces (ParticleContainer *particleContainer, DomainDecompBase *domainDecomp, unsigned long simstep) final
 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) final
 Output the sampled cavity information from all ensembles to file. More...
 
void finish (ParticleContainer *particleContainer, DomainDecompBase *domainDecomp, Domain *domain)
 Nothing done here. Necessary for inheritance from PluginBase. More...
 
std::string getPluginName () final
 return the name of the plugin More...
 
std::map< unsigned, CavityEnsemble * > getMcav ()
 
- Public Member Functions inherited from PluginBase
 PluginBase ()
 Subclasses should use their constructur to pass parameters (e.g. filenames)
 
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 ()
 

Detailed Description

IO-plugin: Used to create instances of CavityEnsemble and output the corresponding files containing the detected Cavity coordinates.

Member Function Documentation

◆ afterForces()

void CavityWriter::afterForces ( ParticleContainer particleContainer,
DomainDecompBase domainDecomp,
unsigned long  simstep 
)
finalvirtual

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

If the writeFrequency is reached, this will trigger a loop through all pseudo-molecules to determine their status as either cavity or non-cavity and start the communication.

Reimplemented from PluginBase.

◆ beforeEventNewTimestep()

void CavityWriter::beforeEventNewTimestep ( ParticleContainer particleContainer,
DomainDecompBase domainDecomp,
unsigned long  simstep 
)
finalvirtual

Method will be called first thing in a new timestep. If the writeFrequency is reached and this is the first time, this will set the required Quaternions for the pseudo-molecules.

Reimplemented from PluginBase.

◆ endStep()

void CavityWriter::endStep ( ParticleContainer particleContainer,
DomainDecompBase domainDecomp,
Domain domain,
unsigned long  simstep 
)
finalvirtual

Output the sampled cavity information from all ensembles to file.

Parameters
particleContainer
domainDecomp
domain
simstep

Implements PluginBase.

◆ finish()

void CavityWriter::finish ( ParticleContainer particleContainer,
DomainDecompBase domainDecomp,
Domain domain 
)
virtual

Nothing done here. Necessary for inheritance from PluginBase.

Parameters
particleContainer
domainDecomp
domain

Implements PluginBase.

◆ getPluginName()

std::string CavityWriter::getPluginName ( )
inlinefinalvirtual

return the name of the plugin

Implements PluginBase.

◆ init()

void CavityWriter::init ( ParticleContainer particleContainer,
DomainDecompBase domainDecomp,
Domain domain 
)
finalvirtual

Set all necessary variables for each CavityEnsemble. One is used per Component. Ensembles are assigned subDomains depending on the rank of the MPI process. Also, if a smaller controlVolume is specified it gets passed here.

Parameters
particleContainer
domainDecomp
domain

Implements PluginBase.

◆ readXML()

void CavityWriter::readXML ( XMLfileUnits xmlconfig)
finalvirtual

reads in parameters for CavityEnsemble and output
writefrequency: output timestep frequency AFTER initStatistics timesteps
componentid: can be multiple. Starts separate CavityEnsembles for each component.
radius: search radius around pseudo-molecules to look for neighbors with componentid=0/1...
maxNeighbours: number of neighbours allowed in radius for a pseudo-molecule to count as a cavity
Nx,Ny,Nz: grid numbers for grid of pseudo-molecules, sampling cavity properties at their grid position

for non-overlapping coverage: radius*N_xyz = domainSize_xyz

<plugin name="CavityWriter" enabled="1">
<writefrequency>10</writefrequency>
<componentid>0</componentid>
<componentid>1</componentid>
<radius>2.0</radius>
<maxNeighbours>1</maxNeighbours>
<Nx>40</Nx>
<Ny>40</Ny>
<Nz>40</Nz>
<ControlVolume>
<x0> LowerBound (1.0) </x0>
<x1> UpperBound (2.0) </x1>
<y0> LowerBound (1.0) </y0>
<y1> UpperBound (2.0) </y1>
<z0> LowerBound (1.0) </z0>
<z1> UpperBound (2.0) </z1>
</ControlVolume>
</plugin>
Parameters
xmlconfig

Implements PluginBase.


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