FiberBundleHDF5  FiberHDF5 Documentation, Revision 2026
High-Performance Fiber Bundle Data Model for Scientific Visualization
Loading...
Searching...
No Matches
F5iterate.h
Go to the documentation of this file.
1/*
2 $Id: F5iterate.h,v 1.17 2008/04/23 19:16:30 werner Exp $
3*/
4
5#ifndef __F5iterate_H
6#define __F5iterate_H
7
8#include "hdf5inc.h"
9#include "F5P.h"
10#include "F5F.h"
11#include "F5parameter.h"
12
13#include "F5WinDLLApi.h"
14
15#ifdef __cplusplus
16extern "C"
17{
18#endif
19
20/** \defgroup F5iterate Iterator Functions
21
22 Synopsis:
23 -# Open a file
24 -# Call F5iterate_timeslices() on it
25 -# Let the timeslice callback function call F5iterate_grids()
26 -# Let the grid callback function call F5iterate_vertex_fields() if you are
27 interested in all available vertex-related fields.
28
29 The current implementation status only allows to scan all fields given
30 on the default Topology of Grid objects.
31*/
32
33/**
34 \example RegularReader.c
35 Scans through an HDF5 file and looks for grids with regular vertices.
36*/
37
38/** @{ */
39
40/**@ingroup F5iterate
41 Simple (mostly internal) helper function to detect which attributes or groups
42 shall be ignored generally. F5 ignores all groups starting with a dot or underline.
43 Normally this function will not be used by application code.
44
45 @return non-zero if the string shall be ignored.
46 @note returns true if the string is invalid (i.e.: "ignore invalid strings")
47 */
48F5_API int F5Iignore(const char*s);
49
50
51typedef herr_t F5_iterate_paramspace_t(F5Path*path, const F5ParameterSpace*params, void *user_data);
52
53/**@ingroup F5iterate
54 @todo Implement, and reformulate F5iterate_timeslices() via this function.
55 */
56F5_API int F5iterate_paramspace(hid_t file_id, int *idx,
57 const F5ParameterSpace*selection,
58 F5_iterate_paramspace_t*callback, void *user_data ) ;
59
60
61/**@ingroup F5iterate
62 The iterator function that is called for each time slice.
63 \see F5iterate_timeslices().
64 @param slice_id An HDF5 group identifier. Call H5Gclose() in the iterater function.
65*/
66typedef herr_t F5_iterate_timeslices_t(F5Path*path, double time, void *user_data);
67
68/**@ingroup F5iterate
69 Iterate over all time slices within a file.
70 */
71F5_API int F5iterate_timeslices(hid_t file_id, hsize_t *idx, F5_iterate_timeslices_t*callback, void *user_data ) ;
72
73
74/**@ingroup F5iterate
75 The iterator callback function that is called
76 for each grid of a time slice that fullfills the
77 specified grid property.
78 \see F5iterate_grids().
79 @param F5Grid An F5 path with a valid Grid identifier.
80*/
81typedef herr_t F5_iterate_grids_t(F5Path*F5Grid, const char*gridname, void *user_data);
82
83
84/**@ingroup F5iterate
85 Iterate over all grids within a slice.
86 @param gridtypes NULL-terminated array of grid property functions. May be NULL to retrieve all grids.
87 @param coordinate_system The coordinate system in which to check for grid properties.
88 E.g. a grid may be uniform in one coordinate system, but is
89 just regular in another one. May be NULL to specify the default
90 cartesian coordinate system.
91
92 @param F5Slice An F5 path with a valid slice identifier.
93 */
94F5_API int F5iterate_grids(F5Path*F5Slice, int *idx, F5_iterate_grids_t*callback, void *operator_data,
95 F5_gridproperty_t**gridtypes, const char*coordinate_system ) ;
96
97
98/**@ingroup F5iterate
99 The call back function that will be invoked by F5iterate_topologies(). It traverses all
100 Skeletons of a Grid object.
101
102@param index_depth The number of "hops" that are required to go from the elements described in this
103 group to vertex coordinates in a chart.
104@param topological_dimension The dimension of the k-cells that are stored within this Skeleton group.
105 */
106typedef herr_t F5_iterate_topologies_t(F5Path*field, const char*topologyname,
107 int index_depth,
108 int topological_dimension,
109 void *operator_data);
110
111/**@ingroup F5iterate
112 Traverses all Skeletons of a Grid object.
113 Usually it is invoked via F5iterate_grids() and invokes F5iterate_topology_fields();
114*/
115F5_API int F5iterate_topologies(F5Path*grid, int *idx, F5_iterate_topologies_t*callback, void *operator_data);
116
117
118
119/**@ingroup F5iterate
120 @param Representation The F5Path to the currently traversed Represention
121 @param RepresentationTarget The location of the Representer if its from another Grid.
122 @relates F5iterate_representations()
123 */
124typedef herr_t F5_iterate_representations_t(F5Path*Representation,
125 void*operator_data,
126 const char*Representer_name,
127 F5Path*RepresentationTarget);
128
129
130/**@ingroup F5iterate
131 Traverses all Representations per skeleton.
132 Typically invoked by the callback function of F5iterate_topologies() .
133 */
134F5_API int F5iterate_representations(F5Path*skeleton, int *idx, F5_iterate_representations_t*callback, void *operator_data);
135
136
137/**@ingroup F5iterate
138 Called per grid function.
139 @param field_id The HDF5 ID of the respective field.
140 Note that it may be an HDF5 group ID or a dataset ID.
141 Call H5Gclose() or H5Dclose() in the iterator function.
142
143 @param representer_name The name of the containing group where this field resides.
144 */
145typedef herr_t F5_iterate_fields_t(F5Path*field, const char*fieldname, void *operator_data,
146 const char*representer_name);
147
148
149/**@ingroup F5iterate
150 Traverses all fields per representation.
151 Typically invoked by the callback function of F5iterate_representations().
152 @see Higher level functionality provided by F5iterate_vertex_fields() and F5iterate_topology_fields().
153 @param representer_name The name of the representation group, as come callbacks want to know this.
154 */
155F5_API int F5iterate_fields(F5Path*representation, int *idx,
156 const char*representer_name,
157 F5_iterate_fields_t*callback, void *operator_data);
158
159
160
161/**@ingroup F5iterate
162 Prototype of a function that allows only certain types.
163 */
164typedef int F5_fieldtype_t(hid_t type_id);
165
166
167/**@ingroup F5iterate
168 Iterate over all fields given on the vertices per grid in the specified coordinate system.
169 @param what Function to select which field types are allowed. May be a NULL pointer to retrieve
170 all fields on the grid.
171 */
172F5_API int F5iterate_vertex_fields(F5Path*grid, int *idx, F5_iterate_fields_t*callback, void *operator_data,
173 const char*coordinate_system,
174 F5_fieldtype_t*what) ;
175
176/**@ingroup F5iterate
177 Iterate over an arbitrary topology group.
178 The group ID grid->Topology_id must be a valid group ID when calling this function.
179 */
180F5_API int F5iterate_topology_fields(F5Path*skeleton, int *idx, F5_iterate_fields_t*callback, void *operator_data,
181 const char*coordinate_system, F5_fieldtype_t*what);
182
183/**@ingroup F5iterate
184 @param grid An F5Path pointing to the current grid with its members myChart and FileIDs being defined.
185 */
186typedef herr_t F5_iterate_grid_atlas_t(F5Path*grid, const char*coordinate_name,
187 hid_t global_chart_hid, hid_t domain_group_hid,
188 void *operator_data);
189
190F5_API int F5iterate_grid_atlas(F5Path*grid, int *idx, F5_iterate_grid_atlas_t*callback, void *operator_data);
191
192
193/**@ingroup F5iterate
194 Check whether this grid object has some fields in the standard vertex topology,
195 i.e. an Points/ entry.
196 */
198
199typedef herr_t F5_iterate_fields_fragments_t(F5Path*field, const char*fragmentname, void *operator_data);
200
202 void *operator_data);
203
204
205
206
207
208/**@ingroup F5iterate
209 The iterator function that is called for each grid that is found in the file.
210 \see F5iterate_grids_per_bundle().
211*/
212typedef herr_t F5_iterate_grids_per_bundle_t(hid_t file_id, hid_t gridinfo_id, const char*gridname, void *user_data);
213
214/**@ingroup F5iterate
215 Iterate over all grids slices within a file.
216 */
217F5_API int F5iterate_grids_per_bundle(hid_t file_id, int *idx, F5_iterate_grids_per_bundle_t*callback, void *user_data ) ;
218
219
220//typedef herr_t F5_iterate_gridevolution_per_bundle_t(hid_t file_id, const char*gridname, double time, hid_t slice_id, void *user_data);
221
222/**@ingroup F5iterate
223 Callback function type for F5iterate_gridevolution().
224 @param file_id The HDF5 file ID.
225 @param gridname The name of the current grid under investigation.
226 @param time The time at which this grid exists.
227 @param slicename The name of the time slice group where this grid resides in.
228 */
229typedef herr_t F5_iterate_gridevolution_per_bundle_t(hid_t file_id, const char*gridname, double time, const char*slicename, void *user_data);
230
231/**@ingroup F5iterate
232 @param gridinfo Optional per-grid callback function. May be just NULL.
233 */
234F5_API int F5iterate_gridevolution(hid_t file_id, int *idx, F5_iterate_gridevolution_per_bundle_t*callback, void *user_data,
236
237
238/** @} */
239
240#ifdef __cplusplus
241} /* extern "C" */
242#endif
243
244#endif /* __F5iterate_H */
245
#define F5_API
Definition F5WinDLLApi.h:11
herr_t F5_iterate_fields_fragments_t(F5Path *field, const char *fragmentname, void *operator_data)
Definition F5iterate.h:199
herr_t F5_iterate_paramspace_t(F5Path *path, const F5ParameterSpace *params, void *user_data)
Definition F5iterate.h:51
F5_API int F5iterate_grid_atlas(F5Path *grid, int *idx, F5_iterate_grid_atlas_t *callback, void *operator_data)
Definition F5iterate.c:949
F5_API int F5iterate_field_fragments(F5Path *field, int *idx, F5_iterate_fields_fragments_t *callback, void *operator_data)
Definition F5iterate.c:1006
herr_t F5_iterate_fields_t(F5Path *field, const char *fieldname, void *operator_data, const char *representer_name)
Definition F5iterate.h:145
herr_t F5_iterate_representations_t(F5Path *Representation, void *operator_data, const char *Representer_name, F5Path *RepresentationTarget)
Definition F5iterate.c:432
F5_API int F5iterate_grids_per_bundle(hid_t file_id, int *idx, F5_iterate_grids_per_bundle_t *callback, void *user_data)
Definition F5iterate.c:1145
F5_API int F5iterate_grids(F5Path *F5Slice, int *idx, F5_iterate_grids_t *callback, void *operator_data, F5_gridproperty_t **gridtypes, const char *coordinate_system)
Definition F5iterate.c:206
herr_t F5_iterate_timeslices_t(F5Path *path, double time, void *user_data)
Definition F5iterate.h:66
herr_t F5_iterate_grid_atlas_t(F5Path *grid, const char *coordinate_name, hid_t global_chart_hid, hid_t domain_group_hid, void *operator_data)
Definition F5iterate.h:186
F5_API int F5iterate_topologies(F5Path *grid, int *idx, F5_iterate_topologies_t *callback, void *operator_data)
Definition F5iterate.c:689
F5_API int F5iterate_vertex_fields(F5Path *grid, int *idx, F5_iterate_fields_t *callback, void *operator_data, const char *coordinate_system, F5_fieldtype_t *what)
Definition F5iterate.c:405
int F5_fieldtype_t(hid_t type_id)
Definition F5iterate.h:164
F5_API int F5Iignore(const char *s)
Definition F5iterate.c:18
herr_t F5_iterate_topologies_t(F5Path *field, const char *topologyname, int index_depth, int topological_dimension, void *operator_data)
Definition F5iterate.h:106
F5_API int F5has_standard_vertex_fields(F5Path *grid)
Definition F5iterate.c:278
F5_API int F5iterate_representations(F5Path *skeleton, int *idx, F5_iterate_representations_t *callback, void *operator_data)
Definition F5iterate.c:465
herr_t F5_iterate_grids_t(F5Path *F5Grid, const char *gridname, void *user_data)
Definition F5iterate.h:81
herr_t F5_iterate_gridevolution_per_bundle_t(hid_t file_id, const char *gridname, double time, const char *slicename, void *user_data)
Definition F5iterate.h:229
F5_API int F5iterate_topology_fields(F5Path *skeleton, int *idx, F5_iterate_fields_t *callback, void *operator_data, const char *coordinate_system, F5_fieldtype_t *what)
Definition F5iterate.c:296
F5_API int F5iterate_timeslices(hid_t file_id, hsize_t *idx, F5_iterate_timeslices_t *callback, void *user_data)
Definition F5iterate.c:105
F5_API int F5iterate_fields(F5Path *representation, int *idx, const char *representer_name, F5_iterate_fields_t *callback, void *operator_data)
Definition F5iterate.c:582
F5_API int F5iterate_paramspace(hid_t file_id, int *idx, const F5ParameterSpace *selection, F5_iterate_paramspace_t *callback, void *user_data)
herr_t F5_iterate_grids_per_bundle_t(hid_t file_id, hid_t gridinfo_id, const char *gridname, void *user_data)
Definition F5iterate.h:212
F5_API int F5iterate_gridevolution(hid_t file_id, int *idx, F5_iterate_gridevolution_per_bundle_t *callback, void *user_data, F5_iterate_grids_per_bundle_t *gridinfo)
Definition F5iterate.c:1372
int F5_gridproperty_t(F5Path *grid, const char *coordinate_system)
Definition F5P.h:63
struct structF5ParameterSpace F5ParameterSpace