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

#include <VTKGridWriter.h>

Inheritance diagram for VTKGridWriter:
PluginBase

Public Member Functions

 VTKGridWriter ()
 
 VTKGridWriter (unsigned int frequency, std::string name)
 
virtual void init (ParticleContainer *particleContainer, DomainDecompBase *domainDecomp, Domain *domain)
 Method init will be called at the begin of the simulation. More...
 
virtual void endStep (ParticleContainer *particleContainer, DomainDecompBase *domainDecomp, Domain *domain, unsigned long simstep)
 
virtual void finish (ParticleContainer *particleContainer, DomainDecompBase *domainDecomp, Domain *domain)
 NOP. More...
 
std::string getPluginName ()
 return the name of the plugin More...
 
void readXML (XMLfileUnits &xmlconfig)
 Method readXML will be called once for each plugin section in the input file. 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

This class acts as adapter to the VTKGridWriterImplementation, which handles the actual xml writing. It is a friend class of LinkedCells, but reads only its internal data to generate the vtk output.

Constructor & Destructor Documentation

◆ VTKGridWriter()

VTKGridWriter::VTKGridWriter ( )
Parameters
containerthe LinkedCells particle container. It has to be the same container which is handed in to the methods initOutput() / doOutput() / finishOutput()!

Member Function Documentation

◆ endStep()

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

creates the VTKGrid and sets all the data, which is then written out.

Note
As the gridwriter isn't notified when the particleContainer is changed (i.e. rebuild()), it is not sufficient to build up the vtkgrid once and only renew the information every iteration. Thus every time output is done, the methods setupVTKGrid() and releaseVTKGrid() are called.

Implements PluginBase.

◆ finish()

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

NOP.

Implements PluginBase.

◆ getPluginName()

std::string VTKGridWriter::getPluginName ( )
inlinevirtual

return the name of the plugin

Implements PluginBase.

◆ init()

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

Method readXML will be called once for each plugin section in the input file.

This method can be used to read in parameters from the corresponding plugin section in the xml config file. The method will be called once after an instance of the plugin is created.

Note
The same plugins may be specified multiple times in the xml config file. It is the responsibility of the plugin to handle this case in a propper way.

The following xml object structure will be provided to the plugin:

<plugin name="plugin name">
<!-- options for the specific plugin -->
</plugin>
Parameters
xmlconfigsection of the xml file

Implements PluginBase.


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