|
Peano
|
HDF 5 writer. More...
#include <PeanoHDF5PatchFileWriter.h>


Data Structures | |
| class | CellDataWriter |
| class | VertexDataWriter |
Public Member Functions | |
| PeanoHDF5PatchFileWriter (int dimension, const std::string &filename, bool append, bool compress) | |
| virtual | ~PeanoHDF5PatchFileWriter () |
| virtual CellDataWriter * | createCellDataWriter (const std::string &identifier, int unknownsPerAxis, int recordsPerCell, const std::string &description) override |
| Caller has to destroy this instance manually. | |
| virtual CellDataWriter * | createCellDataWriter (const std::string &identifier, int unknownsPerAxis, int recordsPerCell, const std::string &description, const std::string &metaData) override |
| 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) override |
| The mapping is an additional field that has d * (n+1)^d doubles that describe how the vertices within a unit cube are distributed. | |
| virtual VertexDataWriter * | createVertexDataWriter (const std::string &identifier, int unknownsPerAxis, int recordsPerVertex, const std::string &description) override |
| Caller has to destroy this instance manually. | |
| virtual VertexDataWriter * | createVertexDataWriter (const std::string &identifier, int unknownsPerAxis, int recordsPerVertex, const std::string &description, const std::string &metaData) override |
| 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) override |
| Create writer. | |
| virtual int | plotPatch (const tarch::la::Vector< 2, double > &offset, const tarch::la::Vector< 2, double > &size) override |
| virtual int | plotPatch (const tarch::la::Vector< 3, double > &offset, const tarch::la::Vector< 3, double > &size) override |
| virtual bool | writeToFile () override |
| virtual bool | isOpen () override |
| virtual void | clear () override |
| Clear the writer, i.e. | |
| void | addMetaData (const std::string &metaData) |
Public Member Functions inherited from tarch::plotter::griddata::blockstructured::PatchWriter | |
| virtual | ~PatchWriter ()=default |
Protected Member Functions | |
| std::string | getNameOfCurrentDataset () const |
Protected Attributes | |
| const int | _dimensions |
| const bool | _compress |
| int | _vertexCounter |
| int | _cellCounter |
| bool | _isOpen |
| std::vector< double > | _geometryData |
| int | _numberOfActiveDataset |
| See the cookbook. | |
Static Protected Attributes | |
| static tarch::logging::Log | _log |
| static const std::string | HEADER |
HDF 5 writer.
This class works if and only if you have compiled Peano with –with-hdf5 (autotools).
Definition at line 31 of file PeanoHDF5PatchFileWriter.h.
| tarch::plotter::griddata::blockstructured::PeanoHDF5PatchFileWriter::PeanoHDF5PatchFileWriter | ( | int | dimension, |
| const std::string & | filename, | ||
| bool | append, | ||
| bool | compress ) |
|
virtual |
| void tarch::plotter::griddata::blockstructured::PeanoHDF5PatchFileWriter::addMetaData | ( | const std::string & | metaData | ) |
|
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::griddata::blockstructured::PatchWriter.
Referenced by peano4.output.Makefile.Makefile::__init__().

|
overridevirtual |
Caller has to destroy this instance manually.
Implements tarch::plotter::griddata::blockstructured::PatchWriter.
|
overridevirtual |
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.
Implements tarch::plotter::griddata::blockstructured::PatchWriter.
|
overridevirtual |
The mapping is an additional field that has d * (n+1)^d doubles that describe how the vertices within a unit cube are distributed.
d is the dimension of the plotter, n is the number of cells per axis.
Implements tarch::plotter::griddata::blockstructured::PatchWriter.
|
overridevirtual |
Caller has to destroy this instance manually.
Implements tarch::plotter::griddata::blockstructured::PatchWriter.
|
overridevirtual |
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.
Implements tarch::plotter::griddata::blockstructured::PatchWriter.
|
overridevirtual |
Create writer.
Caller has to destroy this instance manually.
| identifier | Name of your data. I recommend to stick to C++ identifier rules for this one, i.e. no fancy chars and no spaces |
| unknownsPerAxis | We plot a (logically) Cartesian piece of data. This is the number of unknowns per axis |
| recordsPerVertex | Number of entries stores per unknown. Data is, by default, written as AoS |
| description | This is a description of the data. Should be a one-liner. |
| metaData | Further meta data without prescribed semantics. Can be a longer text block. |
| mapping | Array 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. |
Implements tarch::plotter::griddata::blockstructured::PatchWriter.
|
protected |
|
overridevirtual |
Implements tarch::plotter::griddata::blockstructured::PatchWriter.
|
overridevirtual |
Implements tarch::plotter::griddata::blockstructured::PatchWriter.
|
overridevirtual |
Implements tarch::plotter::griddata::blockstructured::PatchWriter.
|
overridevirtual |
Implements tarch::plotter::griddata::blockstructured::PatchWriter.
|
protected |
Definition at line 40 of file PeanoHDF5PatchFileWriter.h.
|
protected |
Definition at line 37 of file PeanoHDF5PatchFileWriter.h.
|
protected |
Definition at line 36 of file PeanoHDF5PatchFileWriter.h.
Referenced by exahype2.Project.Project::__configure_makefile(), swift2.Project.Project::__configure_makefile(), api.Project.Project::__configure_makefile(), exahype2.Project.Project::__export_constants(), swift2.Project.Project::__export_constants(), api.Project.Project::__export_constants(), api.Project.Project::__init__(), solvers.api.ContinuousGalerkinDiscretisationGaussLobattoWithBlockJacobi.ContinuousGalerkinDiscretisationGaussLobattoWithBlockJacobi::_construct_narrow_to_interior_matrix(), scenarios.elastic_planar_waves.ElasticPlanarWaves::analytical_solution(), peano4.visualisation.output.Visualiser.PatchFileData::apply_renderer_to_data(), exahype2.Project.Project::generate_Peano4_project(), exahype2.kerneldsl.SyntaxTree.TSimpleMemref::get_dimensions(), exahype2.kerneldsl.SyntaxTree.Matrix::index(), scenarios.elastic_planar_waves.ElasticPlanarWaves::initial_conditions(), exahype2.kerneldsl.SyntaxTree.TDataBlock::is_nested_memref(), exahype2.kerneldsl.SyntaxTree.TSimpleMemref::print_mlir(), exahype2.kerneldsl.SyntaxTree.TDataBlock::print_mlir(), swift2.Project.Project::set_global_simulation_parameters(), api.Project.Project::set_global_simulation_parameters(), api.Project.Project::set_global_simulation_parameters(), exahype2.Project.Project::set_global_simulation_parameters(), and scenarios.scenario.Scenario::set_global_simulation_parameters().
|
protected |
Definition at line 50 of file PeanoHDF5PatchFileWriter.h.
|
protected |
Definition at line 48 of file PeanoHDF5PatchFileWriter.h.
|
staticprotected |
Definition at line 33 of file PeanoHDF5PatchFileWriter.h.
|
protected |
See the cookbook.
At any time, the writer pipes data only into one dataset (subdirectory) which is identified through a unique number. Yet, HDF5 works with identifiers (string) instead of numbers, so you have to convert it through getNameOfCurrentDataset().
Definition at line 58 of file PeanoHDF5PatchFileWriter.h.
|
protected |
Definition at line 39 of file PeanoHDF5PatchFileWriter.h.
|
staticprotected |
Definition at line 34 of file PeanoHDF5PatchFileWriter.h.