FiberVISH 0.2
Fish - The Fiber Bundle API for the Vish Visualization Shell
HDF5Field.hpp
1
2//
3// $Id: HDF5Field.hpp,v 1.4 2007/09/17 21:48:54 werner Exp $
4//
6#ifndef __FIBER_HDF5FIELD_HPP
7#define __FIBER_HDF5FIELD_HPP "Created 27.02.2001 21:42:27 by werner"
8
9#include "HDF5Bundle.hpp"
10#include "HDF5MemArrayStorage.hpp"
11
12#include <F5/F5private.h>
13
14#include <vecal/CartesianCoordinates.hpp>
15#include <vecal/CartesianChart.hpp>
16#include <vecal/ipol/ViewMultiArray.hpp>
17#include <vecal/ipol/STLMultiArray.hpp>
18#include <field/ArrayList.hpp>
19
20namespace Fiber
21{
22 using VecAl::ViewPtr;
23
24
25/*
26template <class T>
27 void HDF5print(const T&);
28
29template <>
30inline void HDF5print(const double&d)
31{
32 printf("%lg", d);
33}
34
35template <>
36inline void HDF5print(const float&d)
37{
38 printf("%g", d);
39}
40
41template <int N, class Value>
42inline void HDF5print(const FixedArray<N, Value>&FA)
43{
44 for(int i=0; i<N; i++)
45 {
46 HDF5print( FA[i] );
47 printf(" ");
48 }
49}
50
51template <int N, class Value>
52inline void HDF5print(const Vector<N, Value>&V)
53{
54 HDF5print( V.fixed_array() );
55}
56
57template <int N, class Value>
58inline void HDF5print(const VVector<N, Value>&V)
59{
60 HDF5print( V.vec() );
61}
62
63template <int C, class value>
64inline void HDF5print(const Row<C, value>&R)
65{
66 HDF5print(R.vvec());
67}
68
69
70template <class ChartType, class TensorType>
71inline void HDF5print(const Tensor<ChartType, TensorType>&d)
72{
73 HDF5print(d.base() );
74}
75
76template <class ChartType, class ScalarType>
77inline void HDF5print(const Point<ChartType, ScalarType>&d)
78{
79 HDF5print(d.vec() );
80}
81*/
82
83
84template <int N, class T, class Storage>
85class HDF5BUNDLE_API HDF5SaverCreator<MemArrayStorage<N, T, Storage> > : public SaveInterfaceCreator<MemArrayStorage<N, T, Storage> >
86{
87 bool addSaveInterface(MemArrayStorage<N, T, Storage>*M) override
88 {
89 M->addInterface( new HDF5Saver<MemArrayStorage<N, T, Storage> >(M);
90 return false;
91 }
92};
93
94template <class MemArrayStorageType>
96{
97static int init()
98 {
100 return 1;
101 }
102};
103
104template <int Dims, class Type>
117
118
119template <class Type, int Dims>
121
122template <class Type>
124{
125static int init()
126 {
128 }
129};
130
131template <class Type, int Dims=4>
141
142
143
144} /* namespace Fiber */
145
146#endif // __FIBER_HDF5FIELD_HPP
147
An iterator with an optional DataCreator, which is just a class to intercept creation of data along a...
Definition CreativeIterator.hpp:34
Definition HDF5Saver.hpp:29
Given a fragmented field of curvilinear coordinates, (3D array of coordinates), build a uniform Grid ...
Definition FAQ.dox:2
Definition HDF5Saver.hpp:24
Definition HDF5Field.hpp:96
Definition HDF5Field.hpp:106
Definition HDF5Saver.hpp:34