FiberVISH 0.2
Fish - The Fiber Bundle API for the Vish Visualization Shell
SaveGrid.hpp
1#ifndef __FIBER_FIBERIO_HDF5_GRIDSAVER_HPP
2#define __FIBER_FIBERIO_HDF5_GRIDSAVER_HPP
3
4#include "F5Skeleton.hpp"
5#include "HDF5Binder.hpp"
6#include "HDF5Saver.hpp"
7#include <bundle/Occurrence.hpp>
8
9
10namespace Fiber
11{
12
13namespace FiberIO
14{
15
16namespace HDF5
17{
18
19using namespace MemCore;
20using namespace Fiber;
21
22template <>
23struct HDF5Saver<Representation> : Skeleton::RepresentationMap::Iterator
24{
25 RefPtr<H5File> myFile;
26 RefPtr<Bundle> myBundle;
27 const GridID &Gid;
28 WeakPtr<Grid> myGrid;
29 const SkeletonID &Sid;
30 const Skeleton &S;
31 double time;
32 const Occurrence<Bundle>&OB;
33 const RefPtr<Fiber::Binder> myBinder;
35
36
38 const GridID&Id,
39 const WeakPtr<Grid>&theGrid,
40 const SkeletonID&id, const Skeleton&Skel,
41 double T, const Occurrence<Bundle> &pOB,
44 : myFile ( theFile )
45 , myBundle(B)
46 , Gid(Id)
47 , myGrid ( theGrid )
48 , Sid(id), S(Skel)
49 , time(T)
50 , OB(pOB)
51 , myBinder(theBinder)
52 , myST(theST)
53 {}
54
55 bool apply(const Representer&d, Representation&R) override;
56};
57
58template <>
60{
61 RefPtr<H5File> myFile;
62 RefPtr<Bundle> myBundle;
63 const WeakPtr<Grid> myGrid;
64 const Occurrence<Bundle> &OB;
65 const RefPtr<Fiber::Binder> myBinder;
67
69 const GridID&Id,
70 const WeakPtr<Grid>&theGrid,
74 : Occurrence<Grid>(T, Id.self() )
75 , myFile ( theFile )
76 , myBundle(B)
77 , myGrid( theGrid )
78 , OB(pOB)
79 , myBinder(theBinder)
80 , myST( theST )
81 {}
82
83 bool apply(const SkeletonID&id, Skeleton&S) override;
84};
85
86template <>
88{
89 double time;
90 const ParameterSet& Params;
91 RefPtr<H5File> myFile;
92 RefPtr<Bundle> myBundle;
93 const Occurrence<Bundle> &OB;
94 const RefPtr<Fiber::Binder> myBinder;
96
98 ParameterSet&P, double T, const Occurrence<Bundle> &pOB,
102 , time(T)
103 , Params(P)
104 , myFile ( theFile )
105 , myBundle(B)
106 , OB(pOB)
107 , myBinder(theBinder)
108 , myST( theST )
109 {}
110
111 bool apply(GridID&id, Grid&g) override;
112
113 void renameGridSkeletons(GridID&id, Grid&g) const;
114};
115
116}}} // namespace
117
118#endif // __FIBER_FIBERIO_HDF5_GRIDSAVER_HPP
_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
A grid identifier.
Definition GridID.hpp:29
Iterator callback object for iteration within time slices.
Definition Slice.hpp:16
A Grid is a set of Skeleton objects, each of them accessed via some unique SkeletonID object.
Definition Grid.hpp:60
A template family to collect information where certain objects reside within a Bundle.
Definition Occurrence.hpp:13
Definition ParameterSpace.hpp:49
A Representation is a set of Field objects, each of them accessed via some FieldID identifier.
Definition Representation.hpp:101
Identifier for Skeletons within a Grid.
Definition SkeletonID.hpp:24
Base class for iterators over a sequence of skeletons.
Definition SkeletonMap.hpp:38
A Skeleton is a set of Representation object, each of them accessed by an Representer object.
Definition Skeleton.hpp:102
const auto & self() const
Given a fragmented field of curvilinear coordinates, (3D array of coordinates), build a uniform Grid ...
Definition FAQ.dox:2
Definition HDF5Saver.hpp:24