CosmoGRaPH v0.0
io.h
1 #ifndef COSMO_UTILS_IO_H
2 #define COSMO_UTILS_IO_H
3 
4 #include "../cosmo_includes.h"
5 #include "../cosmo_types.h"
6 #include "../cosmo_globals.h"
7 
8 #include "../utils/Fourier.h"
9 #include "../utils/FRW.h"
10 #include "../utils/math.h"
11 
12 #if USE_COSMOTRACE
13 #include "../components/cosmotrace/raytrace.h"
14 #endif
15 
16 #include "../components/bssn/bssn.h"
17 #include "../components/bssn/bardeen.h"
18 #include "../components/scalar/scalar.h"
19 #include "../components/phase_space_sheet/sheets.h"
20 #include "../components/particles/particles.h"
21 #include "IOData.h"
22 
23 namespace cosmo
24 {
25 
26 void log_defines(IOData *iodata);
27 void io_config_backup(IOData *iodata, std::string config_file);
28 void io_show_progress(idx_t s, idx_t maxs);
29 
30 void io_bssn_fields_snapshot(IOData *iodata, idx_t step,
31  map_t & bssn_fields);
32 void io_bssn_fields_powerdump(IOData *iodata, idx_t step,
33  map_t & bssn_fields, Fourier *fourier);
34 void io_bssn_constraint_violation(IOData *iodata, idx_t step, BSSN * bssnSim);
35 void io_print_constraint_violation(IOData *iodata, BSSN * bssnSim);
36 void io_bssn_dump_statistics(IOData *iodata, idx_t step,
37  map_t & bssn_fields, FRW<real_t> *frw);
38 
39 # if USE_COSMOTRACE
40 void io_raytrace_dump(IOData *iodata, idx_t step,
41  std::vector<RayTrace<real_t, idx_t> *> const * rays);
42 #endif
43 
44 bool io_read_3dslice(IOData *iodata, arr_t & field, std::string filename);
45 
46 void io_scalar_snapshot(IOData *iodata, idx_t step, Scalar * scalar);
47 void io_sheets_snapshot(IOData *iodata, idx_t step, Sheet * sheets);
48 
49 void io_dump_2dslice(IOData *iodata, arr_t & field, std::string filename);
50 void io_dump_3dslice(IOData *iodata, arr_t & field, std::string filename);
51 void io_dump_strip(IOData *iodata, arr_t & field, std::string file,
52  int axis, idx_t n1, idx_t n2);
53 void io_print_strip(IOData *iodata, arr_t & field,
54  int axis, idx_t n1, idx_t n2);
55 void io_dump_value(IOData *iodata, real_t value, std::string filename,
56  std::string delimiter);
57 void io_dump_2d_array(IOData *iodata, real_t * array, idx_t n_x, idx_t n_y,
58  std::string filename, std::string dataset_name);
59 
60 void io_print_particles(IOData *iodata, idx_t step, Particles *particles);
61 
62 #if USE_COSMOTRACE
63 void io_raytrace_bardeen_dump(IOData *iodata, idx_t step,
64  std::vector<RayTrace<real_t, idx_t> *> const * rays, Bardeen * bardeen,
65  real_t t);
66 #endif
67 
68 void io_svt_violation(IOData *iodata, idx_t step, Bardeen * bardeen, real_t t);
69 
70 void io_raysheet_dump(IOData *iodata, idx_t step,
71  Sheet * raySheet, BSSN *bssnSim, Lambda * lambda);
72 
73 }
74 
75 #endif
Definition: bardeen.cc:5