aboutsummaryrefslogtreecommitdiff
path: root/CarpetDev/CarpetIOF5/src/data_region.hh
blob: 9b354166a690919d320260a2b36008b4dc816784 (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
#ifndef DATA_REGION_HH
#define DATA_REGION_HH

#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 ();
      
      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