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

Writes thermodynamic properties to a file. More...

#include <ResultWriter.h>

Inheritance diagram for ResultWriter:
PluginBase

Public Member Functions

virtual void readXML (XMLfileUnits &xmlconfig)
 Read in XML configuration for ResultWriter and all its included objects. More...
 
void init (ParticleContainer *particleContainer, DomainDecompBase *domainDecomp, Domain *domain)
 Method init will be called at the begin of the simulation. More...
 
void endStep (ParticleContainer *particleContainer, DomainDecompBase *domainDecomp, Domain *domain, unsigned long simstep)
 Method endStep will be called at the end of each time step. More...
 
void finish (ParticleContainer *particleContainer, DomainDecompBase *domainDecomp, Domain *domain)
 Method finish will be called at the end of the simulation. More...
 
std::string getPluginName ()
 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 afterForces (ParticleContainer *particleContainer, DomainDecompBase *domainDecomp, unsigned long simstep)
 Method afterForces will be called after forcefields have been applied no sitewise Forces can be applied 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

Writes thermodynamic properties to a file.

Writes the current value and the average over a specified number of time steps of values to a file with the file extension '.res'. The following values are written to the file:

Member Function Documentation

◆ endStep()

void ResultWriter::endStep ( ParticleContainer particleContainer,
DomainDecompBase domainDecomp,
Domain domain,
unsigned long  simstep 
)
virtual

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 ResultWriter::finish ( ParticleContainer particleContainer,
DomainDecompBase domainDecomp,
Domain domain 
)
virtual

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 ResultWriter::getPluginName ( )
inlinevirtual

return the name of the plugin

Implements PluginBase.

◆ init()

void ResultWriter::init ( ParticleContainer particleContainer,
DomainDecompBase domainDecomp,
Domain domain 
)
virtual

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 ResultWriter::readXML ( XMLfileUnits xmlconfig)
virtual

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

The following xml object structure is handled by this method:

<outputplugin name="ResultWriter">
<writefrequency>INTEGER</writefrequency> <!-- Frequency in which the output is written; Default: 1 -->
<outputprefix>STRING</outputprefix> <!-- Prefix of the output file; Default: "results" -->
<accumulation_steps>INTEGER</accumulation_steps> <!-- Result is accumulated over the specified steps; Default: 1000 -->
<writeprecision>UINTEGER</writeprecision> <!-- Precision of output can be set here; Default: 5 -->
</outputplugin>

Implements PluginBase.


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