16 namespace unstructured {
18 class VTUTextFileWriter;
112 const std::string& metaDataFilename,
113 const std::vector< std::string >& files
286 virtual void plotCell(
int index,
double value )
override;
289 virtual void plotCell(
int index,
double* values,
int numberOfValues )
override;
344 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
VTUTextFileWriter & _myWriter
Underlying VTU writer.
const std::string _identifier
Only required for assertions.
CellDataWriter(const CellDataWriter ©)
virtual void plotCell(int index, double value) override
Write data for one cell.
virtual void plotCell(int index, const tarch::la::Vector< 2, double > &value) override
virtual void assignRemainingCellsDefaultValues() override
virtual void plotCell(int index, double *values, int numberOfValues) override
std::ostringstream _out
Output stream.
int _lastWriteCommandCellNumber
Is set to -1 in the beginning and then incremented by each data plot call.
virtual ~CellDataWriter()
virtual void close() override
If you close your writer, each cell/vertex has to be assigned a value, i.e.
CellDataWriter(const std::string &dataIdentifier, VTUTextFileWriter &writer, int recordsPerCell, std::string dataType)
double getMinValue() const
virtual void plotCell(int index, const tarch::la::Vector< 3, double > &value) override
const std::string _dataType
virtual int plotLine(int vertexIndex[2]) override
std::ostringstream _offsetsOut
Output stream.
virtual int plotPoint(int vertexIndex) override
const std::string _dataType
VTUTextFileWriter & _myWriter
Underlying VTU writer.
CellWriter(const CellWriter &writer)
CellWriter(VTUTextFileWriter &writer, std::string datatype)
virtual void close() override
int _currentCellNumber
Counter for the elements written.
std::ostringstream _connectivityOut
Output stream.
virtual int plotQuadrangle(int vertexIndex[4]) override
std::ostringstream _typesOut
Output stream.
virtual int plotHexahedron(int vertexIndex[8]) override
virtual int plotTriangle(int vertexIndex[3]) override
virtual void plotVertex(int index, double *values, int numberOfValues) override
VertexDataWriter(const VertexDataWriter ©)
double getMinValue() const
VTUTextFileWriter & _myWriter
Underlying VTU writer.
VertexDataWriter(const std::string &dataIdentifier, VTUTextFileWriter &writer, int recordsPerVertex, std::string dataType)
virtual void close() override
std::ostringstream _out
Output stream.
virtual ~VertexDataWriter()
virtual void plotVertex(int index, const tarch::la::Vector< 3, double > &value) override
virtual void assignRemainingVerticesDefaultValues() override
int _lastWriteCommandVertexNumber
const std::string _dataType
virtual void plotVertex(int index, double value) override
Write data for one cell.
double getMaxValue() const
virtual void plotVertex(int index, const tarch::la::Vector< 2, double > &value) override
This is the vertex writer you have to create to plot the vertices.
virtual int plotVertex(const tarch::la::Vector< 2, double > &position) override
virtual void close() override
VertexWriter(VTUTextFileWriter &writer, std::string datatype)
VTUTextFileWriter & _myWriter
Underlying VTU writer.
const std::string _dataType
either "float" or "double" depending on _precision
std::ostringstream _out
Output stream.
VertexWriter(const VertexWriter &writer)
Do not copy a vertex writer.
int _currentVertexNumber
Counter for the vertices written.
virtual int plotVertex(const tarch::la::Vector< 3, double > &position) override
std::string _cellDataDescription
void writeMetaDataFileForParallelSnapshot(const std::string &metaDataFilename, const std::vector< std::string > &files)
This can be called on any writer (if there are multiple ones in a parallel run), but it cannot be sta...
virtual VertexWriter * createVertexWriter() override
Caller has to destroy this instance manually.
static tarch::logging::Log _log
Logging device.
virtual bool writeToFile() override
void validateDataWriterIdentifier(const std::string &identifier) const
virtual void clear() override
Clear the writer, i.e.
int _numberOfCells
Total number of cells.
static const std::string HEADER
std::string _vertexDataDescription
std::string _parallelCellDataDescription
virtual VertexDataWriter * createVertexDataWriter(const std::string &identifier, int recordsPerVertex) override
Caller has to destroy this instance manually.
const std::string _dataType
std::string _vertexDescription
virtual CellWriter * createCellWriter() override
Caller has to destroy this instance manually.
std::string _cellDescription
std::string _parallelVertexDataDescription
virtual CellDataWriter * createCellDataWriter(const std::string &identifier, int recordsPerCell) override
Caller has to destroy this instance manually.
virtual ~VTUTextFileWriter()
virtual bool isOpen() override
VTUTextFileWriter(const std::string &fileName, const std::string &indexFileName, tarch::plotter::PVDTimeSeriesWriter::IndexFileMode modeFile, double timeStamp, const int precision=6)
int _numberOfVertices
Total number of vertices.
Have to include this header, as I need access to the SYCL_EXTERNAL keyword.