#include <BaseVTKWriter.h>
template<typename H>
class BaseVTKWriter< H >
- Template Parameters
-
H | some handler, e.g. particleHandler |
◆ BaseVTKWriter() [1/2]
H & handler_
particle handler from which the particles should be written
Definition: BaseVTKWriter.h:72
unsigned int fileCounter
Definition: BaseVTKWriter.h:74
References BaseVTKWriter< H >::fileCounter.
◆ BaseVTKWriter() [2/2]
◆ getFileCounter()
◆ makeVTKFileWithHeader()
- Todo:
- vtw wall files only need to be written by one processor
88 #ifdef MERCURYDPM_USE_MPI
96 fileName =
handler_.getDPMBase()->getName() +
101 fileName =
handler_.getDPMBase()->getName() +
108 file.open(fileName.c_str(), std::ios_base::out);
111 logger(
WARN,
"File % could not be opened", fileName);
115 file <<
"<?xml version=\"1.0\"?>\n";
116 file <<
"<!-- time " <<
handler_.getDPMBase()->getTime() <<
"-->\n";
117 file <<
"<VTKFile type=\"UnstructuredGrid\" version=\"0.1\" byte_order=\"LittleEndian\">\n";
118 file <<
"<UnstructuredGrid>\n";
#define PROCESSOR_ID
Definition: GeneralDefine.h:63
#define NUMBER_OF_PROCESSORS
For the MPI communication routines this quantity is often required. defining this macro makes the cod...
Definition: GeneralDefine.h:62
Logger< MERCURYDPM_LOGLEVEL > logger("MercuryKernel")
Definition of different loggers with certain modules. A user can define its own custom logger here.
std::string name
Definition: MercuryProb.h:48
References logger, units::name, NUMBER_OF_PROCESSORS, PROCESSOR_ID, and WARN.
◆ setFileCounter()
◆ writeVTK()
◆ writeVTKFooterAndClose()
template<typename T >
void BaseVTKWriter< T >::writeVTKFooterAndClose |
( |
std::fstream & |
file | ) |
const |
|
protected |
127 file <<
" <DataArray type=\"Int32\" Name=\"connectivity\" format=\"ascii\">\n";
128 file <<
" </DataArray>\n";
129 file <<
" <DataArray type=\"Int32\" Name=\"offsets\" format=\"ascii\">\n";
130 file <<
" </DataArray>\n";
131 file <<
" <DataArray type=\"UInt8\" Name=\"types\" format=\"ascii\">\n";
132 file <<
" </DataArray>\n";
133 file <<
"</Cells>\n";
134 file <<
"</Piece>\n";
135 file <<
"</UnstructuredGrid>\n";
136 file <<
"</VTKFile>\n";
◆ fileCounter
◆ handler_
particle handler from which the particles should be written
The documentation for this class was generated from the following file: