FiberVISH 0.2
Fish - The Fiber Bundle API for the Vish Visualization Shell
LoadFragment.hpp
1#ifndef __FIBER_FIBERIO_HDF5_FRAGMENTLOADER_HPP
2#define __FIBER_FIBERIO_HDF5_FRAGMENTLOADER_HPP
3
4#include <fiber/grid/Skeleton.hpp>
5#include <memcore/Loader.hpp>
6#include <F5/F5Path.h>
7#include <F5/F5Path.h>
8#include <fiber/bundle/StorageTransformations.hpp>
9#include "H++/H5FileAccess.hpp"
10#include "H++/H5Group.hpp"
11
12#include "PrecisionTransformation.hpp"
13#include "LoadGrid.hpp"
14
15namespace Fiber
16{
17namespace FiberIO
18{
19namespace HDF5
20{
21
22using namespace Fiber;
23using namespace MemCore;
24
25
27{
28public:
29 GridLoader&myGridLoader;
30
31 RefPtr<Skeleton> mySkeleton;
32 RefPtr<Field> MyField;
33 RefPtr<H5Group> myFieldGroup;
34
37 string path_info;
38 int GroupEntries = 0;
39
40 hid_t type_class_id = -1;
41
43
44 RefPtr<H5GroupAccess> GroupAccess;
45 RefPtr<H5DatasetAccess> DatasetAccess;
47
48 std::unordered_set<std::string> IgnoreAttributesOnLoad;
49
54 const string&FieldNameInFile,
59 const string&the_path_info);
60
62
63 bool getFragmentNames(FragmentNames_t&, F5Path*field);
64
65 virtual herr_t apply(F5Path*field, const char*fragmentname) = 0;
66
67public:
68 herr_t iterate(F5Path*field);
69
70 herr_t loadContiguousFragment(F5Path*field,
71 const char*fragmentname,
73
74// herr_t loadCompoundFragment(F5Path*field, const char*fragmentname);
75
76 herr_t loadUniformFragment(F5Path*field, const char*fragmentname);
77
79};
80
82{
83 MemCore::WeakPtr<Fiber::Skeleton> myRepresentationTarget;
84// int Current = 0;
85 int NumberOfFields = 0, CurrentFieldNumber = 0;
86
91 const string&FieldNameInFile,
96 const string&the_path_info,
99 int NumberOfFields, int CurrentFieldNumber);
100
102
104
105 herr_t apply(F5Path*field, const char*fragmentname) override;
106};
107
108#if 0
110{
111 int Current = 0;
112
116 const string&FieldNameInFile,
120 const string&the_path_info)
124 {}
125
127 {
128 if (LP) LP->progress(fragmentname, Current++, GroupEntries);
130 }
131};
132#endif
133
135{
136 size_t NumberOfFragments = 1;
137 size_t CurrentFragment = 0;
138
143 const string&FieldNameInFile,
148 const string&the_path_info)
151 theFieldGroup, lp, LoadPerformance,
153 {
154 NumberOfFragments = theFieldGroup->NumberOfEntries();
155 }
156
157 herr_t apply(F5Path*field, const char*fragmentname)
158 {
159 if (LP)
160 {
161 LP->progress( "Loading uniform fragment " + path_info + "[" + fragmentname + "]",
162 CurrentFragment, NumberOfFragments);
163 }
164 CurrentFragment++;
165 return loadUniformFragment(field, fragmentname);
166 }
167};
168
169}
170}
171}
172
173#endif // __FIBER_FIBERIO_HDF5_FRAGMENTLOADER
_Expr< _ValFunClos< _ValArray, _Tp >, _Tp > apply(_Tp __func(_Tp)) const
An iterator with an optional DataCreator, which is just a class to intercept creation of data along a...
Definition CreativeIterator.hpp:34
Definition LoadFragment.hpp:27
bool loadViaFragmentCache(const RefPtr< H5Group > &)
Definition FragmentCache.cpp:51
Definition LoadGrid.hpp:18
Given a fragmented field of curvilinear coordinates, (3D array of coordinates), build a uniform Grid ...
Definition FAQ.dox:2
bool loadAllFragments(F5Path *field)
Definition LoadFragment.cpp:521
Helper class.
Definition PrecisionTransformation.hpp:25
Definition LoadFragment.hpp:135
Definition HDF5Saver.hpp:34