CLASS MANUAL
output.h
Go to the documentation of this file.
1 
3 #ifndef __OUTPUT__
4 #define __OUTPUT__
5 
6 #include "common.h"
7 #include "lensing.h"
8 #include "distortions.h"
9 
15 #define _Z_PK_NUM_MAX_ 100
16 
23 struct output {
24 
26 
27  char root[_FILENAMESIZE_-32];
30 
34 
35  int z_pk_num;
36  double z_pk[_Z_PK_NUM_MAX_];
39 
43 
44  short write_header;
57 
61 
64  ErrorMsg error_message;
67 };
68 
69 /*************************************************************************************************************/
70 /* @cond INCLUDE_WITH_DOXYGEN */
71 /*
72  * Boilerplate for C++
73  */
74 #ifdef __cplusplus
75 extern "C" {
76 #endif
77 
78  int output_total_cl_at_l(
79  struct harmonic * phr,
80  struct lensing * ple,
81  struct output * pop,
82  int l,
83  double * cl
84  );
85 
86  int output_init(
87  struct background * pba,
88  struct thermodynamics * pth,
89  struct perturbations * ppt,
90  struct primordial * ppm,
91  struct transfer * ptr,
92  struct harmonic * phr,
93  struct fourier * pfo,
94  struct lensing * ple,
95  struct distortions * psd,
96  struct output * pop
97  );
98 
99  int output_cl(
100  struct background * pba,
101  struct perturbations * ppt,
102  struct harmonic * phr,
103  struct lensing * ple,
104  struct output * pop
105  );
106 
107  int output_pk(
108  struct background * pba,
109  struct perturbations * ppt,
110  struct fourier * pfo,
111  struct output * pop,
112  enum pk_outputs pk_output
113  );
114 
115  int output_tk(
116  struct background * pba,
117  struct perturbations * ppt,
118  struct output * pop
119  );
120 
121  int output_background(
122  struct background * pba,
123  struct output * pop
124  );
125 
126  int output_thermodynamics(
127  struct background * pba,
128  struct thermodynamics * pth,
129  struct output * pop
130  );
131 
132  int output_perturbations(
133  struct background * pba,
134  struct perturbations * ppt,
135  struct output * pop
136  );
137 
138  int output_primordial(
139  struct perturbations * ppt,
140  struct primordial * ppm,
141  struct output * pop
142  );
143 
144  int output_heating(
145  struct injection* pin,
146  struct noninjection* pni,
147  struct output * pop
148  );
149 
150  int output_distortions(
151  struct distortions * psd,
152  struct output * pop
153  );
154 
155  int output_print_data(FILE *out,
156  char titles[_MAXTITLESTRINGLENGTH_],
157  double *dataptr,
158  int tau_size);
160  struct harmonic * phr,
161  struct output * pop,
162  FILE ** clfile,
163  FileName filename,
164  char * first_line,
165  int lmax
166  );
167 
169  struct background * pba,
170  struct harmonic * phr,
171  struct output * pop,
172  FILE * clfile,
173  double l,
174  double * cl,
175  int ct_size
176  );
177 
179  struct background * pba,
180  struct fourier * pfo,
181  struct output * pop,
182  FILE ** pkfile,
183  FileName filename,
184  char * first_line,
185  double z
186  );
187 
189  FILE * tkfile,
190  double one_k,
191  double one_pk
192  );
193 
194 #ifdef __cplusplus
195 }
196 #endif
197 
198 #endif
199 /* @endcond */
Definition: background.h:48
file_format
Definition: common.h:369
Definition: distortions.h:35
Definition: fourier.h:33
Definition: harmonic.h:17
Definition: lensing.h:17
int output_one_line_of_pk(FILE *pkfile, double one_k, double one_pk)
Definition: output.c:1783
int output_tk(struct background *pba, struct perturbations *ppt, struct output *pop)
Definition: output.c:903
int output_pk(struct background *pba, struct perturbations *ppt, struct fourier *pfo, struct output *pop, enum pk_outputs pk_output)
Definition: output.c:626
int output_heating(struct injection *pin, struct noninjection *pni, struct output *pop)
Definition: output.c:1258
int output_one_line_of_cl(struct background *pba, struct harmonic *phr, struct output *pop, FILE *clfile, double l, double *cl, int ct_size)
Definition: output.c:1664
int output_distortions(struct distortions *psd, struct output *pop)
Definition: output.c:1364
int output_print_data(FILE *out, char titles[_MAXTITLESTRINGLENGTH_], double *dataptr, int size_dataptr)
Definition: output.c:1466
int output_open_pk_file(struct background *pba, struct fourier *pfo, struct output *pop, FILE **pkfile, FileName filename, char *first_line, double z)
Definition: output.c:1744
int output_cl(struct background *pba, struct perturbations *ppt, struct harmonic *phr, struct lensing *ple, struct output *pop)
Definition: output.c:244
int output_init(struct background *pba, struct thermodynamics *pth, struct perturbations *ppt, struct primordial *ppm, struct transfer *ptr, struct harmonic *phr, struct fourier *pfo, struct lensing *ple, struct distortions *psd, struct output *pop)
Definition: output.c:109
int output_open_cl_file(struct harmonic *phr, struct output *pop, FILE **clfile, FileName filename, char *first_line, int lmax)
Definition: output.c:1516
short write_distortions
Definition: output.h:54
short write_thermodynamics
Definition: output.h:49
short write_exotic_injection
Definition: output.h:52
short write_noninjection
Definition: output.h:53
int z_pk_num
Definition: output.h:35
enum file_format output_format
Definition: output.h:46
short write_background
Definition: output.h:48
ErrorMsg error_message
Definition: output.h:64
char root[_FILENAMESIZE_-32]
Definition: output.h:27
short output_verbose
Definition: output.h:62
short write_perturbations
Definition: output.h:50
#define _Z_PK_NUM_MAX_
Definition: output.h:15
double z_pk[_Z_PK_NUM_MAX_]
Definition: output.h:36
short write_header
Definition: output.h:44
short write_primordial
Definition: output.h:51
Definition: output.h:23
Definition: perturbations.h:98
Definition: primordial.h:79
Definition: thermodynamics.h:59
Definition: transfer.h:76