IFEM 90A354
HDF5Restart.h
Go to the documentation of this file.
1// $Id$
2//==============================================================================
12//==============================================================================
13
14#ifndef _HDF5_RESTART_H
15#define _HDF5_RESTART_H
16
17#include "HDF5Base.h"
18#include <map>
19
20class TimeStep;
21
22
31class HDF5Restart : public HDF5Base
32{
33public:
34 typedef std::map<std::string,std::string> SerializeData;
35
41 HDF5Restart(const std::string& name, const ProcessAdm& adm,
42 int stride = 1, int level0 = 0);
43
46 bool dumpStep(const TimeStep& tp);
47
50 bool writeData(const SerializeData& data);
51
57 int readData(SerializeData& data, int level = -1, bool basis = false);
58
60 int getTimeLevel() const { return m_level; }
61
62private:
64 int m_level;
65 int m_last;
66};
67
68#endif
Base class for interacting with HDF5 files.
Base class for interacting with HDF5 files.
Definition HDF5Base.h:30
Write and read restart data using a HDF5 file.
Definition HDF5Restart.h:32
int getTimeLevel() const
Returns current time level.
Definition HDF5Restart.h:60
int m_stride
Time step stride between outputs.
Definition HDF5Restart.h:63
int m_last
Last time step that was written.
Definition HDF5Restart.h:65
bool dumpStep(const TimeStep &tp)
Returns whether or not restart data should be output.
Definition HDF5Restart.C:40
int m_level
Current time level for restart output.
Definition HDF5Restart.h:64
bool writeData(const SerializeData &data)
Writes restart data to file.
Definition HDF5Restart.C:50
int readData(SerializeData &data, int level=-1, bool basis=false)
Reads restart data from file.
Definition HDF5Restart.C:160
std::map< std::string, std::string > SerializeData
Convenience type.
Definition HDF5Restart.h:34
Class for administration of MPI processes in IFEM library.
Definition ProcessAdm.h:33
Class for encapsulation of general time stepping parameters.
Definition TimeStep.h:31