-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathh5cgnsfile.h
83 lines (57 loc) · 1.52 KB
/
h5cgnsfile.h
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#ifndef H5CGNSFILE_H
#define H5CGNSFILE_H
#include "h5cgnsfilesolutionwriter.h"
#include "iriclib_global.h"
#include <string>
namespace iRICLib {
class H5CgnsBase;
class H5CgnsFileSolutionReader;
class H5CgnsFileSolutionWriter;
class H5CgnsZone;
class IRICLIBDLL H5CgnsFile
{
public:
enum class Mode {
Create,
OpenModify,
OpenReadOnly
};
H5CgnsFile(const std::string& fileName, Mode mode, const std::string& resultFolder = "result");
~H5CgnsFile();
int open();
int close();
Mode mode() const;
std::string fileName() const;
std::string tmpFileName() const; // temporary file used to read result while running
std::string resultFolder() const;
int baseNum() const;
H5CgnsBase* base();
H5CgnsBase* base(int dim, bool forceCreate = false);
H5CgnsBase* baseById(int bid);
H5CgnsBase* ccBase() const;
bool baseExists(int dim) const;
int deleteResult();
int copyExceptSolution(H5CgnsFile* copyTarget);
int zoneNum() const;
H5CgnsZone* zoneById(int zid);
int writeTime(double time);
int writeIteration(int iteration);
int setSolutionId(int solutionId);
int copyGridsTo(H5CgnsFile* target);
int flush();
int getGridId(H5CgnsZone* zone, int* gridId);
int lastGridId(int* id);
H5CgnsFileSolutionReader* solutionReader();
H5CgnsFileSolutionWriter* solutionWriter();
void setWriterMode(H5CgnsFileSolutionWriter::Mode mode);
private:
class Impl;
Impl* impl;
public:
friend class H5CgnsBase;
};
} // namespace iRICLib
#ifdef _DEBUG
#include "private/h5cgnsfile_impl.h"
#endif // _DEBUG
#endif // H5CGNSFILE_H