1#ifndef BACKGROUND_MODULE_H
2#define BACKGROUND_MODULE_H
8#include "base_module.h"
14class BackgroundModule :
public BaseModule {
20 double GetOmega0Species(
const std::string& key)
const;
21 BackgroundModule(InputModulePtr input_module);
24 void background_output_titles(std::string& titles)
const;
26 std::vector<std::string> background_output_notes()
const;
27 void background_output_data(
int number_of_titles,
double* data)
const;
28 void background_at_tau(
29 double tau,
short return_format,
short inter_mode,
int* last_index,
double* pvecback)
const;
30 void background_tau_of_z(
double z,
double* tau)
const;
31 void background_w_fld(
double a,
33 double* dw_over_da_fld,
34 double* integral_fld)
const;
38 double GetOmega0NcdmTot()
const;
43 bool HasSpecies(
const std::string& key)
const;
50 double GetSpeciesParam(
const std::string& key,
const std::string& param)
const;
56 bool HasSpeciesParam(
const std::string& key,
const std::string& param)
const;
64 int index_bg_H_prime_ = -1;
68 int index_bg_rho_tot_ = -1;
69 int index_bg_p_tot_ = -1;
70 int index_bg_p_tot_prime_ = -1;
72 int index_bg_Omega_r_ =
77 int index_bg_rho_crit_ = -1;
78 int index_bg_Omega_m_ =
80 int index_bg_Omega_de_ = -1;
82 int index_bg_w_de_ = -1;
84 int index_bg_conf_distance_ = -1;
85 int index_bg_ang_distance_ = -1;
86 int index_bg_lum_distance_ = -1;
87 int index_bg_time_ = -1;
88 int index_bg_rs_ = -1;
93 int bg_size_short_ = 0;
94 int bg_size_normal_ = 0;
104 double conformal_age_ = 0.0;
109 double Omega0_m_ = 0.0;
114 double Omega0_r_ = 0.0;
116 double tau_eq_ = 0.0;
117 double Omega0_dcdm_ = 0.0;
118 double Omega0_dr_ = 0.0;
120 double Omega0_idr_drmd_ = 0.0;
121 double Omega0_idm_drmd_ = 0.0;
122 double Omega0_idm_ = 0.0;
127 double f_idr_drmd()
const;
128 double z_dec_drmd()
const;
145 bool StoringBackgroundTable()
const {
146 return storing_background_table_;
158 std::optional<double> PeakEnergyFraction(
const BaseSpecies& species,
159 const std::string& param)
const;
161 void background_functions(
double* pvecback_B,
short return_format,
double* pvecback);
162 bool storing_background_table_ =
false;
168 void background_init();
169 void background_indices();
170 void background_solve_evolver();
171 void background_initial_conditions(
double* pvecback,
double* pvecback_integration);
172 void background_find_equality();
173 void background_derivs(
double tau,
177 void background_derivs_loga(
double loga,
183 void background_derivs_diagonal_loga(
double loga,
187 void background_add_line_to_bg_table(
double loga,
double* y,
double* dy,
int index_loga);
188 void background_output_budget();
189 void background_print_variables(
double loga,
207 int index_bi_a_ = -1;
209 int index_bi_time_ = -1;
210 int index_bi_rs_ = -1;
211 int index_bi_tau_ = -1;
212 int index_bi_D_ = -1;
213 int index_bi_D_prime_ =
237 d2background_dtau2_table_;
247 double* pvecback =
nullptr;
Definition base_species.h:90
Definition modified_gravity.h:23
Definition background_module.h:246