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