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

Implementation of the point data writer that basically maps the points onto a vtk text file, i.e. More...

#include <VTKWriter.h>

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

Data Structures

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

Public Member Functions

 VTKWriter (bool binaryFile, const std::string &fileName, const std::string &indexFileName, tarch::plotter::PVDTimeSeriesWriter::IndexFileMode modeFile, double timeStamp)
 
virtual ~VTKWriter ()
 
virtual bool writeToFile () override
 Before we write to a file, we have to close the.
 
virtual bool isOpen () override
 
virtual void clear () override
 Clear the writer, i.e.
 
virtual int plotPoint (const tarch::la::Vector< 2, double > &position) override
 
virtual int plotPoint (const tarch::la::Vector< 3, double > &position) override
 
virtual PointWriter::PointDataWriter * createPointDataWriter (const std::string &identifier, int recordsPerPoint) override
 Caller has to destroy this instance manually.
 
- Public Member Functions inherited from tarch.plotter::pointdata::PointWriter
virtual ~PointWriter ()=default
 

Private Member Functions

 VTKWriter (const VTKWriter &writer)=delete
 Copy constructor.
 
VTKWriter & operator= (const VTKWriter &writer)=delete
 Assignment operator.
 

Private Attributes

tarch::plotter::griddata::unstructured::UnstructuredGridWriter * _vtkWriter
 
tarch::plotter::griddata::unstructured::UnstructuredGridWriter::VertexWriter * _vertexWriter
 
tarch::plotter::griddata::unstructured::UnstructuredGridWriter::CellWriter * _cellWriter
 

Static Private Attributes

static tarch::mpi::BooleanSemaphore _sempahore
 This is a global (mpi) semaphore that I use to update/modify the index file over all files.
 

Detailed Description

Implementation of the point data writer that basically maps the points onto a vtk text file, i.e.

it uses the unstructured grid writer.

Implementation

Author
Tobias Weinzierl

Definition at line 35 of file VTKWriter.h.

Constructor & Destructor Documentation

◆ VTKWriter() [1/2]

tarch.plotter::pointdata::vtk::VTKWriter::VTKWriter ( const VTKWriter &  writer)
privatedelete

Copy constructor.

A writer never should be copied. However, we have to make this operation protected to allow implementations to hide their copy constructor as well.

◆ VTKWriter() [2/2]

tarch.plotter::pointdata::vtk::VTKWriter::VTKWriter ( bool  binaryFile,
const std::string &  fileName,
const std::string &  indexFileName,
tarch::plotter::PVDTimeSeriesWriter::IndexFileMode  modeFile,
double  timeStamp 
)
Parameters
fileNameName of the file to write. Has to be unique per dump.
indexFileNameName of the index file. Can we empty if you select NoIndexFile.

◆ ~VTKWriter()

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

Member Function Documentation

◆ clear()

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

Clear the writer, i.e.

erase all the data. However, as the writer does not track how many vertex and cell writers you've created, it's up to you to ensure that none of these instances is left.

Implements tarch.plotter::pointdata::PointWriter.

Referenced by peano4.api.output.Makefile.Makefile::__init__().

Here is the caller graph for this function:

◆ createPointDataWriter()

virtual PointWriter::PointDataWriter * tarch.plotter::pointdata::vtk::VTKWriter::createPointDataWriter ( const std::string &  identifier,
int  recordsPerPoint 
)
overridevirtual

Caller has to destroy this instance manually.

Implements tarch.plotter::pointdata::PointWriter.

◆ isOpen()

virtual bool tarch.plotter::pointdata::vtk::VTKWriter::isOpen ( )
overridevirtual
Returns
Whether writer is ready to accept data.

Implements tarch.plotter::pointdata::PointWriter.

◆ operator=()

VTKWriter & tarch.plotter::pointdata::vtk::VTKWriter::operator= ( const VTKWriter &  writer)
privatedelete

Assignment operator.

A writer never should be copied. However, we have to make this operation protected to allow implementations to hide their copy constructor as well.

◆ plotPoint() [1/2]

virtual int tarch.plotter::pointdata::vtk::VTKWriter::plotPoint ( const tarch::la::Vector< 2, double > &  position)
overridevirtual

◆ plotPoint() [2/2]

virtual int tarch.plotter::pointdata::vtk::VTKWriter::plotPoint ( const tarch::la::Vector< 3, double > &  position)
overridevirtual

◆ writeToFile()

virtual bool tarch.plotter::pointdata::vtk::VTKWriter::writeToFile ( )
overridevirtual

Before we write to a file, we have to close the.

  • vertex writer
  • call writer

However, we might have closed the point data plotters already and thus they might be down already. So we close them only if they are still up.

See also
PointDataWriter::close()

Implements tarch.plotter::pointdata::PointWriter.

Field Documentation

◆ _cellWriter

tarch::plotter::griddata::unstructured::UnstructuredGridWriter::CellWriter* tarch.plotter::pointdata::vtk::VTKWriter::_cellWriter
private

Definition at line 46 of file VTKWriter.h.

◆ _sempahore

tarch::mpi::BooleanSemaphore tarch.plotter::pointdata::vtk::VTKWriter::_sempahore
staticprivate

This is a global (mpi) semaphore that I use to update/modify the index file over all files.

The individual data writes are totally concurrent.

Definition at line 42 of file VTKWriter.h.

◆ _vertexWriter

tarch::plotter::griddata::unstructured::UnstructuredGridWriter::VertexWriter* tarch.plotter::pointdata::vtk::VTKWriter::_vertexWriter
private

Definition at line 45 of file VTKWriter.h.

◆ _vtkWriter

tarch::plotter::griddata::unstructured::UnstructuredGridWriter* tarch.plotter::pointdata::vtk::VTKWriter::_vtkWriter
private

Definition at line 44 of file VTKWriter.h.


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