Peano
Loading...
Searching...
No Matches
tarch.plotter::pointdata::vtk::VTKWriter::PointDataWriter Class Reference

A writer to assign points a value. More...

#include <VTKWriter.h>

Inheritance diagram for tarch.plotter::pointdata::vtk::VTKWriter::PointDataWriter:
Collaboration diagram for tarch.plotter::pointdata::vtk::VTKWriter::PointDataWriter:

Public Member Functions

 PointDataWriter (VTKWriter &myWriter, const std::string &identifier, int recordsPerPoint)
 
virtual ~PointDataWriter ()
 
virtual void plot (int index, double value) override
 Write data for one point.
 
virtual void plot (int index, const tarch::la::Vector< 1, double > &value) override
 
virtual void plot (int index, const tarch::la::Vector< 2, double > &value) override
 
virtual void plot (int index, const tarch::la::Vector< 3, double > &value) override
 
virtual void plot (int index, double *values, int numberOfValues) override
 
virtual void close () override
 If you close your writer, each point has to be assigned a value, i.e.
 
virtual void assignRemainingPointsDefaultValues () override
 

Private Attributes

VTKWriter & _myWriter
 Underlying VTK writer.
 
tarch::plotter::griddata::unstructured::UnstructuredGridWriter::VertexDataWriter * _particleDataWriter
 

Detailed Description

A writer to assign points a value.

Definition at line 108 of file VTKWriter.h.

Constructor & Destructor Documentation

◆ PointDataWriter()

tarch.plotter::pointdata::vtk::VTKWriter::PointDataWriter::PointDataWriter ( VTKWriter &  myWriter,
const std::string &  identifier,
int  recordsPerPoint 
)

◆ ~PointDataWriter()

virtual tarch.plotter::pointdata::vtk::VTKWriter::PointDataWriter::~PointDataWriter ( )
virtual

Member Function Documentation

◆ assignRemainingPointsDefaultValues()

virtual void tarch.plotter::pointdata::vtk::VTKWriter::PointDataWriter::assignRemainingPointsDefaultValues ( )
overridevirtual

◆ close()

virtual void tarch.plotter::pointdata::vtk::VTKWriter::PointDataWriter::close ( )
overridevirtual

If you close your writer, each point has to be assigned a value, i.e.

you may not add less data than you have points.

Implementation

The point writer (master class) does hold a writer for cells and one for vertices. This are used via plotPoints(). When we close the data writer, we first have to close both vertex and cell writer. For unstructured grids, we expect users to do this manually.

Here, we work with a lazy close mechanism. We check whether the vertices and cells are shutdown alerady. If not, we do it. Then we continue. This lazy implicit closing implies that we need another check in the master class, as there might situations where users dump particles without any data, i.e. this close() is never invoked.

Implements tarch.plotter::pointdata::PointWriter::PointDataWriter.

◆ plot() [1/5]

virtual void tarch.plotter::pointdata::vtk::VTKWriter::PointDataWriter::plot ( int  index,
const tarch::la::Vector< 1, double > &  value 
)
overridevirtual

◆ plot() [2/5]

virtual void tarch.plotter::pointdata::vtk::VTKWriter::PointDataWriter::plot ( int  index,
const tarch::la::Vector< 2, double > &  value 
)
overridevirtual

◆ plot() [3/5]

virtual void tarch.plotter::pointdata::vtk::VTKWriter::PointDataWriter::plot ( int  index,
const tarch::la::Vector< 3, double > &  value 
)
overridevirtual

◆ plot() [4/5]

virtual void tarch.plotter::pointdata::vtk::VTKWriter::PointDataWriter::plot ( int  index,
double *  values,
int  numberOfValues 
)
overridevirtual

◆ plot() [5/5]

virtual void tarch.plotter::pointdata::vtk::VTKWriter::PointDataWriter::plot ( int  index,
double  value 
)
overridevirtual

Write data for one point.

Parameters
indexIndex of the point. This index has to equal the index used for the point.
valueValue for the point.

Implements tarch.plotter::pointdata::PointWriter::PointDataWriter.

Field Documentation

◆ _myWriter

VTKWriter& tarch.plotter::pointdata::vtk::VTKWriter::PointDataWriter::_myWriter
private

Underlying VTK writer.

Definition at line 113 of file VTKWriter.h.

◆ _particleDataWriter

tarch::plotter::griddata::unstructured::UnstructuredGridWriter::VertexDataWriter* tarch.plotter::pointdata::vtk::VTKWriter::PointDataWriter::_particleDataWriter
private

Definition at line 115 of file VTKWriter.h.


The documentation for this class was generated from the following file: