ls1-MarDyn
ls1-MarDyn molecular dynamics code
VTKGridWriter.h
1/*
2 * VTKGridWriter.h
3 *
4 * @Date: 24.08.2010
5 * @Author: eckhardw
6 */
7
8#pragma once
9
10#ifndef MARDYN_AUTOPAS
11
12#include "plugins/PluginBase.h"
13#include "io/vtk/VTKGridCell.h"
14#include "io/vtk/VTKGridVertex.h"
15
16class LinkedCells;
18
24class VTKGridWriter : public PluginBase {
25
26private:
27
28 unsigned int _writeFrequency;
29
30 std::string _fileName;
31
32 VTKGridCell* _cells;
33
34 VTKGridVertex* _vertices;
35
37 int _numCells;
38
40 int _numVertices;
41
42public:
43
49
50 VTKGridWriter(unsigned int frequency, std::string name);
51
52 virtual ~~VTKGridWriter();
53
54 virtual void init(ParticleContainer *particleContainer,
55 DomainDecompBase *domainDecomp, Domain *domain);
56
66 virtual void endStep(
67 ParticleContainer *particleContainer, DomainDecompBase *domainDecomp,
68 Domain *domain, unsigned long simstep
69 );
70
71 virtual void finish(ParticleContainer *particleContainer,
72 DomainDecompBase *domainDecomp, Domain *domain);
73
75 return std::string("VTKGridWriter");
76 }
77 static PluginBase* createInstance() { return new VTKGridWriter(); }
78
79 void readXML(XMLfileUnits& xmlconfig);
80
81private:
82
83 void setupVTKGrid(ParticleContainer* particleContainer);
84
85 void releaseVTKGrid();
86
87 void getCellData(LinkedCells* container, VTKGridCell& cell);
88
89 void outputParallelVTKFile(unsigned int numProcs, unsigned long simstep,
91
92};
93
94#endif /* MARDYN_AUTOPAS */
handle boundary region and multiple processes
Definition: DomainDecompBase.h:51
This class is used to read in the phasespace and to handle macroscopic values.
Definition: Domain.h:47
Linked Cell Data Structure.
Definition: LinkedCells.h:51
This Interface is used to get access to particles and pairs of particles.
Definition: ParticleContainer.h:69
The PluginBase class provides the interface for any kind of output/plugin classes - called "(output) ...
Definition: PluginBase.h:47
Definition: VTKGridCell.h:16
Definition: VTKGridVertex.h:14
Definition: VTKGridWriterImplementation.h:23
Definition: VTKGridWriter.h:24
virtual void finish(ParticleContainer *particleContainer, DomainDecompBase *domainDecomp, Domain *domain)
NOP.
Definition: VTKGridWriter.cpp:188
virtual void endStep(ParticleContainer *particleContainer, DomainDecompBase *domainDecomp, Domain *domain, unsigned long simstep)
Definition: VTKGridWriter.cpp:43
void readXML(XMLfileUnits &xmlconfig)
Method readXML will be called once for each plugin section in the input file.
Definition: VTKGridWriter.cpp:31
VTKGridWriter()
Definition: VTKGridWriter.cpp:21
std::string getPluginName()
return the name of the plugin
Definition: VTKGridWriter.h:74
virtual void init(ParticleContainer *particleContainer, DomainDecompBase *domainDecomp, Domain *domain)
Method init will be called at the begin of the simulation.
Definition: VTKGridWriter.cpp:113
XML file with unit attributes abstraction.
Definition: xmlfileUnits.h:25
::xsd::cxx::tree::name< char, token > name
C++ type corresponding to the Name XML Schema built-in type.
Definition: vtk-punstructured.h:288
::xsd::cxx::tree::string< char, simple_type > string
C++ type corresponding to the string XML Schema built-in type.
Definition: vtk-punstructured.h:270
typedef::xsd::cxx::tree::type container
Alias for the anyType type.
Definition: vtk-punstructured.h:130