|
opm-simulators
|
Class for (de-)serializing using HDF5. More...
#include <HDF5Serializer.hpp>
Public Member Functions | |
| HDF5Serializer (const std::string &fileName, HDF5File::OpenMode mode, Parallel::Communication comm) | |
| template<class T > | |
| void | write (T &data, const std::string &group, const std::string &dset, HDF5File::DataSetMode mode=HDF5File::DataSetMode::PROCESS_SPLIT) |
| Serialize and write data to restart file. | |
| void | writeHeader (const std::string &simulator_name, const std::string &module_version, const std::string &time_stamp, const std::string &case_name, const std::string ¶ms, int num_procs) |
| Writes a header to the file. | |
| template<class T > | |
| void | read (T &data, const std::string &group, const std::string &dset, HDF5File::DataSetMode mode=HDF5File::DataSetMode::PROCESS_SPLIT) |
| Read data and deserialize from restart file. | |
| int | lastReportStep () const |
| Returns the last report step stored in file. | |
| std::vector< int > | reportSteps () const |
| Returns a list of report steps stored in restart file. | |
Class for (de-)serializing using HDF5.
|
inline |
Read data and deserialize from restart file.
| T | Type of class to read |
| data | Class to read restart data for |
| group | Group to read dataset from |
| dset | Data set to read |
| mode | Mode for dataset |
|
inline |
Serialize and write data to restart file.
| T | Type of class to write |
| data | Class to write restart data for |
| group | Group to write dataset to |
| dset | Data set to write |
| mode | Mode for dataset |
| void Opm::HDF5Serializer::writeHeader | ( | const std::string & | simulator_name, |
| const std::string & | module_version, | ||
| const std::string & | time_stamp, | ||
| const std::string & | case_name, | ||
| const std::string & | params, | ||
| int | num_procs | ||
| ) |
Writes a header to the file.
| simulator_name | Name of simulator used |
| module_version | Version of simulator used |
| time_stamp | Build time-stamp for simulator used |
| case_name | Name of case file is associated with |
| params | List of parameter values |
| num_procs | Number of processes used |