6#include "../../../PVDTimeSeriesWriter.h"
14 namespace unstructured {
16 class VTKBinaryFileWriter;
286 virtual void plotCell(
int index,
double value )
override;
289 virtual void plotCell(
int index,
double* values,
int numberOfValues )
override;
346 virtual void plotVertex(
int index,
double* values,
int numberOfValues )
override;
A writer for data on elements.
A writer for scalar data on points (vertices).
This is the vertex writer you have to create to plot the vertices.
double getMaxValue() const
CellDataWriter(const CellDataWriter ©)
CellDataWriter(const std::string &dataIdentifier, VTKBinaryFileWriter &writer, int recordsPerCell)
int _lastWriteCommandCellNumber
Is set to -1 in the beginning and then incremented by each data plot call.
virtual void plotCell(int index, double value) override
Write data for one cell.
const std::string _identifier
Only required for assertions.
double getMinValue() const
virtual void plotCell(int index, const tarch::la::Vector< 2, double > &value) override
virtual void plotCell(int index, const tarch::la::Vector< 3, double > &value) override
virtual void assignRemainingCellsDefaultValues() override
virtual void plotCell(int index, double *values, int numberOfValues) override
virtual void close() override
If you close your writer, each cell/vertex has to be assigned a value, i.e.
VTKBinaryFileWriter & _myWriter
Underlying VTK writer.
std::stringstream _out
Output stream.
virtual ~CellDataWriter()
virtual int plotLine(int vertexIndex[2]) override
std::stringstream _cellTypeOut
Output stream.
virtual int plotQuadrangle(int vertexIndex[4]) override
int _currentCellNumber
Counter for the elements written.
std::stringstream _cellOut
Output stream.
CellWriter(VTKBinaryFileWriter &writer)
virtual int plotPoint(int vertexIndex) override
virtual int plotTriangle(int vertexIndex[3]) override
VTKBinaryFileWriter & _myWriter
Underlying VTK writer.
virtual void close() override
CellWriter(const CellWriter &writer)
virtual int plotHexahedron(int vertexIndex[8]) override
int _cellListEntries
The tag CELLS in a vtk file requires the number of total entries in the following list of cell-interc...
virtual void plotVertex(int index, double value) override
Write data for one cell.
virtual void plotVertex(int index, const tarch::la::Vector< 2, double > &value) override
VTKBinaryFileWriter & _myWriter
Underlying VTK writer.
virtual void close() override
virtual void plotVertex(int index, const tarch::la::Vector< 3, double > &value) override
virtual ~VertexDataWriter()
int _lastWriteCommandVertexNumber
VertexDataWriter(const std::string &dataIdentifier, VTKBinaryFileWriter &writer, int recordsPerVertex)
double getMinValue() const
VertexDataWriter(const VertexDataWriter ©)
virtual void assignRemainingVerticesDefaultValues() override
std::stringstream _out
Output stream.
virtual void plotVertex(int index, double *values, int numberOfValues) override
double getMaxValue() const
This is the vertex writer you have to create to plot the vertices.
virtual void close() override
VertexWriter(const VertexWriter &writer)
Do not copy a vertex writer.
VertexWriter(VTKBinaryFileWriter &writer)
VTKBinaryFileWriter & _myWriter
Underlying VTK writer.
virtual int plotVertex(const tarch::la::Vector< 3, double > &position) override
std::stringstream _out
Output stream.
virtual int plotVertex(const tarch::la::Vector< 2, double > &position) override
int _currentVertexNumber
Counter for the vertices written.
std::stringstream _cellTypeDescription
std::stringstream _cellDataDescription
virtual VertexWriter * createVertexWriter() override
Caller has to destroy this instance manually.
std::stringstream _cellDescription
std::stringstream _vertexDataDescription
virtual void clear() override
Clear the writer, i.e.
static const std::string HEADER
const int _precision
precision
virtual CellWriter * createCellWriter() override
Caller has to destroy this instance manually.
int _numberOfCells
Total number of cells.
virtual CellDataWriter * createCellDataWriter(const std::string &identifier, int recordsPerCell) override
Caller has to destroy this instance manually.
const std::string _doubleOrFloat
either "float" or "double" depending on _precision
virtual bool writeToFile() override
int _numberOfVertices
Total number of vertices.
std::stringstream _vertexDescription
virtual VertexDataWriter * createVertexDataWriter(const std::string &identifier, int recordsPerVertex) override
Caller has to destroy this instance manually.
static tarch::logging::Log _log
Logging device.
virtual bool isOpen() override
VTKBinaryFileWriter(const std::string &fileName, const std::string &indexFileName, tarch::plotter::PVDTimeSeriesWriter::IndexFileMode modeFile, double timeStamp, const int precision=6)
virtual ~VTKBinaryFileWriter()
void validateDataWriterIdentifier(const std::string &identifier) const
std::string setDoubleOrFloatString(const int precision)
int _numberOfCellEntries
Total number of cell entries.
Have to include this header, as I need access to the SYCL_EXTERNAL keyword.