blob: 29d5504c7ddbb6cee8283aaf0713cb4f839b0cf0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
#ifndef DATA_REGION_HH
#define DATA_REGION_HH
// force HDF5 1.8.x installations to use the new API
#ifdef H5Dcreate_vers
#undef H5Dcreate_vers
#endif
#define H5Dcreate_vers 2
#include <hdf5.h>
#include "bbox.hh"
#include "defs.hh"
#include "tensor_component.hh"
namespace CarpetIOF5 {
namespace F5 {
class data_region_t {
tensor_component_t & m_tensor_component;
bbox<int, dim> const m_region;
hid_t m_properties;
hid_t m_dataset;
hid_t m_dataspace;
data_region_t ();
data_region_t (data_region_t const &);
data_region_t operator= (data_region_t const &);
public:
data_region_t (tensor_component_t & tensor_component,
bbox<int, dim> const & region);
virtual
~ data_region_t ();
static string
name_from_region (bbox<int, dim> const & region);
tensor_component_t &
get_tensor_component ()
const;
void
write (void const * data,
int cactus_datatype)
const;
virtual bool
invariant ()
const;
};
} // namespace F5
} // namespace CarpetIOF5
#endif // #ifndef DATA_REGION_HH
|