aboutsummaryrefslogtreecommitdiff
path: root/CarpetDev/CarpetIOF5/src/f5writer.hh
blob: ae016721efe42d66aeb98fadeb17508e0baf32c5 (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
71
72
73
74
#ifndef F5WRITER_HH
#define F5WRITER_HH

#include "cctk.h"

#include "bbox.hh"
#include "defs.hh"
#include "dh.hh"

#include "file.hh"
#include "physical_quantity.hh"
#include "simulation.hh"
#include "timestep.hh"
#include "topology.hh"



namespace CarpetIOF5 {
  
  class f5writer_t {
    
    cGH const * const m_cctkGH;
    int const m_variable;
    
  public:
    
    f5writer_t (cGH const * cctkGH,
                int variable);
    
    void
    write (F5::file_t & file)
      const;
    
  private:
    
    void
    write_meta (F5::file_t & file,
                bool have_metafile)
      const;
    
    void
    write_one_mglevel (F5::timestep_t & timestep,
                       bool have_metafile)
      const;
    
    void
    write_global (F5::simulation_t & simulation,
                  bool have_metafile)
      const;
    
    void
    write_one_reflevel (F5::simulation_t & simulation,
                        bool have_metafile)
      const;
    
    void
    write_one_map (F5::simulation_t & simulation,
                   bool have_metafile)
      const;
    
    void
    write_one_component (F5::physical_quantity_t & physical_quantity,
                         bool have_metafile)
      const;
    
    bbox<int,dim> const &
    determine_region (dh::dboxes const & boxes)
      const;
    
  };
  
} // namespace CarpetIOF5

#endif  // #ifndef F5WRITER_HH