aboutsummaryrefslogtreecommitdiff
path: root/CarpetDev/CarpetIOF5_standalone/src/timestep.hh
blob: d70a00024064c8d2c1a6fd738fdde9fbc39f5621 (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
68
69
70
#ifndef TIMESTEP_HH
#define TIMESTEP_HH

#include <string>

#include <hdf5.h>

#include "cctk.h"

#include "file.hh"



namespace CarpetIOF5 {
  
  using std::string;
  
  namespace F5 {
  
    class timestep_t {
      
      file_t & m_file;
      
      CCTK_REAL const m_time;
      
      string m_name;
      
      hid_t m_hdf5_timestep;
      
      timestep_t ();
      timestep_t (timestep_t const &);
      timestep_t operator= (timestep_t const &);
      
    public:
      
      timestep_t (file_t & file,
                  CCTK_REAL time,
                  char const * name = 0);
      
      virtual
      ~ timestep_t ();
      
      file_t &
      get_file ()
        const;
      
      CCTK_REAL
      get_time ()
        const;
      
      hid_t
      get_hdf5_timestep ()
        const;
      
      void
      get_link_destination (int proc,
                            string & filename,
                            string & objectname)
        const;
      
      virtual bool
      invariant ()
        const;
    };
    
  } // namespace F5

} // namespace CarpetIOF5

#endif  // #ifndef TIMESTEP_HH