FiberBundleHDF5  FiberHDF5 Documentation, Revision 2026
High-Performance Fiber Bundle Data Model for Scientific Visualization
Loading...
Searching...
No Matches
F5AMR.h
Go to the documentation of this file.
1#ifndef __F5AMR_H
2#define __F5AMR_H
3
4#include "F5types.h"
5
6#include "F5WinDLLApi.h"
7
8#ifdef __cplusplus
9extern "C"
10{
11#endif
12
13/**\defgroup AMR Adaptive Hierarchical Meshes
14 */
15
16typedef struct
17{
18 int spatialRef[3];
20}
22
23typedef struct
24{
25 hid_t fileID;
26 const char*description;
29}
30 AMRInfo;
31
32/**\ingroup AMR
33 Adds AMR data to an HDF5 file.
34
35 @param fileID An HDF5 id as returned by the H5Fopen() or H5Fcreate() calls.
36 @param rank Dimensionality of the data.
37
38 @param rootOrigin minimal coordinate of root level bounding box
39 @param rootDelta cell-size on root level
40 @param description A short description about the data set. It should be short
41 and contain no special characters or spaces. The same rules
42 as for file names apply here. Ie. special characters and long
43 names are possible, but it is better to avoid them.
44
45 @return A pointer to an AMRInfo structure, which allows to set further information
46 for each AMR level. The per-level information must be set in the structure.
47 The result must be released by the F5AMRclose() function.
48*/
50 const int rank,
51 double rootOrigin[3],
52 double rootDelta[3],
53 const char*description);
54
55/**\ingroup AMR
56 Releases the data structure that had been allocated by the F5AMRopen() call.
57 */
59
60enum
61{
63 F5AMR_CELL_CENTERED = 0xFFFFFFFFU,
64 F5AMR_X_CENTERED = 0x00000001,
65 F5AMR_Y_CENTERED = 0x00000002,
66 F5AMR_Z_CENTERED = 0x00000004,
68};
69
70/**\ingroup AMR
71 Writes out a single AMR data box.
72 The data layout of non-scalar field is an array of struct.
73 @param AI Some AMRInfo data structure which was created by an F5AMROpen() call.
74 @param timestep counted in steps on the highest level of resolution
75 @param physTime associated physical time of this timestep
76 @param level refinement level this box belongs to
77 @param dimension The dimensionality of the data.
78 @param location Origin of this grid in coordinates given by the cells on this level,
79 must be consistent with the dimension parameter.
80 @param size Number of elements of data array in each dimension, must be consistent with the dimension parameter.
81 @param dataPtr Pointer to data array, the number of elements must be consistent with the size parameter.
82 @param fieldname Some name of the field (density, pressure, ...)
83 @param fieldtype HDF5 data type identifier. The caller is responsible for creating a
84 corect HDF5 description of the provided data.
85 @param Centering bit array of flags to specify where relative to a uniform cell the data reside.
86 @param blockname An (optional) identifier for each block.
87 @param property_id An HDF5 dataset property (may specify data chunking, compression etc.). May be F5P_DEFAULT.
88*/
90 const int timestep,
91 const double physTime,
92 const char* fieldname,
93 const int level,
94 int dimension,
95 const int *location,
96 const int *size,
97 hid_t fieldtype,
98 const void* dataPtr,
99 int Centering,
100 const char*blockname,
101 const char*coordinate_system,
102 hid_t property_id);
103
104
105/**\ingroup AMR
106 Writes out a single AMR data box.
107 The data layout of non-scalar field is a struct of arrays,
108 ie. the data fields of each component of eg. some vector field resides in
109 different scalar arrays.
110
111 @param AI Some AMRInfo data structure which was created by an F5AMROpen() call.
112 @param timestep counted in steps on the highest level of resolution
113 @param physTime associated physical time of this timestep
114 @param level refinement level this box belongs to
115 @param dimension The dimensionality of the data.
116 @param location Origin of this grid in coordinates given by the cells on this level,
117 must be consistent with the dimension parameter.
118 @param size Number of elements of data array in each dimension, must be consistent with the dimension parameter.
119 @param dataPtr Array of pointer to data arrays, the number of elements must be consistent with the size parameter.
120 @param fieldname Some name of the field (density, pressure, ...)
121 @param fieldtype HDF5 data type identifier. The caller is responsible for creating a
122 corect HDF5 description of the provided data.
123 @param Centering bit array of flags to specify where relative to a uniform cell the data reside.
124 @param blockname An (optional) identifier for each block.
125 @param property_id An HDF5 dataset property (may specify data chunking, compression etc.). May be F5P_DEFAULT.
126*/
128 const int timestep,
129 const double physTime,
130 const char* fieldname,
131 const int level,
132 int dimension,
133 const int *location,
134 const int *size,
135 hid_t fieldtype,
136 const void**dataPtr,
137 int Centering,
138 const char*blockname,
139 const char*coordinate_system,
140 hid_t property_id);
141
142#ifdef __cplusplus
143} /* extern "C" */
144#endif
145
146#endif /* __F5AMR_H */
147
@ F5AMR_Z_CENTERED
Definition F5AMR.h:66
@ F5AMR_X_CENTERED
Definition F5AMR.h:64
@ F5AMR_Y_CENTERED
Definition F5AMR.h:65
@ F5AMR_CELL_CENTERED
Definition F5AMR.h:63
@ F5AMR_XY_CENTERED
Definition F5AMR.h:67
@ F5AMR_VERTEX_CENTERED
Definition F5AMR.h:62
#define F5_API
Definition F5WinDLLApi.h:11
F5_API herr_t F5AMRwrite_block(AMRInfo *AI, const int timestep, const double physTime, const char *fieldname, const int level, int dimension, const int *location, const int *size, hid_t fieldtype, const void *dataPtr, int Centering, const char *blockname, const char *coordinate_system, hid_t property_id)
F5_API herr_t F5AMRwrite_block_v(AMRInfo *AI, const int timestep, const double physTime, const char *fieldname, const int level, int dimension, const int *location, const int *size, hid_t fieldtype, const void **dataPtr, int Centering, const char *blockname, const char *coordinate_system, hid_t property_id)
F5_API AMRInfo * F5AMRopen(hid_t fileID, const int rank, double rootOrigin[3], double rootDelta[3], const char *description)
F5_API void F5AMRclose(AMRInfo *)
int nLevels
Definition F5AMR.h:28
LevelInfo * li
Definition F5AMR.h:27
const char * description
Definition F5AMR.h:26
hid_t fileID
Definition F5AMR.h:25
int spatialRef[3]
Definition F5AMR.h:18
int timeRef
Definition F5AMR.h:19