FiberBundleHDF5  FiberHDF5 Documentation, Revision 2026
High-Performance Fiber Bundle Data Model for Scientific Visualization
Loading...
Searching...
No Matches
F5iterate.c
Go to the documentation of this file.
1#include "F5iterate.h"
2#include "F5B.h"
3#include "F5F.h"
4#include "F5defs.h"
5#include "F5private.h"
6#include "F5X.h"
7#include "F5A.h"
8#include <assert.h>
9#include <string.h>
10
11#if __APPLE__
12#include <sys/malloc.h>
13#else
14#include <malloc.h>
15#endif
16
17
18int F5Iignore(const char*s)
19{
20 if (!s) return 1;
21 if (*s == '.') return 1;
22 if (*s == '_') return 1;
23 return 0;
24}
25
32
33static herr_t H5G_iterate_timeslices(hid_t group_id, const char *member_name, void *operator_data)
34{
36const char**s;
37/*herr_t (*old_func)(void*);
38 void *old_client_data;
39*/
40 if (F5Iignore(member_name))
41 return 0;
42
43 if (That->path->field_enum_type_hid<0)
44 printf("H5G_iterate_timeslices() could not open enum type!\n");
45
46 /* If slice is already open in this path object, close it now.
47 This actually should not be the case, and is most likely a bug
48 in the caller code.
49 */
50 if (That->path->Slice_hid>0)
51 {
52 F5printf(0, "H5G_iterate_timeslices(): OUCH! Timeslice was already defined!?\n");
53 H5Gclose(That->path->Slice_hid);
54 }
55
56 That->path->Slice_hid = F5Gtry_to_open(group_id, member_name);
57 if (That->path->Slice_hid < 1 )
58 {
59 F5printf(40, "H5G_iterate_timeslices(): Member '%s' is not a group!\n", member_name);
60 return 0;
61 }
62
63 for(s=F5_default_time_attrib_names; *s; s++)
64 {
65 hid_t attr_id;
66 double time = 0;
67 int retval;
68
69 H5E_BEGIN_TRY
70 attr_id = F5Aopen_name(That->path->Slice_hid, *s);
71 H5E_END_TRY
72
73 if (attr_id<0)
74 continue;
75
76 if (F_H5Aread(attr_id, H5T_NATIVE_DOUBLE, &time, *s)<0)
77 {
78 H5Aclose(attr_id);
79 continue;
80 }
81 H5Aclose(attr_id);
82/* printf("SLICE: Have T=%lg, Query: T=%lg\n", t, *si->t); */
83
84 retval = That->callback( That->path, time, That->operator_data);
85 if (That->path->Slice_hid)
86 H5Gclose(That->path->Slice_hid);
87 That->path->Slice_hid = 0;
88 return retval;
89 }
90
91 F5printf(100, "H5Gclose(That->path->Slice_hid=%d)\n", That->path->Slice_hid );
92 H5Gclose(That->path->Slice_hid);
93 F5printf(100, "H5Gclose(That->path->Slice_hid) done\n");
94 That->path->Slice_hid = 0;
95 return 0;
96}
97
98/*
99static herr_t H5L_iterate_timeslices( hid_t g_id, const char *name, const H5L_info_t *info, void *op_data)
100{
101 return H5G_iterate_timeslices(g_id, name, op_data);
102}
103*/
104
106{
108F5Path *myPath = F5Binitialize_path(file_id);
109int retval;
110
111 if (!myPath)
112 {
113 F5printf(1, "*F5iterate_timeslices(): Could not initialize F5 Path!");
114 return -1;
115 }
116
117 That.callback = callback;
119 That.path = myPath;
120
121 F5printf(100, "F5iterate_timeslices()");
122
123#if 1
124 {
125 if (idx)
126 {
127 int Idx = *idx;
128 retval = H5Giterate(file_id, "/", &Idx, H5G_iterate_timeslices, &That);
129 *idx = Idx;
130 }
131 else
132 retval = H5Giterate(file_id, "/", 0, H5G_iterate_timeslices, &That);
133 }
134#else
135 {
136// herr_t herr = H5Literate(file_id, H5_INDEX_CRT_ORDER, H5_ITER_NATIVE,
137 herr_t herr = H5Literate(file_id, H5_INDEX_NAME, H5_ITER_NATIVE,
138 idx, H5L_iterate_timeslices, &That);
139
140 if (herr<0)
141 {
142 F5printf(0, "F5iterate_timeslices(): iteration error");
143 retval = -1;
144 }
145 else
146 retval = 0;
147 }
148#endif
149 F5printf(100, "F5iterate_timeslices: H5iterate done.\n" );
150
151 F5close(myPath);
152 F5printf(100, "F5iterate_timeslices: F5close() done.\n" );
153 return retval;
154}
155
156
157
158/***********************************************************************************************************/
159
168
169static herr_t H5G_iterate_grids(hid_t group_id, const char *member_name, void *operator_data)
170{
171struct IterateGrids*That = (struct IterateGrids*)operator_data;
172int retval;
173hid_t id;
174
175 if (F5Iignore(member_name))
176 return 0;
177
178 id = That->path->Grid_hid = H5Gopen2(group_id, member_name, H5P_DEFAULT);
179 if (id<0)
180 printf("ERROR: H5G_iterate_grids::H5Gopen(%s) failed!\n", member_name);
181
182 if (That->gridtypes)
183 {
184 F5_gridproperty_t**GridProperty = That->gridtypes;
185 while(*GridProperty)
186 {
187 if ((*GridProperty)(That->path, That->coordinate_system) )
188 return That->callback(That->path, member_name, That->operator_data);
189
190 GridProperty++;
191 }
192 H5Gclose(That->path->Grid_hid);
193 That->path->Grid_hid = 0;
194 return 0;
195 }
196 retval = That->callback(That->path, member_name, That->operator_data);
197
198 H5Gclose(That->path->Grid_hid);
199 if (id != That->path->Grid_hid && That->path->Grid_hid != -1)
200 H5Gclose(id);
201 That->path->Grid_hid = 0;
202
203 return retval;
204}
205
208{
209struct IterateGrids That;
210 That.callback = callback;
212 That.gridtypes = gridtypes;
214 That.path = slice;
215
216 F5printf(100, "F5iterate_grids()");
217 return H5Giterate(slice->Slice_hid, ".", idx, H5G_iterate_grids, &That);
218}
219
220/***********************************************************************************************************/
221
230
231/*
232 Try to open object as data set or as group.
233 The field type function is evaluated on the corresponding data type.
234 If the field is a data set, then it evaluates its data type.
235 Otherwise, the field group must contain a TypeID attribute that specifies
236 the type.
237*/
238static herr_t H5G_iterate_vertex_fields(hid_t group_id, const char *member_name, void *operator_data)
239{
240struct VertexFieldParams * That = (struct VertexFieldParams*)operator_data;
241int retval;
242hid_t Type_id;
243
244 F5printf(40, "H5G_iterate_vertex_fields(,member_name=%s, operator_data=%p)",
245 member_name, operator_data);
246
247 if (F5Iignore(member_name))
248 return 0;
249
250 if (strcmp(member_name, FIBER_HDF5_REPRESENTER)==0)
251 return 0;
252
253 if (!F5Fopen(That->path, member_name) )
254 return 0;
255
256 if (That->what)
257 {
258 int ok;
259 F5printf(40, "H5G_iterate_vertex_fields(): Checking field type");
260 Type_id = F5Fget_type(That->path);
261 ok = That->what(Type_id);
262 H5Tclose( Type_id);
263 if (!ok)
264 {
265 F5Fclose(That->path);
266 return 0;
267 }
268 }
269
270 F5printf(40, "H5G_iterate_vertex_fields() calling user callback function on `%s'.", member_name);
271 retval = That->callback(That->path, member_name, That->operator_data, That->coordinate_system);
272 F5Fclose(That->path);
273 F5printf(40, "H5G_iterate_vertex_fields() called user callback function on `%s'.", member_name);
274
275 return retval;
276}
277
279{
280hid_t Gid;
281 if (!grid) return 0;
282
283 H5E_BEGIN_TRY
284 Gid = H5Gopen2(grid->Grid_hid, FIBER_HDF5_POINTS, H5P_DEFAULT);
285 H5E_END_TRY
286
287 if (Gid>0)
288 {
289 H5Gclose(Gid);
290 return 1;
291 }
292 return 0;
293}
294
295
298{
299int retval;
300hid_t Cgrids = 0;
301hid_t local_chart_hid = 0;
302struct VertexFieldParams That;
303
304 if (!grid->Topology_hid)
305 {
306 F5printf(10, "F5iterate_topology_fields(): No Topology ID!");
307 return 0;
308 }
309
310 F5printf(100, "F5iterate_topology_fields()");
311
312 That.callback = callback;
314 That.path = grid;
316 That.what = what;
317
318 F5printf(40, "F5iterate_topology_fields(coordinate_system=%s)", coordinate_system);
319
321 if (grid->Representation_hid<0)
322 {
324 {
327 }
328 if (grid->Representation_hid<0)
329 {
331 {
332 coordinate_system = "CartesianChart3D";
334 }
335 if (grid->Representation_hid<0)
336 {
337 F5printf(10, "F5iterate_topology_fields(): Open Coordinate system `%s' failed!",
339
340 /*
341 // Reset representation ID to zero, indicating that it is not open in the F5Path
342 // Alternatively, we could check for negative values also in F5close() and use
343 // negative values for allowing to detect errors more specifically. Currently,
344 // we don't distinguish among not-yet-opened and not-opened-due-to-error cases.
345 // Then, application code can just check for zero, makes things easier.
346 // More future-safe could would check for positiveness.
347 */
348 grid->Representation_hid = 0;
349 return 0;
350 }
351 }
352 }
353
354 /* check if charts per grid are already available? */
355 if (grid->Charts_hid)
356 Cgrids = grid->Charts_hid;
357 else
358 {
359 grid->Charts_hid = H5Gopen2(grid->Grid_hid , FIBER_HDF5_CHARTS_PER_GRID, H5P_DEFAULT);
360 if (grid->Charts_hid <0)
361 {
362 puts("ERROR: F5iterate_topology_fields(): Opening charts per grid (\""FIBER_HDF5_CHARTS_PER_GRID"\" FAILED");
363 }
364 }
365
366 local_chart_hid = grid->Chart_hid;
368 if (grid->Chart_hid < 0 && strcmp(coordinate_system, FIBER_HDF5_DEFAULT_CHART)==0)
369 {
371 }
372 if (grid->Chart_hid < 0)
373 {
374 F5printf(10, "F5iterate_topology_fields(): Could not open chart description for `%s', no chart info available, but still iterating...!",
376 }
377
378 F5printf(30, " F5iterate_topology_fields() --> iterate vertex fields");
380 retval = H5Giterate(grid->Representation_hid, ".", idx, H5G_iterate_vertex_fields, &That);
382 /* if we had no charts per grid opened, close them here again. */
383 if (!Cgrids)
384 {
385 if (grid->Charts_hid>0)
386 H5Gclose(grid->Charts_hid);
387 grid->Charts_hid = 0;
388 }
389 if (grid->Chart_hid> 0)
390 H5Gclose( grid->Chart_hid );
391
392 grid->Representation_hid = 0;
393 grid->Chart_hid = local_chart_hid;
394
395
396 if (retval<0)
397 {
398 F5printf(10, " F5iterate_topology_fields() --> Iteration error\n");
399 }
400
401
402 return retval;
403}
404
407{
408int retval;
409 if (!grid) return -1;
410
411 assert(grid->Topology_hid == 0);
412
413 H5E_BEGIN_TRY
414 grid->Topology_hid = H5Gopen2(grid->Grid_hid, FIBER_HDF5_POINTS, H5P_DEFAULT);
415 H5E_END_TRY
416
417 if (grid->Topology_hid<0)
418 {
419 grid->Topology_hid = 0;
420 return 0;
421 }
423 H5Gclose( grid->Topology_hid );
424 grid->Topology_hid = 0;
425
426 return retval;
427}
428
429
430/***********************************************************************************************************/
431
432typedef herr_t F5_iterate_representations_t(F5Path*Representation,
433 void*operator_data,
434 const char*Representer_name,
435 F5Path*RepresentationTarget);
436
443
444
445static herr_t H5G_iterate_representations(hid_t group_id, const char *member_name, void *operator_data)
446{
447struct DomainParams * That = (struct DomainParams*)operator_data;
448herr_t retval = 0;
449
450 That->skeleton->Representation_hid = F5Gtry_to_open(group_id, member_name);
451 if (That->skeleton->Representation_hid)
452 {
453/*TODO:
454 check and read FIBER_HDF5_REPRESENTER for cases when the Representer is in another Grid
455*/
456 That->callback(That->skeleton, That->operator_data, member_name, 0);
457
459 That->skeleton->Representation_hid = 0;
460 }
461 return retval;
462}
463
464
466{
467/*hid_t local_chart_hid = 0;*/
468struct DomainParams That;
469
471 {
472 F5printf(10, "F5iterate_representations(): No Topology ID!");
473 return 0;
474 }
476 {
477 F5printf(10, "F5iterate_representations(): No Representation ID!");
478 return 0;
479 }
480
481
482 F5printf(30, "F5iterate_representations()");
483
484 That.callback = callback;
486 That.skeleton = skeleton;
487
488 return H5Giterate(skeleton->Topology_hid, ".", idx, H5G_iterate_representations, &That);
489
490#if 0
491 if (!coordinate_system) coordinate_system = FIBER_HDF5_DEFAULT_CHART;
492 That.what = what;
493
494 F5printf(40, "F5iterate_topology_fields(coordinate_system=%s)\n", coordinate_system);
495
496 grid->Representation_hid = F5Gtry_to_open(grid->Topology_hid, coordinate_system);
497 if (grid->Representation_hid<0)
498 {
499 if (strcmp(coordinate_system, FIBER_HDF5_DEFAULT_CHART)==0)
500 {
501 coordinate_system = FIBER_HDF5_DEPRECATED_OLD_DEFAULT_CHART;
502 grid->Representation_hid = F5Gtry_to_open(grid->Topology_hid, coordinate_system);
503 }
504 if (grid->Representation_hid<0)
505 {
506 if (strcmp(coordinate_system, FIBER_HDF5_DEPRECATED_OLD_DEFAULT_CHART)==0)
507 {
508 coordinate_system = "CartesianChart3D";
509 grid->Representation_hid = F5Gtry_to_open(grid->Topology_hid, coordinate_system);
510 }
511 if (grid->Representation_hid<0)
512 {
513 F5printf(10, "F5iterate_topology_fields(): Open Coordinate system `%s' failed!",
514 coordinate_system );
515
516 /*
517 // Reset representation ID to zero, indicating that it is not open in the F5Path
518 // Alternatively, we could check for negative values also in F5close() and use
519 // negative values for allowing to detect errors more specifically. Currently,
520 // we don't distinguish among not-yet-opened and not-opened-due-to-error cases.
521 // Then, application code can just check for zero, makes things easier.
522 // More future-safe could would check for positiveness.
523 */
524 grid->Representation_hid = 0;
525 return 0;
526 }
527 }
528 }
529
530 /* check if charts per grid are already available? */
531 if (grid->Charts_hid)
532 Cgrids = grid->Charts_hid;
533 else
534 {
535 grid->Charts_hid = H5Gopen2(grid->Grid_hid , FIBER_HDF5_CHARTS_PER_GRID, H5P_DEFAULT);
536 if (grid->Charts_hid <0)
537 {
538 puts("ERROR: F5iterate_topology_fields(): Opening charts per grid (\""FIBER_HDF5_CHARTS_PER_GRID"\" FAILED");
539 }
540 }
541
542 local_chart_hid = grid->Chart_hid;
543 grid->Chart_hid = F5Gtry_to_open(grid->Charts_hid , coordinate_system);
544 if (grid->Chart_hid < 0 && strcmp(coordinate_system, FIBER_HDF5_DEFAULT_CHART)==0)
545 {
546 grid->Chart_hid = F5Gtry_to_open(grid->Charts_hid, FIBER_HDF5_DEPRECATED_OLD_DEFAULT_CHART);
547 }
548 if (grid->Chart_hid < 0)
549 {
550 F5printf(10, "F5iterate_topology_fields(): Could not open chart description for `%s'!",
551 coordinate_system );
552 }
553
554 F5printf(100, " F5iterate_topology_fields() --> iterate vertex fields");
555 That.coordinate_system = coordinate_system;
556 retval = H5Giterate(grid->Representation_hid, ".", idx, H5G_iterate_vertex_fields, &That);
557 H5Gclose( grid->Representation_hid );
558 /* if we had no charts per grid opened, close them here again. */
559 if (!Cgrids)
560 {
561 H5Gclose(grid->Charts_hid);
562 grid->Charts_hid = 0;
563 }
564 if (grid->Chart_hid> 0)
565 H5Gclose( grid->Chart_hid );
566
567 grid->Representation_hid = 0;
568 grid->Chart_hid = local_chart_hid;
569
570/*
571 if (retval<0)
572 {
573 fprintf(stderr, "F5iterate_topology_fields(): Iteration error\n");
574 }
575*/
576 return retval;
577#endif
578}
579
580
581
582int F5iterate_fields(F5Path*representation, int *idx,
583 const char*representer_name,
585{
586struct VertexFieldParams That;
587 That.callback = callback;
589 That.path = representation;
590 That.what = 0;
591 That.coordinate_system = representer_name;
592
593 return H5Giterate(representation->Representation_hid, ".", idx, H5G_iterate_vertex_fields, &That);
594}
595
596
597/***********************************************************************************************************/
598
599/*
600typedef herr_t F5_iterate_topologies_t(F5Path*field, const char*topologyname,
601 int index_depth,
602 void *operator_data);
603*/
604
614
615static herr_t H5G_iterate_topologies(hid_t group_id, const char *member_name, void *operator_data)
616{
617struct TopologyParams * That = (struct TopologyParams*)operator_data;
618
619int retval = 0,
620 index_depth = 0,
621skeleton_dimensionality = -1;
622
623 if (F5Iignore(member_name))
624 return 0;
625
626 F5printf(20, " H5G_iterate_topologies(%d,%s,)", (int)(group_id), member_name);
627
628 /* Alternative: just handle groups which have an index depth attribute... */
629
630 /* The charts per grid group is ignored. */
631 if (strcmp(member_name, FIBER_HDF5_CHARTS_PER_GRID)==0)
632 return 0;
633
634 /* The time table per grid group is ignored. */
635 if (strcmp(member_name, F5_TIMETABLE_NAME)==0)
636 return 0;
637
638 /* Ignore the field information tag. */
639 if (strcmp(member_name, FIBER_FIELDS_TAG)==0)
640 return 0;
641
642 if (That->points_done && strcmp(member_name, FIBER_HDF5_POINTS)==0)
643 return 0;
644
645 if (That->cells_done && strcmp(member_name, FIBER_HDF5_CELLS)==0)
646 return 0;
647
648 /* printf("Topology: %s\n", member_name); */
649 assert(That->path->Topology_hid == 0);
650 That->path->Topology_hid = H5Gopen2(group_id, member_name, H5P_DEFAULT);
651 if (That->path->Topology_hid < 0 )
652 puts("ERROR: Opening Topology ID FAILED!");
653
654 index_depth = F5LTget_index_depth(That->path->Topology_hid);
655 if (index_depth == That->do_index_depth)
656 {
657 skeleton_dimensionality = F5LTget_skeleton_dimensionality(That->path->Topology_hid);
658
659 F5printf(5," F5iterate_topologies(%s: Depth=%d, Dims=%d)", member_name, index_depth, skeleton_dimensionality);
660
661 if (skeleton_dimensionality == FIBER_HDF5_INVALID_SKELETON_DIMENSIONALITY)
662 {
663 printf("F5: ** Skeleton group without dimension attribute found - offending group: \"%s\"\n", member_name);
664 fflush(stdout);
665 }
666 else
667 {
668 retval = That->callback(That->path, member_name, index_depth, skeleton_dimensionality, That->operator_data);
669
670 if (retval<0)
671 F5printf(15," ERROR on F5iterate_topologies(%s: Depth=%d, Dims=%d)", member_name, index_depth, skeleton_dimensionality);
672 else
673 F5printf(35," SUCCESS on F5iterate_topologies(%s: Depth=%d, Dims=%d)", member_name, index_depth, skeleton_dimensionality);
674
675 }
676 }
677 else if (index_depth == F5_INVALID_INDEX_DEPTH)
678 {
679 printf("F5: ** Skeleton group without index depth attribute found - offending illegal group: \"%s\"\n", member_name);
680 fflush(stdout);
681 }
682
683 H5Gclose(That->path->Topology_hid);
684 That->path->Topology_hid = 0;
685
686 return retval;
687}
688
690{
691hid_t PointsID;
692int retval;
693struct TopologyParams That;
694
695 That.callback = callback;
697 That.path = grid;
698 That.points_done = 0;
699 That.cells_done = 0;
700
701 assert( grid->Representation_hid == 0 );
702 assert( grid->Topology_hid == 0);
703 assert( grid->Charts_hid == 0 );
704 assert( grid->Chart_hid == 0 );
705
706 if (grid->Charts_hid) H5Gclose(grid->Charts_hid);
707
708 grid->Charts_hid = H5Gopen2(grid->Grid_hid , FIBER_HDF5_CHARTS_PER_GRID, H5P_DEFAULT);
709 if (grid->Charts_hid < 0)
710 {
711 F5printf(10, "F5iterate_topologies(): Opening Charts per Grid FAILED!");
712 puts("ERROR: Opening Charts Per Grid FAILED!");
713 }
714
715 H5E_BEGIN_TRY
716 PointsID = H5Gopen2(grid->Grid_hid, FIBER_HDF5_POINTS, H5P_DEFAULT);
717 H5E_END_TRY
718 // Backward compatibility
719 if (PointsID>0)
720 {
721 int skeleton_dimensionality = F5LTget_skeleton_dimensionality( PointsID );
722 if (FIBER_HDF5_INVALID_SKELETON_DIMENSIONALITY == skeleton_dimensionality)
723 {
724 F5printf(10, "F5iterate_topologies(): BACKWARD COMPATIBILITY MODE: Considering POINTS without skeleton dimensionality.");
725
726 That.path->Topology_hid = PointsID;
727 retval = That.callback(That.path, FIBER_HDF5_POINTS, 0, -1, That.operator_data);
728 That.path->Topology_hid = 0;
729 H5Gclose(PointsID);
730 That.points_done = 1;
731
732 H5E_BEGIN_TRY
733 PointsID = H5Gopen2(grid->Grid_hid, FIBER_HDF5_CELLS, H5P_DEFAULT);
734 H5E_END_TRY
735 if (PointsID>0)
736 {
737 F5printf(10, "F5iterate_topology_fields(): BACKWARD COMPATIBILITY MODE: Considering CELLS without skeleton dimensionality.");
738
739 That.path->Topology_hid = PointsID;
740 retval = That.callback(That.path, FIBER_HDF5_CELLS, 1, 2, That.operator_data);
741 That.path->Topology_hid = 0;
742 H5Gclose(PointsID);
743 That.cells_done = 1;
744 }
745 }
746 else
747 {
748 H5Gclose(PointsID);
749 }
750 }
751
752 F5printf(20, " F5iterate_topologies(): Iterate over all possible index depths on grid %d ", (int)grid->Grid_hid );
753
754 /* iterate over possible index depths */
756 That.do_index_depth++)
757 {
758 F5printf(20, " F5iterate_topologies(): Checking skeletons of depth %d on grid %d ",
759 That.do_index_depth, (int)grid->Grid_hid );
760 retval = H5Giterate(grid->Grid_hid, ".", idx, H5G_iterate_topologies, &That);
761 }
762
763 if (grid->Charts_hid!=0)
764 H5Gclose( grid->Charts_hid );
765
766 grid->Charts_hid = 0;
767
768/*
769 if (retval<0)
770 {
771 fprintf(stderr, "F5iterate_topologies(): Iteration error\n");
772 }
773*/
774
775 return retval;
776}
777
778/***********************************************************************************************************/
779
780
787
788static herr_t H5G_iterate_grid_atlas(hid_t group_id, const char *member_name, void *operator_data)
789{
790struct GridAtlasParams * That = (struct GridAtlasParams*)operator_data;
791herr_t retval;
792hid_t GlobalChart_id = -1,
793 ChartDomain_id = -1;
794 //ChartPoint_id;
795 /* printf("--> %s\n", member_name); */
796
797 H5E_BEGIN_TRY
798 /* Grid/Charts/StandardCartesianChart3D */
799 That->path->Chart_hid = H5Gopen2(group_id, member_name, H5P_DEFAULT);
800 H5E_END_TRY
801 if (That->path->Chart_hid<=0)
802 {
803 F5printf(10, "F5iterate_grid_atlas(): No valid Chart group in Grid, cannot callback.\n");
804 That->path->Chart_hid=0;
805 return 0;
806 }
807
808 H5E_BEGIN_TRY
809 /* Grid/Charts/StandardCartesianChart3D/GlobalChart -> /Charts/Cartesian3D/StandardCartesianChart3D */
810 GlobalChart_id = H5Gopen2(That->path->Chart_hid, FIBER_HDF5_CHART_TO_GLOBALCHART_REF, H5P_DEFAULT );
811 H5E_END_TRY
812 if (GlobalChart_id<=0)
813 {
814 /* Try an alternative for simpler, older files from F5 version 0.1.3
815 */
816 hid_t GlobalCharts_id;
817 H5E_BEGIN_TRY
818 GlobalCharts_id = H5Gopen2(That->path->File_hid, FIBER_HDF5_GLOBAL_CHARTS, H5P_DEFAULT );
819 ChartDomain_id = H5Gopen2(GlobalCharts_id, FIBER_HDF5_CARTESIAN_CHART_DOMAIN, H5P_DEFAULT );
820 GlobalChart_id = H5Gopen2(ChartDomain_id, member_name, H5P_DEFAULT );
821 H5E_END_TRY
822 if (GlobalCharts_id>0)
823 H5Gclose(GlobalCharts_id);
824
825 if (GlobalChart_id<=0)
826 {
827 F5printf(0, "F5iterate_grid_atlas(): No valid Global Chart reference for chart Grid/%s (missing GlobalChart link), ignoring this chart.", member_name);
828 H5Gclose(That->path->Chart_hid);
829 That->path->Chart_hid = 0;
830 return 0;
831 }
832 F5printf(0, "F5iterate_grid_atlas(): No valid Global Chart reference for chart %s, using alternative lookup.\n", member_name);
833 }
834
835 if (ChartDomain_id<=0) /* standard lookup follows */
836 {
837 H5E_BEGIN_TRY
838 /* /Charts/Cartesian3D/StandardCartesianChart3D/Coordinates Group, same as /Charts/Cartesian3D */
839 ChartDomain_id = H5Gopen2(GlobalChart_id, FIBER_HDF5_GLOBALCHART_COORDINATES, H5P_DEFAULT );
840 H5E_END_TRY
841 if (ChartDomain_id<=0)
842 {
843 hid_t GlobalCharts_id;
844
845 F5printf(0, "F5iterate_grid_atlas(): No valid Chart domain for %s, "
846 "file should have group /Charts/"FIBER_HDF5_CARTESIAN_CHART_DOMAIN"/%s/Coordinates "
847 "we try /Charts/"FIBER_HDF5_CARTESIAN_CHART_DOMAIN" instead."
848 , member_name, member_name);
849
850 H5E_BEGIN_TRY
851 GlobalCharts_id = H5Gopen2(That->path->File_hid, FIBER_HDF5_GLOBAL_CHARTS, H5P_DEFAULT );
852 ChartDomain_id = H5Gopen2(GlobalCharts_id, FIBER_HDF5_CARTESIAN_CHART_DOMAIN, H5P_DEFAULT );
853 H5E_END_TRY
854 if (GlobalCharts_id<=0)
855 {
856 F5printf(0, "F5iterate_grid_atlas(): No /"FIBER_HDF5_GLOBAL_CHARTS" group found, unable to identify coordinates for chart %s.", member_name);
857 H5Gclose(That->path->Chart_hid);
858 That->path->Chart_hid = 0;
859 return 0;
860 }
861 H5Gclose(GlobalCharts_id);
862 if (ChartDomain_id<=0)
863 {
864 F5printf(0, "F5iterate_grid_atlas(): "
865 "No chart domain /Charts/"FIBER_HDF5_CARTESIAN_CHART_DOMAIN" found, cannot callback for %s\n",
866 member_name);
867
868 H5Gclose(GlobalChart_id);
869 H5Gclose(That->path->Chart_hid);
870 That->path->Chart_hid = 0;
871 return 0;
872 }
873
876
878 if (!That->path->FileIDs)
879 {
880 F5printf(0, "CANNOT read global chart domain "FIBER_HDF5_GLOBALCHART_COORDINATES );
881 return 0;
882 }
883 F5printf(200, "FALLBACK: iterate grid atlas: copy chart domain");
884 That->path->myChart = F5Bcopy_chart_domain( That->path->FileIDs );
885
886 F5printf(200, "FALLBACK: iterate grid atlas: callback calling");
887 retval = That->callback(That->path, member_name,
888 GlobalChart_id, ChartDomain_id,
889 That->operator_data);
890
891 F5printf(200, "FALLBACK: iterate grid atlas: delete global charts");
892
893 F5B_delete_global_chart(That->path->myChart); That->path->myChart = 0;
894 F5B_delete_global_chart(That->path->FileIDs); That->path->FileIDs = 0;
895
896 F5printf(100, "FALLBACK: Grid Atlas iteration done, closing chart ID");
897 H5Gclose(That->path->Chart_hid);
898 F5printf(100, "FALLBACK: Grid Atlas iteration done, closed chart ID");
899 That->path->Chart_hid = 0;
900 H5Gclose(GlobalChart_id);
901 H5Gclose(ChartDomain_id);
902
903 return retval;
904 }
905 }
906
907/*
908// H5E_BEGIN_TRY
909// ChartPoint_id = H5Topen(ChartDomain_id, FIBER_HDF5_CHART_POINT_TYPE);
910// H5E_END_TRY
911// if (ChartPoint_id>0)
912// puts("all ok");
913*/
916
918 if (!That->path->FileIDs)
919 {
920 F5printf(0, "CANNOT read global chart coordinates "FIBER_HDF5_GLOBALCHART_COORDINATES );
921 return 0;
922 }
923
924 F5printf(200, "iterate grid atlas: copy chart domain");
925 That->path->myChart = F5Bcopy_chart_domain( That->path->FileIDs );
926
927 F5printf(200, "iterate grid atlas: callback calling");
928 retval = That->callback(That->path, member_name,
929 GlobalChart_id, ChartDomain_id,
930 That->operator_data);
931
932 F5printf(200, "iterate grid atlas: delete global charts");
933
934 F5B_delete_global_chart(That->path->myChart); That->path->myChart = 0;
935 F5B_delete_global_chart(That->path->FileIDs); That->path->FileIDs = 0;
936
937
938 F5printf(100, "Grid Atlas iteration done, closing chart ID");
939 H5Gclose(That->path->Chart_hid);
940 F5printf(100, "Grid Atlas iteration done, closed chart ID");
941 That->path->Chart_hid = 0;
942 H5Gclose(GlobalChart_id);
943 H5Gclose(ChartDomain_id);
944/* H5Tclose(ChartPoint_id); */
945
946 return retval;
947}
948
950{
951int retval;
952struct GridAtlasParams GAP;
953 if (!grid) return 0;
954 if (! (grid->Grid_hid>0) )
955 {
956 F5printf(10, "F5iterate_grid_atlas(): No valid Grid ID in path, cannot iterate.\n");
957 return 0;
958 }
959
960 if (grid->Chart_hid>0)
961 {
962 F5printf(10, "F5iterate_grid_atlas(): Grid path already contains a chart, cannot iterate.\n");
963 return 0;
964 }
965
967 GAP.callback = callback;
968 GAP.path = grid;
969
970 F5printf(10, "F5iterate_grid_atlas()");
971
972 retval = H5Giterate(grid->Grid_hid, FIBER_HDF5_CHARTS_PER_GRID, idx, H5G_iterate_grid_atlas, &GAP);
973
974 return retval;
975}
976
977/***********************************************************************************************************/
978/***********************************************************************************************************/
979/***********************************************************************************************************/
980
987
988#if 0
989static herr_t H5G_iterate_field_fragments(hid_t group_id, const char *member_name, void *operator_data)
990{
992 return That->callback(That->path, member_name, That->operator_data);
993}
994#endif
995
996static herr_t H5L_iterate_field_fragments( hid_t g_id, const char *name, const H5L_info_t *info, void *op_data)
997{
998struct FieldFragmentParams*That = (struct FieldFragmentParams*)op_data;
999
1000 if (F5Iignore(name))
1001 return 0;
1002
1003 return That->callback(That->path, name, That->operator_data);
1004}
1005
1007{
1008 /*printf("test here.. \n"); */
1009 if (!field)
1010 {
1011 /*printf( "F5iterate_field_fragments(): No Field given!\n"); */
1012 F5printf(1, "F5iterate_field_fragments(): No Field given!\n");
1013 return 0;
1014 }
1015 if (!field->Field_hid)
1016 {
1017 /*printf("F5iterate_field_fragments(): Field not open, forget to open it?\n"); */
1018 F5printf(1, "F5iterate_field_fragments(): Field not open, forget to open it?\n");
1019 return 0;
1020 }
1021 if (!F5Fis_group(field) )
1022 {
1023 /*printf("F5iterate_field_fragments(): Field is not a group!?\n"); */
1024 F5printf(1, "F5iterate_field_fragments(): Field is not a group!?\n");
1025 return 0;
1026 }
1027 if (!callback)
1028 {
1029 /*printf("F5iterate_field_fragments(): No Callback function given!\n"); */
1030 F5printf(1, "F5iterate_field_fragments(): No Callback function given!\n");
1031 return 0;
1032 }
1033
1034 {
1035 struct FieldFragmentParams That;
1036 int IterateByName = 0;
1037 int major_version, minor_version, release_version;
1038// ArrayType at =
1039 F5Fget_field_enum(field, NULL,
1040 &major_version, &minor_version, &release_version);
1041
1042 // fragments were introduced with 0.1.3
1043 if (major_version == 0 &&
1044 minor_version == 1 &&
1045 release_version < 3)
1046 {
1047 printf( "F5iterate_field_fragments(): Incompatible version %d.%d.%d!\n",
1048 major_version, minor_version, release_version);
1049
1050 F5printf(1, "F5iterate_field_fragments(): Incompatible version %d.%d.%d!\n",
1051 major_version, minor_version, release_version);
1052 return 0;
1053 }
1054
1055 That.callback = callback;
1056 That.path = field;
1058
1059 F5printf(100, "F5iterate_field_fragments()");
1060#if 0
1061 return H5Giterate(field->Field_hid, ".", idx, H5G_iterate_field_fragments, &That);
1062#else
1063
1064 if (major_version == 0 &&
1065 minor_version == 1 &&
1066 release_version < 6)
1067 IterateByName = 1;
1068
1069 {
1070 hid_t gcpl_id = H5Gget_create_plist( field->Field_hid );
1071 unsigned crt_order_flags; // The flags for link creation order
1072 H5Pget_link_creation_order(gcpl_id, &crt_order_flags);
1073 H5Pclose(gcpl_id);
1074
1075 if (crt_order_flags & H5P_CRT_ORDER_TRACKED &&
1076 crt_order_flags & H5P_CRT_ORDER_INDEXED)
1077 IterateByName = 0;
1078 }
1079
1080 if (IterateByName)
1081 {
1082 F5printf(30, "F5iterate_field_fragments() using naming order");
1083 return H5Literate(field->Field_hid, H5_INDEX_NAME, H5_ITER_NATIVE, 0, H5L_iterate_field_fragments, &That);
1084 }
1085 else
1086 {
1087 F5printf(30, "F5iterate_field_fragments() using Creation order");
1088 return H5Literate(field->Field_hid, H5_INDEX_CRT_ORDER, H5_ITER_NATIVE, 0, H5L_iterate_field_fragments, &That);
1089 }
1090#endif
1091 }
1092}
1093
1094
1095
1097{
1098 // (hid_t file_id, hid_t gridinfo_id, const char*gridname, void *user_data);
1101 hid_t file_id;
1102};
1103
1104static herr_t H5G_iterate_grids_per_bundle(hid_t group_id, const char *member_name, void *operator_data)
1105{
1107// F5printf(100, "H5G_iterate_grids_per_bundle() before open");
1108hid_t gridinfo_id = F5Gtry_to_open(group_id, member_name);
1109herr_t ok;
1110// F5printf(100, "H5G_iterate_grids_per_bundle() after open, before callback");
1111 ok = That->callback( That->file_id, gridinfo_id, member_name, That->operator_data);
1112// F5printf(100, "H5G_iterate_grids_per_bundle() after callback");
1113 H5Gclose( gridinfo_id );
1114
1115// F5printf(100, "H5G_iterate_grids_per_bundle() end");
1116
1117 return ok;
1118}
1119
1120#ifdef F5_BACKWARD_COMPATIBILITY
1121static herr_t H5G_iterate_grids_per_bundle_from_timeslices(hid_t group_id, const char *member_name, void *operator_data)
1122{
1124
1125 F5printf(1, "Ancient File Recovery: Found grid=[%s]", member_name);
1126
1127hid_t gridinfo_id = F5Gtry_to_open(group_id, member_name);
1128herr_t ok;
1129
1130 ok = That->callback( That->file_id, gridinfo_id, member_name, That->operator_data);
1131
1132 H5Gclose( gridinfo_id );
1133
1134 return ok;
1135}
1136
1137static herr_t H5G_iterate_grids_per_bundle_via_timeslices(hid_t group_id, const char *member_name, void *operator_data)
1138{
1139 F5printf(10, "Ancient File Recovery: At T=[%s]", member_name);
1140 H5Giterate(group_id, member_name, 0, H5G_iterate_grids_per_bundle_from_timeslices, operator_data);
1141 return 0;
1142}
1143#endif
1144
1146{
1147hid_t TableOfContents, Grids;
1148int nGrids = 0;
1150
1151 That.callback = callback;
1152 That.operator_data = user_data;
1153 That.file_id = file_id;
1154
1155 TableOfContents = F5Gtry_to_open(file_id, FIBER_CONTENTS );
1156 if (TableOfContents < 1)
1157 {
1158 F5printf(1, "No table of contents? This must be an ancient file...");
1159#ifdef F5_BACKWARD_COMPATIBILITY
1160 return H5Giterate(file_id, "/", idx, H5G_iterate_grids_per_bundle_via_timeslices, &That);
1161#else
1162 return -1;
1163#endif
1164 }
1165
1166 Grids = F5Gtry_to_open( TableOfContents, FIBER_CONTENT_GRIDS );
1167 H5Gclose( TableOfContents );
1168
1169 if (Grids < 0)
1170 return 0;
1171
1172 F5printf(100, "F5iterate_grid_per_bundle()");
1173 nGrids = H5Giterate(Grids, ".", idx, H5G_iterate_grids_per_bundle, &That);
1174 H5Gclose( Grids );
1175 F5printf(100, "after H5Giterate");
1176
1177 return nGrids;
1178}
1179
1189
1190static herr_t my_gridslices(hid_t gridinfo_id, const char*slicename, void *user_data)
1191{
1193hid_t Slice_hid;
1194const char**s;
1195
1196 Slice_hid = F5Gtry_to_open(gridinfo_id, slicename);
1197
1198 if (Slice_hid<0)
1199 {
1200 printf(" --> NO TIME GROUP: %s\n", slicename);fflush(stdout);
1201 return 0;
1202 }
1203
1204/* printf(" --> TIME GROUP: Yay, %s\n", slicename); */
1205
1206 for(s=F5_default_time_attrib_names; *s; s++)
1207 {
1208 hid_t attr_id;
1209 double time = 0.0;
1210
1211 H5E_BEGIN_TRY
1212 attr_id = F5Aopen_name(Slice_hid, *s);
1213 H5E_END_TRY
1214
1215 if (attr_id<0)
1216 continue;
1217
1218 F5printf(50,"H5G_iterate_gridslices(): reading time attribute [%s]\n", *s);
1219 if (F_H5Aread(attr_id, H5T_NATIVE_DOUBLE, &time, *s)<0)
1220 {
1221 H5Aclose(attr_id);
1222 H5Gclose(Slice_hid);
1223 continue;
1224 }
1225 H5Aclose(attr_id);
1226 /* printf(" SLICE: Have Grid %s at T=%lg (from %s)\n", That->gridname, time, slicename ); */
1227 assert( That->callback );
1228// That->callback( That->file_id, That->gridname, time, Slice_hid, That->user_data);
1229 That->callback( That->file_id, That->gridname, time, slicename, That->user_data);
1230 break;
1231 }
1232 H5Gclose(Slice_hid);
1233 return 0;
1234}
1235
1236
1237#ifdef F5_BACKWARD_COMPATIBILITY
1238
1244
1245
1246static herr_t my_grids_per_bundle_emulate_via_timeslice(hid_t file_id, const char*slicename, void *user_data)
1247{
1249hid_t Slice_hid;
1250 F5printf(10,"Ancient File Recovery: Scanning for grid [%s] in [%s]", That->gridname, slicename);
1251 Slice_hid = F5Gtry_to_open(file_id, slicename);
1252 if (Slice_hid>0)
1253 {
1254 hid_t Grid_hid = F5Gtry_to_open(Slice_hid, That->gridname);
1255 if (Grid_hid>0)
1256 {
1257 const char**s;
1258 for(s=F5_default_time_attrib_names; *s; s++)
1259 {
1260 hid_t attr_id;
1261 double time = 0.0;
1262
1263 H5E_BEGIN_TRY
1264 attr_id = F5Aopen_name(Slice_hid, *s);
1265 H5E_END_TRY
1266
1267 if (attr_id<0)
1268 continue;
1269
1270 if (F_H5Aread(attr_id, H5T_NATIVE_DOUBLE, &time, *s)<0)
1271 {
1272 H5Aclose(attr_id);
1273 H5Gclose(Slice_hid);
1274 continue;
1275 }
1276 H5Aclose(attr_id);
1277
1278 F5printf(10,"Ancient File Recovery: GOT grid [%s] in [%s] for T=%g (attribute %s)",
1279 That->gridname, slicename, time, *s);
1280
1281 assert( That->That->callback );
1282 That->That->callback( That->That->file_id, That->gridname, time, slicename, That->That->user_data);
1283 break;
1284 }
1285 H5Gclose( Grid_hid);
1286 }
1287 else
1288 {
1289 F5printf(1,"Ancient File Recovery - no such grid [%s/%s]???", slicename, That->gridname);
1290 }
1291 H5Gclose(Slice_hid);
1292 }
1293 else
1294 {
1295 F5printf(1,"Ancient File Recovery - no such slice [%s]???", slicename);
1296 }
1297
1298 return 0;
1299}
1300#endif
1301
1302static herr_t my_grids_per_bundle(hid_t file_id, hid_t gridinfo_id, const char*gridname, void *user_data)
1303{
1306/* printf("GRIDS: Yay, %s\n", gridname); */
1307
1308 if (That->gridinfo)
1309 That->gridinfo( file_id, gridinfo_id, gridname, That->user_data);
1310
1311 {
1312 hsize_t NTimeEntries = F5Bget_timetable_size( gridinfo_id );
1313 F5printf(20, "GRID [%s] has %d time table entries\n", gridname, (int)NTimeEntries);
1314 if (NTimeEntries)
1315 {
1316 TimeTableEntry*TTE = (TimeTableEntry*)malloc(sizeof(TimeTableEntry)*NTimeEntries);
1317 hsize_t readEntries = F5Bread_timetable( gridinfo_id, TTE, NTimeEntries);
1318
1319 if (readEntries == NTimeEntries)
1320 {
1321 hsize_t i;
1322 F5printf(10, "GRID [%s] iterating over %d time table entries\n", gridname, (int)NTimeEntries);
1323 for(i=0; i<readEntries; i++)
1324 {
1325// F5printf(11, "GRID [%s] for %d time is at slice [%s]\n", gridname, i, TTE[i].TimesliceName);
1326#if 0
1327 printf("GRID [%s] for %d time is at slice [%s]\n", gridname, i, TTE[i].TimesliceName);
1328 fflush(stdout);
1329#endif
1330 /*
1331 * in case the time slice name is invalid, we'd need to discard this entire looping
1332 * and fall back to the alternative iteration scheme. This needs to be done in two
1333 * loops then. Not implemented yet.
1334 */
1335 assert( TTE[i].TimesliceName && "Invalid time slice name detected in time table");
1336 That->callback( file_id, gridname, TTE[i].TimeValue, TTE[i].TimesliceName, That->user_data);
1337 }
1338 free(TTE);
1339 return 0;
1340 }
1341 F5printf(1, "ERROR: Grid [%s] has %d time table entries but only %d could be read!\n",
1342 gridname, (int)NTimeEntries, (int)readEntries);
1343 free(TTE);
1344 }
1345 else // check if this is the grid itself of an ancient F5 file
1346 {
1347 hid_t TableOfContents = F5Gtry_to_open(file_id, FIBER_CONTENTS );
1348 if (TableOfContents < 1)
1349 {
1350#ifdef F5_BACKWARD_COMPATIBILITY
1351 F5printf(1, "Emulating F5iterate_gridevolution() for ancient file's grid=%s...", gridname);
1352 // retrieve: (hid_t file_id, const char*gridname, double time, const char*slicename, void *user_data);
1353
1355 This.That = That;
1356 This.gridname = gridname;
1357 return H5Giterate(file_id, "/", NULL, &my_grids_per_bundle_emulate_via_timeslice, &This);
1358#else
1359 F5printf(1, "No Table of Contents found when trying to look for grid=%s...", gridname);
1360 return 01;
1361#endif
1362 }
1363 else
1364 H5Gclose(TableOfContents);
1365 }
1366 }
1367
1368 F5printf(100, "F5iterate_gridevolution()");
1369 return H5Giterate(gridinfo_id, ".", NULL, my_gridslices, That);
1370}
1371
1373 void *user_data, F5_iterate_grids_per_bundle_t*gridinfo)
1374{
1376 That.callback = callback;
1377 That.user_data = user_data;
1378 That.file_id = file_id;
1379 That.gridinfo = gridinfo;
1380
1381 F5printf(100, "F5iterate_gridevolution() before F5iterate_grids");
1382int ok = F5iterate_grids_per_bundle(file_id, idx, my_grids_per_bundle, &That);
1383 F5printf(100, "F5iterate_gridevolution() after F5iterate_grids");
1384 return ok;
1385}
F5_API const char * F5_default_time_attrib_names[]
Definition F5Bslice.c:10
ChartDomain_IDs * F5Bcopy_chart_domain(const ChartDomain_IDs *srcIDs)
Definition F5Bchart.c:851
void F5B_delete_global_chart(ChartDomain_IDs *ID)
Definition F5Bchart.c:632
ChartDomain_IDs * F5B_read_chart_domain(hid_t ChartDomainLocationID, const char *DefaultChartName)
Definition F5Bchart.c:720
ChartDomain_IDs * F5B_read_global_chart(hid_t ChartsID, const char *name)
Definition F5Bchart.c:696
int F5Fis_group(const F5Path *fpath)
Definition F5F.c:126
hid_t F5Fget_type(F5Path *f)
Definition F5F.c:156
ArrayType F5Fget_field_enum(const F5Path *fpath, const char *fieldname, int *major_version, int *minor_version, int *release_version)
Definition F5F.c:17
F5_API int F5LTget_skeleton_dimensionality(hid_t Top_hid)
Definition F5LT.c:34
return ok
Definition F5P.c:95
H5Tclose(type_id)
name
Definition F5P.c:82
free(name)
#define FIBER_HDF5_REPRESENTER
Definition F5defs.h:114
#define FIBER_HDF5_CHARTS_PER_GRID
Definition F5defs.h:110
#define FIBER_HDF5_INVALID_SKELETON_DIMENSIONALITY
Definition F5defs.h:261
#define F5_INVALID_INDEX_DEPTH
Definition F5defs.h:233
#define FIBER_FIELDS_TAG
Definition F5defs.h:27
#define FIBER_HDF5_CARTESIAN_CHART_DOMAIN
Definition F5defs.h:77
#define F5_MAX_INDEX_DEPTH
Definition F5defs.h:245
#define FIBER_HDF5_DEFAULT_CHART
Definition F5defs.h:74
#define FIBER_HDF5_GLOBAL_CHARTS
Definition F5defs.h:109
#define FIBER_HDF5_POINTS
Definition F5defs.h:55
#define F5_TIMETABLE_NAME
Definition F5defs.h:150
#define FIBER_HDF5_DEPRECATED_OLD_DEFAULT_CHART
Definition F5defs.h:88
#define FIBER_HDF5_CELLS
Definition F5defs.h:57
#define FIBER_HDF5_GLOBALCHART_COORDINATES
Definition F5defs.h:112
#define F5_MIN_INDEX_DEPTH
Definition F5defs.h:239
#define FIBER_CONTENTS
Definition F5defs.h:23
#define FIBER_CONTENT_GRIDS
Definition F5defs.h:24
#define FIBER_HDF5_CHART_TO_GLOBALCHART_REF
Definition F5defs.h:111
int F5iterate_field_fragments(F5Path *field, int *idx, F5_iterate_fields_fragments_t *callback, void *operator_data)
Definition F5iterate.c:1006
int F5iterate_grid_atlas(F5Path *grid, int *idx, F5_iterate_grid_atlas_t *callback, void *operator_data)
Definition F5iterate.c:949
herr_t F5_iterate_fields_fragments_t(F5Path *field, const char *fragmentname, void *operator_data)
Definition F5iterate.h:199
herr_t F_H5Aread(hid_t attr_id, hid_t mem_type_id, void *buf, const char *name)
Definition F5private.c:332
#define F5printf(verbosity,...)
Definition F5private.h:60
int F5Fopen(F5Path *f, const char *fieldname)
Definition F5F.c:66
void F5Fclose(F5Path *f)
Definition F5F.c:92
void F5close(F5Path *f)
Definition F5B.c:186
F5_API int F5LTget_index_depth(hid_t Top_hid)
Definition F5LT.c:21
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
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
int F5iterate_grids(F5Path *slice, 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
int F5iterate_topologies(F5Path *grid, int *idx, F5_iterate_topologies_t *callback, void *operator_data)
Definition F5iterate.c:689
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
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
int F5has_standard_vertex_fields(F5Path *grid)
Definition F5iterate.c:278
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
int F5iterate_topology_fields(F5Path *grid, int *idx, F5_iterate_fields_t *callback, void *operator_data, const char *coordinate_system, F5_fieldtype_t *what)
Definition F5iterate.c:296
int F5iterate_timeslices(hid_t file_id, hsize_t *idx, F5_iterate_timeslices_t *callback, void *operator_data)
Definition F5iterate.c:105
int F5iterate_fields(F5Path *representation, int *idx, const char *representer_name, F5_iterate_fields_t *callback, void *operator_data)
Definition F5iterate.c:582
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
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
hid_t F5Aopen_name(hid_t location, const char *name)
Definition F5A.c:34
F5_API hsize_t F5Bget_timetable_size(hid_t loc_id)
Definition F5Bslice.c:328
hsize_t F5Bread_timetable(hid_t loc_id, TimeTableEntry *TTE, hsize_t table_size)
Definition F5Bslice.c:366
F5Path * F5Binitialize_path(hid_t File_id)
Definition F5B.c:156
struct _TimeTableEntry TimeTableEntry
#define H5Gclose(x)
Definition F5X.h:144
hid_t F5Gtry_to_open(hid_t location, const char *name)
Definition F5X.c:297
int F5_gridproperty_t(F5Path *grid, const char *coordinate_system)
Definition F5P.h:63
F5_iterate_representations_t * callback
Definition F5iterate.c:439
F5Path * skeleton
Definition F5iterate.c:441
void * operator_data
Definition F5iterate.c:440
hid_t Grid_hid
Definition F5Path.h:53
ChartDomain_IDs * FileIDs
Definition F5Path.h:35
hid_t field_enum_type_hid
Definition F5Path.h:48
hid_t Charts_hid
Definition F5Path.h:55
hid_t Representation_hid
Definition F5Path.h:58
hid_t Slice_hid
Definition F5Path.h:52
hid_t Field_hid
Definition F5Path.h:59
hid_t Topology_hid
Definition F5Path.h:57
hid_t Chart_hid
Definition F5Path.h:56
ChartDomain_IDs * myChart
Definition F5Path.h:33
hid_t File_hid
Definition F5Path.h:50
F5_iterate_grids_per_bundle_t * gridinfo
Definition F5iterate.c:1183
F5_iterate_gridevolution_per_bundle_t * callback
Definition F5iterate.c:1182
F5_iterate_fields_fragments_t * callback
Definition F5iterate.c:983
F5_iterate_grid_atlas_t * callback
Definition F5iterate.c:783
F5Path * path
Definition F5iterate.c:784
void * operator_data
Definition F5iterate.c:785
F5_iterate_grids_per_bundle_t * callback
Definition F5iterate.c:1099
F5_iterate_timeslices_t * callback
Definition F5iterate.c:28
F5_gridproperty_t ** gridtypes
Definition F5iterate.c:164
const char * coordinate_system
Definition F5iterate.c:166
F5Path * path
Definition F5iterate.c:165
F5_iterate_grids_t * callback
Definition F5iterate.c:162
void * operator_data
Definition F5iterate.c:163
void * operator_data
Definition F5iterate.c:608
F5_iterate_topologies_t * callback
Definition F5iterate.c:607
F5Path * path
Definition F5iterate.c:609
F5_iterate_fields_t * callback
Definition F5iterate.c:224
const char * coordinate_system
Definition F5iterate.c:228
F5_fieldtype_t * what
Definition F5iterate.c:226
F5iterate_gridevolution_struct * That
Definition F5iterate.c:1241