The HDF5Writer class writes output to HDF5 format.
More...
#include <alsfvm/io/HDF5Writer.hpp>
|
void | writeGrid (hid_t object, const grid::Grid &grid) |
|
void | writeTimeGroup (hid_t object, const simulator::TimestepInformation ×tepInformation) |
|
void | writeVolume (const volume::Volume &volume, hid_t file, hid_t accessList=H5P_DEFAULT) |
| writeVolume takes each variable of the volume and writes it More...
|
|
void | writeMemory (const volume::Volume &volume, size_t index, const std::string &name, hid_t file, hid_t accessList=H5P_DEFAULT) |
| writeMemory writes a memory area to disk More...
|
|
virtual std::unique_ptr< HDF5Resource > | createDatasetForMemory (const volume::Volume &volume, size_t index, const std::string &name, hid_t file) |
| createDatasetForMemroy creates a dataset for the given memory More...
|
|
void | writeMemoryToDataset (const volume::Volume &volume, size_t index, const std::string &name, hid_t dataset, hid_t accessList=H5P_DEFAULT) |
| createDatasetForMemroy creates a dataset for the given memory More...
|
|
void | writeString (hid_t object, const std::string &name, const std::string &value) |
| writeString writes the string as an attribute to the given object More...
|
|
void | writeFloats (hid_t object, const std::string &name, const std::vector< float > &values) |
| writeFloats writes the vector of floats as an attribute More...
|
|
void | writeIntegers (hid_t object, const std::string &name, const std::vector< int > &values) |
| writeIntegerss writes the vector of integers as an attribute More...
|
|
The HDF5Writer class writes output to HDF5 format.
- Note
- This class writes the output as VizSchema4, see https://ice.txcorp.com/trac/vizschema/wiki/WikiStart
-
The output can easily be opened in Visit and Paraview (but need new paraview version)
◆ HDF5Writer()
alsfvm::io::HDF5Writer::HDF5Writer |
( |
const std::string & |
basefileName | ) |
|
HDF5Writer constructs a new HDF5Writer.
- Parameters
-
basefileName | the basefilename to use (this could be eg. "some_simulation". |
- Note
- Timestep information will be added to the filename, as well as proper extension (.h5).
◆ ~HDF5Writer()
virtual alsfvm::io::HDF5Writer::~HDF5Writer |
( |
| ) |
|
|
inlinevirtual |
◆ createDatasetForMemory()
std::unique_ptr< HDF5Resource > alsfvm::io::HDF5Writer::createDatasetForMemory |
( |
const volume::Volume & |
volume, |
|
|
size_t |
index, |
|
|
const std::string & |
name, |
|
|
hid_t |
file |
|
) |
| |
|
protectedvirtual |
createDatasetForMemroy creates a dataset for the given memory
- Parameters
-
volume | the volume to read from |
index | the index of the memory area to read from |
name | the name of the memory (variable name) |
file | the file to write to |
Reimplemented in alsfvm::io::HDF5MPIWriter.
◆ write()
write writes the data to disk
- Parameters
-
conservedVariables | the conservedVariables to write |
grid | the grid currently used (includes whole domain, in case of mpi) |
timestepInformation | |
Implements alsfvm::io::Writer.
Reimplemented in alsfvm::io::HDF5MPIWriter.
◆ writeFloats()
void alsfvm::io::HDF5Writer::writeFloats |
( |
hid_t |
object, |
|
|
const std::string & |
name, |
|
|
const std::vector< float > & |
values |
|
) |
| |
|
protected |
writeFloats writes the vector of floats as an attribute
- Parameters
-
object | the object to write to |
name | the name of the attribute |
values | the values to write |
◆ writeGrid()
void alsfvm::io::HDF5Writer::writeGrid |
( |
hid_t |
object, |
|
|
const grid::Grid & |
grid |
|
) |
| |
|
protected |
Writes the grid to the file in VizSchema format
- Parameters
-
object | the object to write the grid to |
grid | the grid to use |
- Note
- This function creates a new group in object named "grid"
◆ writeIntegers()
void alsfvm::io::HDF5Writer::writeIntegers |
( |
hid_t |
object, |
|
|
const std::string & |
name, |
|
|
const std::vector< int > & |
values |
|
) |
| |
|
protected |
writeIntegerss writes the vector of integers as an attribute
- Parameters
-
object | the object to write to |
name | the name of the attribute |
values | the values to write |
◆ writeMemory()
void alsfvm::io::HDF5Writer::writeMemory |
( |
const volume::Volume & |
volume, |
|
|
size_t |
index, |
|
|
const std::string & |
name, |
|
|
hid_t |
file, |
|
|
hid_t |
accessList = H5P_DEFAULT |
|
) |
| |
|
protected |
writeMemory writes a memory area to disk
- Parameters
-
volume | the volume to read from |
index | the index of the memory area to read from |
name | the name of the memory (variable name) |
file | the file to write to |
accessList | used for parallel hdf5 |
◆ writeMemoryToDataset()
void alsfvm::io::HDF5Writer::writeMemoryToDataset |
( |
const volume::Volume & |
volume, |
|
|
size_t |
index, |
|
|
const std::string & |
name, |
|
|
hid_t |
dataset, |
|
|
hid_t |
accessList = H5P_DEFAULT |
|
) |
| |
|
protected |
createDatasetForMemroy creates a dataset for the given memory
- Parameters
-
volume | the volume to read from |
index | the index of the memory area to read from |
name | the name of the memory (variable name) |
dataset | the dataset to write to |
accessList | the accesslist to used (used for parallel hdf5) |
◆ writeString()
void alsfvm::io::HDF5Writer::writeString |
( |
hid_t |
object, |
|
|
const std::string & |
name, |
|
|
const std::string & |
value |
|
) |
| |
|
protected |
writeString writes the string as an attribute to the given object
- Parameters
-
object | the id of the (opened) object to write to |
name | the name of the attribute |
value | the string value |
◆ writeTimeGroup()
◆ writeVolume()
void alsfvm::io::HDF5Writer::writeVolume |
( |
const volume::Volume & |
volume, |
|
|
hid_t |
file, |
|
|
hid_t |
accessList = H5P_DEFAULT |
|
) |
| |
|
protected |
writeVolume takes each variable of the volume and writes it
- Parameters
-
volume | the volume to read from |
file | the file to write to |
accessList | used for parallel hdf5 |
◆ basefileName
const std::string alsfvm::io::HDF5Writer::basefileName |
|
protected |
◆ snapshotNumber
size_t alsfvm::io::HDF5Writer::snapshotNumber |
|
protected |
The documentation for this class was generated from the following files:
- /home/docs/checkouts/readthedocs.org/user_builds/alsvinn/checkouts/latest/alsfvm/include/alsfvm/io/HDF5Writer.hpp
- /home/docs/checkouts/readthedocs.org/user_builds/alsvinn/checkouts/latest/alsfvm/src/io/HDF5Writer.cpp