The HDF5MPIWriter write to the HDF5 format with MPI support.
More...
#include <alsfvm/io/HDF5MPIWriter.hpp>
|
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 | 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...
|
|
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 HDF5MPIWriter write to the HDF5 format with MPI support.
◆ HDF5MPIWriter()
alsfvm::io::HDF5MPIWriter::HDF5MPIWriter |
( |
const std::string & |
basefileName, |
|
|
const std::vector< std::string > & |
groupNames, |
|
|
size_t |
groupIndex, |
|
|
bool |
newFile, |
|
|
MPI_Comm |
mpiCommunicator, |
|
|
MPI_Info |
mpiInfo |
|
) |
| |
HDF5MPIWriter constructs a new HDF5Writer.
- Parameters
-
basefileName | the basefilename to use (this could be eg. "some_simulation". |
groupNames | names of groups to create in the file (this is especially useful for MPI) |
groupIndex | the groupIndex to write to |
mpiCommunicator | the given mpiCommunicator (used for pNETCDF) |
newFile | creates a new file if true, otherwise tries to open an already existing file (will fail if it does not exist or does not agree with our format). When in doubt, set it true for first sample save, then false |
mpiInfo | the mpiInfo (passed to pNetCDF) |
- Note
- Timestep information will be added to the filename, as well as proper extension (.h5).
◆ ~HDF5MPIWriter()
virtual alsfvm::io::HDF5MPIWriter::~HDF5MPIWriter |
( |
| ) |
|
|
inlinevirtual |
◆ createDatasetForMemory()
std::unique_ptr< HDF5Resource > alsfvm::io::HDF5MPIWriter::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 from alsfvm::io::HDF5Writer.
◆ write()
write writes the data to disk
- Parameters
-
conservedVariables | the conservedVariables to write |
grid | the grid that is used (describes the whole domain) |
timestepInformation | |
Reimplemented from alsfvm::io::HDF5Writer.
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/HDF5MPIWriter.hpp
- /home/docs/checkouts/readthedocs.org/user_builds/alsvinn/checkouts/latest/alsfvm/src/io/HDF5MPIWriter.cpp