Peano
Loading...
Searching...
No Matches
tarch.plotter::griddata::blockstructured::PatchWriter Class Referenceabstract

Abstract base class for a patch plotter. More...

#include <PatchWriter.h>

Inheritance diagram for tarch.plotter::griddata::blockstructured::PatchWriter:

Data Structures

class  CellDataWriter
 A writer for scalar data on elements. More...
 
class  VertexDataWriter
 A writer for scalar data on points (vertices). More...
 

Public Member Functions

virtual ~PatchWriter ()=default
 
virtual bool writeToFile ()=0
 
virtual bool isOpen ()=0
 
virtual void clear ()=0
 Clear the writer, i.e.
 
virtual int plotPatch (const tarch::la::Vector< 2, double > &offset, const tarch::la::Vector< 2, double > &size)=0
 
virtual int plotPatch (const tarch::la::Vector< 3, double > &offset, const tarch::la::Vector< 3, double > &size)=0
 
virtual CellDataWriter * createCellDataWriter (const std::string &identifier, int unknownsPerAxis, int recordsPerCell, const std::string &description)=0
 Create cell data writer.
 
virtual CellDataWriter * createCellDataWriter (const std::string &identifier, int unknownsPerAxis, int recordsPerCell, const std::string &description, const std::string &metaData)=0
 Create cell data writer.
 
virtual CellDataWriter * createCellDataWriter (const std::string &identifier, int unknownsPerAxis, int recordsPerCell, const std::string &description, const std::string &metaData, double *mapping)=0
 Create writer.
 
virtual VertexDataWriter * createVertexDataWriter (const std::string &identifier, int unknownsPerAxis, int recordsPerVertex, const std::string &description)=0
 Create vertex data writer.
 
virtual VertexDataWriter * createVertexDataWriter (const std::string &identifier, int unknownsPerAxis, int recordsPerVertex, const std::string &description, const std::string &metaData)=0
 Create vertex data writer.
 
virtual VertexDataWriter * createVertexDataWriter (const std::string &identifier, int unknownsPerAxis, int recordsPerVertex, const std::string &description, const std::string &metaData, double *mapping)=0
 Create writer.
 

Detailed Description

Abstract base class for a patch plotter.

Patch plotters are either wrappers around existing plotters or real plotters. This is their abstract interface.

Author
Kristof Unterweger, Tobias Weinzierl

Definition at line 26 of file PatchWriter.h.

Constructor & Destructor Documentation

◆ ~PatchWriter()

virtual tarch.plotter::griddata::blockstructured::PatchWriter::~PatchWriter ( )
virtualdefault

Member Function Documentation

◆ clear()

virtual void tarch.plotter::griddata::blockstructured::PatchWriter::clear ( )
pure virtual

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.

Implemented in tarch.plotter::griddata::blockstructured::PeanoBinaryPatchFileWriter, tarch.plotter::griddata::blockstructured::PeanoHDF5PatchFileWriter, and tarch.plotter::griddata::blockstructured::PeanoTextPatchFileWriter.

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

Here is the caller graph for this function:

◆ createCellDataWriter() [1/3]

virtual CellDataWriter * tarch.plotter::griddata::blockstructured::PatchWriter::createCellDataWriter ( const std::string &  identifier,
int  unknownsPerAxis,
int  recordsPerCell,
const std::string &  description 
)
pure virtual

Create cell data writer.

Wrapper around createCellDataWriter(std::string, int, int, std::string, std::string, double*) with default values. Please consult description of the more elaborate routine for details.

Implemented in tarch.plotter::griddata::blockstructured::PeanoBinaryPatchFileWriter, tarch.plotter::griddata::blockstructured::PeanoHDF5PatchFileWriter, and tarch.plotter::griddata::blockstructured::PeanoTextPatchFileWriter.

◆ createCellDataWriter() [2/3]

virtual CellDataWriter * tarch.plotter::griddata::blockstructured::PatchWriter::createCellDataWriter ( const std::string &  identifier,
int  unknownsPerAxis,
int  recordsPerCell,
const std::string &  description,
const std::string &  metaData 
)
pure virtual

Create cell data writer.

Wrapper around createCellDataWriter(std::string, int, int, std::string, std::string, double*) with default values. Please consult description of the more elaborate routine for details.

Implemented in tarch.plotter::griddata::blockstructured::PeanoBinaryPatchFileWriter, tarch.plotter::griddata::blockstructured::PeanoHDF5PatchFileWriter, and tarch.plotter::griddata::blockstructured::PeanoTextPatchFileWriter.

◆ createCellDataWriter() [3/3]

virtual CellDataWriter * tarch.plotter::griddata::blockstructured::PatchWriter::createCellDataWriter ( const std::string &  identifier,
int  unknownsPerAxis,
int  recordsPerCell,
const std::string &  description,
const std::string &  metaData,
double *  mapping 
)
pure virtual

Create writer.

Caller has to destroy this instance manually.

Parameters
identifierName of your data. I recommend to stick to C++ identifier rules for this one, i.e. no fancy chars and no spaces
unknownsPerAxisWe plot a (logically) Cartesian piece of data. This is the number of unknowns per axis
recordsPerVertexNumber of entries stores per unknown. Data is, by default, written as AoS
descriptionThis is a description of the data. Should be a one-liner.
metaDataFurther meta data without prescribed semantics. Can be a longer text block.
mappingArray of positions within a unit cube/square. It is an AoS of vectors within the unit square which distorts all the plotting points within the logical Cartesian mesh imposed over the unit cube. By default, all data are Cartesian and spaced out equidistantly, i.e. if you have 4x4 data points per cell, then you get a chess board pattern of 16 smaller cubes over the cell in 2d. However, you might prefer something like Gauss Lobatto nodes, and then the data are not spaced out uniformly anymore.

Implemented in tarch.plotter::griddata::blockstructured::PeanoBinaryPatchFileWriter, tarch.plotter::griddata::blockstructured::PeanoHDF5PatchFileWriter, and tarch.plotter::griddata::blockstructured::PeanoTextPatchFileWriter.

◆ createVertexDataWriter() [1/3]

virtual VertexDataWriter * tarch.plotter::griddata::blockstructured::PatchWriter::createVertexDataWriter ( const std::string &  identifier,
int  unknownsPerAxis,
int  recordsPerVertex,
const std::string &  description 
)
pure virtual

Create vertex data writer.

Wrapper around createVertexDataWriter(std::string, int, int, std::string, std::string, double*) with default values. Please consult description of the more elaborate routine for details.

Implemented in tarch.plotter::griddata::blockstructured::PeanoBinaryPatchFileWriter, tarch.plotter::griddata::blockstructured::PeanoHDF5PatchFileWriter, and tarch.plotter::griddata::blockstructured::PeanoTextPatchFileWriter.

◆ createVertexDataWriter() [2/3]

virtual VertexDataWriter * tarch.plotter::griddata::blockstructured::PatchWriter::createVertexDataWriter ( const std::string &  identifier,
int  unknownsPerAxis,
int  recordsPerVertex,
const std::string &  description,
const std::string &  metaData 
)
pure virtual

Create vertex data writer.

Wrapper around createVertexDataWriter(std::string, int, int, std::string, std::string, double*) with default values. Please consult description of the more elaborate routine for details.

Implemented in tarch.plotter::griddata::blockstructured::PeanoBinaryPatchFileWriter, tarch.plotter::griddata::blockstructured::PeanoHDF5PatchFileWriter, and tarch.plotter::griddata::blockstructured::PeanoTextPatchFileWriter.

◆ createVertexDataWriter() [3/3]

virtual VertexDataWriter * tarch.plotter::griddata::blockstructured::PatchWriter::createVertexDataWriter ( const std::string &  identifier,
int  unknownsPerAxis,
int  recordsPerVertex,
const std::string &  description,
const std::string &  metaData,
double *  mapping 
)
pure virtual

Create writer.

Caller has to destroy this instance manually.

Parameters
identifierName of your data. I recommend to stick to C++ identifier rules for this one, i.e. no fancy chars and no spaces
unknownsPerAxisWe plot a (logically) Cartesian piece of data. This is the number of unknowns per axis
recordsPerVertexNumber of entries stores per unknown. Data is, by default, written as AoS
descriptionThis is a description of the data. Should be a one-liner.
metaDataFurther meta data without prescribed semantics. Can be a longer text block.
mappingArray of positions within a unit cube/square. It is an AoS of vectors within the unit square which distorts all the plotting points within the logical Cartesian mesh imposed over the unit cube. By default, all data are Cartesian and spaced out equidistantly, i.e. if you have 4x4 data points per cell, then you get a chess board pattern of 16 smaller cubes over the cell in 2d. However, you might prefer something like Gauss Lobatto nodes, and then the data are not spaced out uniformly anymore.

Implemented in tarch.plotter::griddata::blockstructured::PeanoBinaryPatchFileWriter, tarch.plotter::griddata::blockstructured::PeanoHDF5PatchFileWriter, and tarch.plotter::griddata::blockstructured::PeanoTextPatchFileWriter.

◆ isOpen()

virtual bool tarch.plotter::griddata::blockstructured::PatchWriter::isOpen ( )
pure virtual

◆ plotPatch() [1/2]

virtual int tarch.plotter::griddata::blockstructured::PatchWriter::plotPatch ( const tarch::la::Vector< 2, double > &  offset,
const tarch::la::Vector< 2, double > &  size 
)
pure virtual

◆ plotPatch() [2/2]

virtual int tarch.plotter::griddata::blockstructured::PatchWriter::plotPatch ( const tarch::la::Vector< 3, double > &  offset,
const tarch::la::Vector< 3, double > &  size 
)
pure virtual

◆ writeToFile()

virtual bool tarch.plotter::griddata::blockstructured::PatchWriter::writeToFile ( )
pure virtual

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