GADGET-4
lightcone_massmap_io.h
Go to the documentation of this file.
1/*******************************************************************************
2 * \copyright This file is part of the GADGET4 N-body/SPH code developed
3 * \copyright by Volker Springel. Copyright (C) 2014-2020 by Volker Springel
4 * \copyright (vspringel@mpa-garching.mpg.de) and all contributing authors.
5 *******************************************************************************/
6
12#ifndef LIGHTCONE_MASSMAP_IO_H
13#define LIGHTCONE_MASSMAP_IO_H
14
15#include "gadgetconfig.h"
16
17#if defined(LIGHTCONE) && defined(LIGHTCONE_MASSMAPS)
18
19#include "../data/intposconvert.h"
20#include "../data/mmparticles.h"
21#include "../io/io.h"
22#include "../lightcone/lightcone.h"
23
24class lightcone_massmap_io : public IO_Def
25{
26 public:
27 lightcone_massmap_io(mmparticles *Mp_ptr, lightcone *LightCone_ptr, MPI_Comm comm, int format);
28
29 void lightcone_massmap_save(int num);
30
31 /* supplied virtual functions */
32 void fill_file_header(int writeTask, int lastTask, long long *nloc_part, long long *npart);
33 void read_file_header(const char *fname, int filenr, int readTask, int lastTask, long long *nloc_part, long long *npart,
34 int *nstart);
35 void get_datagroup_name(int grnr, char *gname);
36 void write_header_fields(hid_t);
37 void read_header_fields(const char *fname);
38 void read_increase_numbers(int type, int n_for_this_task);
39 int get_filenr_from_header(void);
40 void set_filenr_in_header(int);
41 void *get_base_address_of_structure(enum arrays array, int index);
42 int get_type_of_element(int index);
43 void set_type_of_element(int index, int type);
44
47 struct io_header
48 {
49 int nside; /* healpix nside */
50 int npix_local;
51 int npix_total;
52 int num_files;
53 double AscaleStart;
54 double AscaleEnd;
55 double ComDistStart;
56 double ComDistEnd;
57 };
58 io_header header;
60 private:
61 mmparticles *Mp;
62 lightcone *LightCone;
63
64 int selected_bnd;
65};
66
67#endif
68#endif
Definition: io.h:129
virtual int get_filenr_from_header(void)=0
virtual void * get_base_address_of_structure(enum arrays array, int index)=0
virtual void set_type_of_element(int index, int type)=0
virtual void read_increase_numbers(int type, int n_for_this_task)=0
virtual void fill_file_header(int writeTask, int lastTask, long long *nloc_part, long long *npart)=0
virtual void read_header_fields(const char *fname)=0
virtual void read_file_header(const char *fname, int filenr, int readTask, int lastTask, long long *nloc_part, long long *npart, int *nstart)=0
virtual void set_filenr_in_header(int)=0
virtual void write_header_fields(hid_t)=0
virtual void get_datagroup_name(int grnr, char *gname)=0
virtual int get_type_of_element(int index)=0
arrays
Definition: io.h:30