Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/*
* Distributed under the OSI-approved Apache License, Version 2.0. See
* accompanying file Copyright.txt for details.
*
* HDF5CommonP.h
*
* Created on: March 20, 2017
* Author: Junmin
*/
#ifndef HDF5_COMMON_P_H_
#define HDF5_COMMON_P_H_
#include "core/Engine.h"
#include "ADIOS_MPI.h"
#include <hdf5.h>
namespace adios
{
class HDF5Common
{
public:
/**
* Constructor for HDF5 file
* @param file name
*/
HDF5Common();
virtual ~HDF5Common();
void H5_Init(const std::string name, MPI_Comm m_MPIComm, bool toWrite);
void H5_Close();
void H5_Advance(int totalts);
int GetNumTimeSteps();
void WriteTimeSteps();
hid_t _plist_id, _file_id;
hid_t _group_id;
hid_t DefH5T_COMPLEX_DOUBLE;
hid_t DefH5T_COMPLEX_FLOAT;
hid_t DefH5T_COMPLEX_LongDOUBLE;
int _currentTimeStep;
private:
void H5_AdvanceWrite();
bool _writeMode;
int _total_timestep;
};
} // end namespace adios
#endif /* HDF5_COMMON_P_H_ */