|
IFEM
90A354
|
Write and read restart data using a HDF5 file. More...
#include <HDF5Restart.h>


Public Types | |
| typedef std::map< std::string, std::string > | SerializeData |
| Convenience type. | |
Public Member Functions | |
| HDF5Restart (const std::string &name, const ProcessAdm &adm, int stride=1, int level0=0) | |
| The constructor opens a named HDF5-file. More... | |
| bool | dumpStep (const TimeStep &tp) |
| Returns whether or not restart data should be output. More... | |
| bool | writeData (const SerializeData &data) |
| Writes restart data to file. More... | |
| int | readData (SerializeData &data, int level=-1, bool basis=false) |
| Reads restart data from file. More... | |
| int | getTimeLevel () const |
| Returns current time level. | |
Public Member Functions inherited from HDF5Base | |
| HDF5Base (const std::string &name, const ProcessAdm &adm) | |
| The constructor opens a named HDF5-file. More... | |
| virtual | ~HDF5Base () |
| The destructor closes the file. | |
Private Attributes | |
| int | m_stride |
| Time step stride between outputs. | |
| int | m_level |
| Current time level for restart output. | |
| int | m_last |
| Last time step that was written. | |
Additional Inherited Members | |
Protected Member Functions inherited from HDF5Base | |
| bool | openFile (unsigned int flag) |
| Opens the HDF5 file. More... | |
| void | closeFile () |
| Closes the HDF5 file. | |
Protected Attributes inherited from HDF5Base | |
| std::string | m_hdf5_name |
| The file name of the HDF5 file. | |
Write and read restart data using a HDF5 file.
The HDF5 restart handler writes and reads data using a HDF5 file. It supports parallel I/O, and can be used to add restart capability to applications.
| HDF5Restart::HDF5Restart | ( | const std::string & | name, |
| const ProcessAdm & | adm, | ||
| int | stride = 1, |
||
| int | level0 = 0 |
||
| ) |
The constructor opens a named HDF5-file.
| [in] | name | The name (without extension) of the data file |
| [in] | adm | The process administrator |
| [in] | stride | Restart data output stride |
| [in] | level0 | Time level to start output at (in case of new restart) |
References HDF5Base::m_hdf5_name.
| bool HDF5Restart::dumpStep | ( | const TimeStep & | tp | ) |
Returns whether or not restart data should be output.
| [in] | tp | Time stepping information |
References m_last, m_stride, and TimeStep::step.
Referenced by SIMSolver< T1 >::saveState().
| int HDF5Restart::readData | ( | SerializeData & | data, |
| int | level = -1, |
||
| bool | basis = false |
||
| ) |
Reads restart data from file.
| [out] | data | The map to store data in |
| [in] | level | Level to read (-1 to read last level in file) |
| [in] | basis | If true, read basis instead of data |
References HDF5Base::openFile().
Referenced by MultiStepSIM::checkForRestart(), SIMSolver< T1 >::restart(), and SIMinput::restartBasis().
| bool HDF5Restart::writeData | ( | const SerializeData & | data | ) |
Writes restart data to file.
| [in] | data | Data to write |
References HDF5Base::closeFile(), HDF5Base::m_hdf5_name, m_level, and HDF5Base::openFile().
Referenced by SIMSolver< T1 >::saveState().