21#include "exceptions.h"
24class BackgroundModule;
25class ThermodynamicsModule;
26class PerturbationsModule;
27class PrimordialModule;
34typedef std::shared_ptr<const InputModule> InputModulePtr;
35typedef std::shared_ptr<const BackgroundModule> BackgroundModulePtr;
36typedef std::shared_ptr<const ThermodynamicsModule> ThermodynamicsModulePtr;
37typedef std::shared_ptr<const PerturbationsModule> PerturbationsModulePtr;
38typedef std::shared_ptr<const PrimordialModule> PrimordialModulePtr;
39typedef std::shared_ptr<const NonlinearModule> NonlinearModulePtr;
40typedef std::shared_ptr<const TransferModule> TransferModulePtr;
41typedef std::shared_ptr<const SpectraModule> SpectraModulePtr;
42typedef std::shared_ptr<const LensingModule> LensingModulePtr;
61#define _QUADRATURE_MAX_ \
64#define _QUADRATURE_MAX_BG_ \
72#define _EPSILON_ 1.e-10
74#define _OUTPUTPRECISION_ 12
76#define _COLUMNWIDTH_ \
79#define _DELIMITER_ "\t"
86#define index_symmetric_matrix(i1, i2, N) \
88 ? ((i2) + N * (i1) - ((i1) * ((i1) + 1)) / 2) \
89 : ((i1) + N * (i2) - \
90 ((i2) * ((i2) + 1)) / \
96#define class_define_index(index, condition, running_index, number_of_indices) \
99 index = running_index; \
100 running_index += number_of_indices; \
105#define class_fprintf_double(file, output, condition) \
108 fprintf(file, "%*.*e ", _COLUMNWIDTH_, _OUTPUTPRECISION_, output); \
111#define class_fprintf_double_or_default(file, output, condition, defaultvalue) \
114 fprintf(file, "%*.*e ", _COLUMNWIDTH_, _OUTPUTPRECISION_, output); \
116 fprintf(file, "%*.*e ", _COLUMNWIDTH_, _OUTPUTPRECISION_, defaultvalue); \
119#define class_fprintf_int(file, output, condition) \
124 std::max(0, _COLUMNWIDTH_ - _OUTPUTPRECISION_ - 5), \
126 _OUTPUTPRECISION_ + 5, \
130#define class_fprintf_columntitle(file, title, condition, colnum) \
136 std::min(_COLUMNWIDTH_ - _OUTPUTPRECISION_ - 6 - 3, \
137 _COLUMNWIDTH_ - ((int) strlen(title)) - 3)), \
140 _OUTPUTPRECISION_ + 6, \
144#define class_store_columntitle(titlestring, title, condition) \
147 titlestring += title; \
148 titlestring += _DELIMITER_; \
152#define class_store_double(storage, value, condition, dataindex) \
155 storage[dataindex++] = value; \
158#define class_store_double_or_default(storage, value, condition, dataindex, defaultvalue) \
161 storage[dataindex++] = value; \
163 storage[dataindex++] = defaultvalue; \
170int get_number_of_titles(
const std::string& titlestring);