FiberBundleHDF5  FiberHDF5 Documentation, Revision 2026
High-Performance Fiber Bundle Data Model for Scientific Visualization
Loading...
Searching...
No Matches
F5R.h
Go to the documentation of this file.
1/*
2//
3// $Id: F5R.h,v 1.17 2007/07/31 13:42:02 werner Exp $
4//
5*/
6
7#ifndef __F5R_H
8#define __F5R_H
9
10#include "F5F.h"
11#include "F5B.h"
12#include "F5coordinates.h"
13
14#ifdef __cplusplus
15extern "C"
16{
17#endif
18
19/**\defgroup F5R Creating F5Path objects and field representations.
20 These functions create F5Path objects for subsequent usage by F5F
21 field functions. They are created directly from HDF5 id's and
22 native types.
23 */
24
25
26/**\ingroup F5R
27 Create a Field object for a given representation of a grid's vertices
28 in a certain coordinate system for a three-dimensional distribution
29 of vertices, i.e. a 3D grid. Not to be used for surfaces, lines or
30 point clouds - use F5Rcreate_cartesian_nD() for this case.
31
32 @return A new F5Path pointer. Call F5close() if it is no longer used.
33 */
34F5_API F5Path*F5Rcreate_cartesian_3D(hid_t File_id, double time,
35 const char*gridname,
36 const char*coordinate_system);
37
38
39
40/**\ingroup F5R
41 Create a Field object for a given representation of a grid's vertices
42 in a certain coordinate system, specifying the dimensionality of the
43 grid vertices.
44
45 @return A new F5Path pointer. Call F5close() if it is no longer used.
46 */
47F5_API F5Path*F5Rcreate_cartesian_nD(hid_t File_id, double time,
48 const char*gridname,
49 int Dims,
50 const char*coordinate_system);
51
52
53/**\ingroup F5R
54 Construct a Field object for a representation of a grid's vertices
55 in a certain coordinate system.
56
57 @param ChartDomain A coordinate system domain object. It may be NULL to create
58 a new one via the coord_creator parameter locally for this
59 field. If a class of coordinate systems shall be used for
60 multiple grids (which is required to enable interpolation),
61 then a shared ChartDomain object needs to be given. If
62 is reference counted among all grids that use it (taken care
63 of in F5close() ).
64
65 @param coord_creator A procedure to create a new class of coordinate systems.
66 @param coordinate_system A name for an instance of the coordinate system, i.e. for
67 the current chart object to use.
68
69 @param TopologyName On which topological space of the grid to create the coordinate
70 representation (e.g. vertices, cells, edges, refinement level ...)
71
72 @param time The time to which the succeeding data will be attached. Use
73 F5Rcreate_static_cartesian() if no time information is reasonable
74 for the given data. Note that static data currently requires
75 special handling when reading data, so it is recommended to
76 adjust any data to a timeslice, except if there is an absolute
77 requirement to specify that these data are constant for all
78 thinkable times.
79
80 @return A new F5Path pointer. Call F5close() if it is no longer used.
81 */
82/*
83F5_API F5Path*F5Rcreate(hid_t File_id, double time,
84 const char*gridname,
85 ChartDomain_IDs*ChartDomain,
86 new_global_chart_f coord_creator,
87 const char*coordinate_system,
88 const char*TopologyName);
89*/
90
91
92/**\ingroup F5R
93 Construct a Field object for a representation of a grid's vertices
94 in a certain coordinate system that is independent from any time information.
95
96 @param ChartDomain A coordinate system domain object. It may be NULL to create
97 a new one via the coord_creator parameter locally for this
98 field. If a class of coordinate systems shall be used for
99 multiple grids (which is required to enable interpolation),
100 then a shared ChartDomain object needs to be given. If
101 is reference counted among all grids that use it (taken care
102 of in F5close() ).
103
104 @param coord_creator A procedure to create a new class of coordinate systems.
105 @param coordinate_system A name for an instance of the coordinate system, i.e. for
106 the current chart object to use.
107
108 @param TopologyName On which topological space of the grid to create the coordinate
109 representation (e.g. vertices, cells, edges, refinement level ...)
110
111 @return A new F5Path pointer. Call F5close() if it is no longer used.
112 */
114 const char*gridname,
115 const char*coordinate_system);
116
117
118/**\ingroup F5R
119 Create a representation for a specific topological
120 space on the grid in a certain coordinate system.
121 Mostly of internal use.
122 */
123F5_API F5Path*F5Rcreate_coordinate_topology(hid_t File_id, const double*time,
124 const char*gridname,
125 const char*coordinate_system,
126 const char*TopologyName,
127 int IndexDepth, int SkeletonDimensionality,
128 int Dimensionality,
129 const hsize_t*refinement);
130
131
132/**\ingroup F5R
133 Create the default topology of the cells of a grid as triangles,
134 as specified by vertices. It will result in a two-dimensional grid.
135 @return An F5Path object referring to the cells (i.e. triangles). All subsequent
136 field operations on this F5Path object will refer to fields on the triangles.
137 */
138F5_API F5Path*F5Rcreate_triangles_as_vertices_topology(hid_t File_id, double time, const char*gridname);
139
140
141/* ==== [RH] 20061229 .. added
142 ---------------------------
143 */
144/**\ingroup F5R
145 Create the default topology of the edges of a grid,
146 as specified by vertices.
147 @return An F5Path object referring to the edges. All subsequent
148 field operations on this F5Path object will refer to fields on the edges.
149 */
150F5_API F5Path*F5Rcreate_edges_as_vertices_topology(hid_t File_id, double time, const char*gridname);
151
152
153
154/* ==== [RH] 20061229 .. added
155 ---------------------------
156 */
157/**\ingroup F5R
158 Create the default topology of the facet of a grid,
159 as specified by vertices.
160 @return An F5Path object referring to the facet. All subsequent
161 field operations on this F5Path object will refer to fields on the facet.
162 */
163F5_API F5Path*F5Rcreate_faces_as_vertices_topology(hid_t File_id, double time, const char*gridname);
164
165
166/* ==== [RH] 20061221 .. added
167 ---------------------------
168 */
169/**\ingroup F5R
170 Create the default topology of the cells of a grid as tetrahedra,
171 as specified by vertices. It will be a 3-dimensional grid.
172 @return An F5Path object referring to the cells. All subsequent
173 field operations on this F5Path object will refer to fields on the cells.
174 */
175F5_API F5Path*F5Rcreate_tetrahedrons_as_vertices_topology(hid_t File_id, double time, const char*gridname);
176
177/**\ingroup F5R
178 Create the default topology of the cells of a grid as hexahedrons,
179 as specified by vertices. It will be a 3-dimensional grid.
180 @return An F5Path object referring to the hexahedral cells. All subsequent
181 field operations on this F5Path object will refer to fields on the hexahedrons.
182 */
183F5_API F5Path*F5Rcreate_hexaedrons_as_vertices_topology(hid_t File_id, double time, const char*gridname);
184
185
186
187/* Internal function naming convention for vertex or cell refinement topologies */
188F5_API void TopologyName(char*name, int nlength,
189 const hsize_t*level, int Centering, int dims);
190
191
192/**\ingroup F5R
193 Create an Field object for vertices of a grid
194 in a certain coordinate system that is intended to store
195 subsampled data of the full grid.
196 Note that this function is intended to store contigous datasets,
197 which can be hyperslabs of other datasets. It can be used as
198 a "cache" for hyperslabbed data such that they require less
199 disc space.
200
201 @note This function only refers to the vertices of a grid.
202 Use the AMR functions for more handling cell, face or edge-related
203 data and/or if refined data only exist on a subset of the full
204 coordinate space.
205
206 @see F5Lwrite_fraction(), AMR
207
208 @param refinement The refinement factor as compared to the finest resolution.
209 It will most likely be a power of two.
210 Note that the coarsest resolution should get the smallest
211 number and the finest resolution (i.e. the complete dataset)
212 the largest number.
213 It is recommended to start counting at zero, given a
214 refinement level, this refinement to be given here will
215 be a power of two given the level number.
216 @return A new F5Path pointer. Call F5close() if it is no longer used.
217 */
218F5_API F5Path*F5Rcreate_vertex_refinement3D(hid_t File_id, double time,
219 const char*gridname,
220 const hsize_t refinement[3],
221 const char*coordinate_system);
222
223/**\ingroup F5R
224 Create a refinement topology whose refined cells fully cover
225 coarse cells. The border vertices line up exactly,
226 i.e. the positions of a subregion may be given in integers of
227 a coarse region.
228 */
229F5_API F5Path*F5Rcreate_relative_vertex_Irefinement3D(hid_t File_id, double time,
230 const char*gridname,
231 const hsize_t current_refinement[3],
232 double target_time,
233 const hsize_t target_refinement[3]);
234
235/**\ingroup F5R
236 Create a refinement topology whose refined cells may partially cover
237 coarse cells. The refinement coordinates are given as rational numbers.
238 */
239F5_API F5Path*F5Rcreate_relative_vertex_Qrefinement3D(hid_t File_id, double time,
240 const char*gridname,
241 const hsize_t current_refinement[3],
242 double target_time,
243 const hsize_t target_refinement[3]);
244
245/**\ingroup F5R
246 Create a topology suitable for downsampled data, i.e. where the \b average
247 of another topology's cells are stored. The index depth of the new
248 topology will be one more than that of the original one.
249 */
250F5_API void F5Rcreate_downsampling(F5Path*Topology, const hsize_t*downsampling);
251
252/**\ingroup F5R
253 Create a topology suitable for subsampled data, i.e. where a \b subset
254 of another topology's cells are stored. Note that the same data can also
255 be retrieved by HDF5 hyperslabbing, but storing an hyperslab as a contigous
256 data set may be helpful for faster data access. The index depth of the new
257 topology will be identical to the original one.
258 */
259F5_API void F5Rcreate_subsampling (F5Path*Topology, const hsize_t*subsampling);
260
261
262
263
264
265/**\ingroup F5R
266 Create a symbolic links from some vertex refinement topology group
267 to the default group "Points".
268 @return non-zero in case of errors, like invalid arguments.
269 @param grid Pointer to an F5Path object. It must contain a valid
270 Grid_id identifiert.
271 @todo Check for an eventually existing "Points" group and handle HDF5 error codes.
272 */
274 const hsize_t target_refinement[3]);
275
276
277/**\ingroup F5R
278 Set information about an integer timestep (per Grid object!)
279 This is an recommended attribute for data originating from
280 subsequent simulations. It may be omitted on interpolated
281 grid objects to specify that these are secondary data that
282 can be reproduced from grids with Timestep information.
283 @return non-zero if the timestep could be set, and zero (false)
284 if the grid object in charge already has a timestep
285 attached with it but is inconsistent with the specified one.
286 */
287F5_API int F5Rset_timestep(F5Path*path, long timestep);
288
289/**\ingroup F5R
290 Get information about the optional integer timestep of an Grid object.
291 All fields per grid object must refer to the same integer timestep.
292 If a Grid object does not provide such timestep information, it
293 may be an interpolated grid that can be computed from others
294 that contain such timestep information. The timestep value
295 by itself is arbitrary, but must be unique among all Grid objects
296 with the same Grid identifier.
297 @return NULL, if no timestep information was found, or the F5Path
298 does not refer to a Grid object.
299 */
300F5_API long*F5Rget_timestep(F5Path*path, long*timestep);
301
302#ifdef __cplusplus
303} /* extern "C" */
304#endif
305
306#endif /* __F5R_H */
307
name
Definition F5P.c:82
void TopologyName(char *name, int nlength, const hsize_t *level, int Centering, int dims)
Definition F5R.c:300
F5_API void TopologyName(char *name, int nlength, const hsize_t *level, int Centering, int dims)
Definition F5R.c:300
#define F5_API
Definition F5WinDLLApi.h:11
F5Path * F5Rcreate_relative_vertex_Qrefinement3D(hid_t File_id, double time, const char *gridname, const hsize_t current_refinement[3], double target_time, const hsize_t target_refinement[3])
Definition F5R.c:369
F5_API F5Path * F5Rcreate_vertex_refinement3D(hid_t File_id, double time, const char *gridname, const hsize_t refinement[3], const char *coordinate_system)
Definition F5R.c:346
F5_API F5Path * F5Rcreate_coordinate_topology(hid_t File_id, const double *time, const char *gridname, const char *coordinate_system, const char *TopologyName, int IndexDepth, int SkeletonDimensionality, int Dimensionality, const hsize_t *refinement)
Definition F5R.c:80
F5_API F5Path * F5Rcreate_faces_as_vertices_topology(hid_t File_id, double time, const char *gridname)
F5_API F5Path * F5Rcreate_triangles_as_vertices_topology(hid_t File_id, double time, const char *gridname)
Definition F5R.c:158
F5_API F5Path * F5Rcreate_cartesian_nD(hid_t File_id, double time, const char *gridname, int Dims, const char *coordinate_system)
Definition F5R.c:116
F5_API void F5Rcreate_subsampling(F5Path *Topology, const hsize_t *subsampling)
Definition F5R.c:607
F5_API F5Path * F5Rcreate_hexaedrons_as_vertices_topology(hid_t File_id, double time, const char *gridname)
Definition F5R.c:233
F5_API void F5Rcreate_downsampling(F5Path *Topology, const hsize_t *downsampling)
Definition F5R.c:590
F5_API long * F5Rget_timestep(F5Path *path, long *timestep)
Definition F5R.c:44
F5Path * F5Rcreate_relative_vertex_Irefinement3D(hid_t File_id, double time, const char *gridname, const hsize_t current_refinement[3], double target_time, const hsize_t target_refinement[3])
Definition F5R.c:423
F5_API F5Path * F5Rcreate_tetrahedrons_as_vertices_topology(hid_t File_id, double time, const char *gridname)
Definition F5R.c:214
F5_API F5Path * F5Rcreate_edges_as_vertices_topology(hid_t File_id, double time, const char *gridname)
Definition F5R.c:177
int F5Rlink_default_vertex_topology(F5Path *grid, const hsize_t target_refinement[3])
Definition F5R.c:478
F5_API F5Path * F5Rcreate_static_cartesian(hid_t File_id, const char *gridname, const char *coordinate_system)
F5_API int F5Rset_timestep(F5Path *path, long timestep)
Definition F5R.c:10
F5_API F5Path * F5Rcreate_cartesian_3D(hid_t File_id, double time, const char *gridname, const char *coordinate_system)
Definition F5R.c:135