-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathh5cgnszone.h
133 lines (107 loc) · 3.46 KB
/
h5cgnszone.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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
#ifndef H5CGNSZONE_H
#define H5CGNSZONE_H
#include "iriclib_global.h"
#include <hdf5.h>
#include <string>
#include <vector>
namespace iRICLib {
class H5CgnsBase;
class H5CgnsFlowSolution;
class H5CgnsGridAttributes;
class H5CgnsGridCoordinates;
class H5CgnsParticleGroupImageSolution;
class H5CgnsParticleGroupSolution;
class H5CgnsParticleSolution;
class H5CgnsPolyDataSolution;
class H5CgnsZoneBc;
class IRICLIBDLL H5CgnsZone
{
public:
static std::string label();
enum class Type {
Structured,
Unstructured
};
enum class CellType {
Triangle,
Line,
};
enum class SolutionPosition {
Null,
Node,
Cell,
IFace,
JFace,
KFace
};
H5CgnsZone(const std::string& name, hid_t groupId, H5CgnsBase* base); // for reading
H5CgnsZone(const std::string& name, Type type, const std::vector<int>& size, hid_t groupId, H5CgnsBase* base); // for creating
H5CgnsZone(const std::string& name, Type type, const std::vector<int>& size, H5CgnsBase* base); // for creating memory only
~H5CgnsZone();
hid_t groupId() const;
std::string name() const;
Type type() const;
std::vector<int> size() const;
int nodeCount() const;
int cellCount() const;
int iFaceCount() const;
int jFaceCount() const;
int kFaceCount() const;
int nodeDims(std::vector<hsize_t>* dims) const;
int cellDims(std::vector<hsize_t>* dims) const;
int iFaceDims(std::vector<hsize_t>* dims) const;
int jFaceDims(std::vector<hsize_t>* dims) const;
int kFaceDims(std::vector<hsize_t>* dims) const;
H5CgnsBase* base() const;
int solutionId() const;
int setSolutionId(int solId);
int getSolutionExists(bool* exists) const;
H5CgnsGridCoordinates* gridCoordinates() const;
H5CgnsGridAttributes* gridAttributes() const;
H5CgnsZoneBc* zoneBc() const;
int readUnstructuredGridCellType(CellType* type) const;
int readTriangleElementsSize(int* size) const;
int readTriangleElementsValueCount(int* size) const;
int readTriangleElements(std::vector<int>* indices) const;
int writeTriangleElements(const std::vector<int>& indices) const;
int readLineElementsSize(int* size) const;
int readLineElementsValueCount(int* size) const;
int readLineElements(std::vector<int>* indices) const;
int writeLineElements(const std::vector<int>& indices) const;
int copyExceptSolution(H5CgnsZone* target);
bool gridCoordinatesForSolutionExists() const;
H5CgnsGridCoordinates* gridCoordinatesForSolution();
bool solutionExists(SolutionPosition pos) const;
H5CgnsFlowSolution* solution(SolutionPosition pos);
bool nodeSolutionExists() const;
H5CgnsFlowSolution* nodeSolution();
bool cellSolutionExists() const;
H5CgnsFlowSolution* cellSolution();
bool iFaceSolutionExists() const;
H5CgnsFlowSolution* iFaceSolution();
bool jFaceSolutionExists() const;
H5CgnsFlowSolution* jFaceSolution();
bool kFaceSolutionExists() const;
H5CgnsFlowSolution* kFaceSolution();
bool particleGroupSolutionExists() const;
H5CgnsParticleGroupSolution* particleGroupSolution();
bool particleGroupImageSolutionExists() const;
H5CgnsParticleGroupImageSolution* particleGroupImageSolution();
bool particleSolutionExists() const;
H5CgnsParticleSolution* particleSolution();
bool polyDataSolutionExists() const;
H5CgnsPolyDataSolution* polyDataSolution();
int copyGridTo(H5CgnsBase* target);
int copyGridTo(H5CgnsZone* target);
int flush();
void clearSolutionGroups();
int deleteAllResults();
private:
class Impl;
Impl* impl;
};
} // namespace iRICLib
#ifdef _DEBUG
#include "private/h5cgnszone_impl.h"
#endif // _DEBUG
#endif // H5CGNSZONE_H