CLASS MANUAL
background.h File Reference
#include "common.h"
#include "quadrature.h"
#include "growTable.h"
#include "arrays.h"
#include "dei_rkck.h"
#include "parser.h"
+ Include dependency graph for background.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  background
 
struct  background_parameters_and_workspace
 
struct  background_parameters_for_distributions
 

Detailed Description

Documented includes for background module


Data Structure Documentation

struct background

All background parameters and evolution that other modules need to know.

Once initialized by the backgound_init(), contains all necessary information on the background evolution (except thermodynamics), and in particular, a table of all background quantities as a function of time and scale factor, used for interpolation in other modules.

Data Fields
double H0

$ H_0 $: Hubble parameter (in fact, [ $H_0/c$]) in $ Mpc^{-1} $

double Omega0_g

$ \Omega_{0 \gamma} $: photons

double T_cmb

$ T_{cmb} $: current CMB temperature in Kelvins

double Omega0_b

$ \Omega_{0 b} $: baryons

double Omega0_cdm

$ \Omega_{0 cdm} $: cold dark matter

double Omega0_lambda

$ \Omega_{0_\Lambda} $: cosmological constant

double Omega0_fld

$ \Omega_{0 de} $: fluid with constant $ w $ and $ c_s^2 $

double w0_fld

$ w0_{DE} $: current fluid equation of state parameter

double wa_fld

$ wa_{DE} $: fluid equation of state parameter derivative

double cs2_fld

$ c^2_{s~DE} $: sound speed of the fluid in the frame comoving with the fluid (so, this is not [delta p/delta rho] in the synchronous or newtonian gauge!!!)

double Omega0_ur

$ \Omega_{0 \nu r} $: ultra-relativistic neutrinos

double Omega0_dcdmdr

$ \Omega_{0 dcdm}+\Omega_{0 dr} $: decaying cold dark matter (dcdm) decaying to dark radiation (dr)

double Gamma_dcdm

$ \Gamma_{dcdm} $: decay constant for decaying cold dark matter

double Omega_ini_dcdm

$ \Omega_{ini,dcdm} $: rescaled initial value for dcdm density (see 1407.2418 for definitions)

double Omega0_scf

$ \Omega_{0 scf} $: scalar field

short attractor_ic_scf

whether the scalar field has attractor initial conditions

double phi_ini_scf

$ \phi(t_0) $: scalar field initial value

double phi_prime_ini_scf

$ d\phi(t_0)/d\tau $: scalar field initial derivative wrt conformal time

double * scf_parameters

list of parameters describing the scalar field potential

int scf_parameters_size

size of scf_parameters

int scf_tuning_index

index in scf_parameters used for tuning

double Omega0_k

$ \Omega_{0_k} $: curvature contribution

int N_ncdm

Number of distinguishable ncdm species

double * M_ncdm

vector of masses of non-cold relic: dimensionless ratios m_ncdm/T_ncdm

double * Omega0_ncdm
double Omega0_ncdm_tot

Omega0_ncdm for each species and for the total Omega0_ncdm

double * deg_ncdm
double deg_ncdm_default

vector of degeneracy parameters in factor of p-s-d: 1 for one family of neutrinos (= one neutrino plus its anti-neutrino, total g*=1+1=2, so deg = 0.5 g*); and its default value

double * T_ncdm
double T_ncdm_default

list of 1st parameters in p-s-d of non-cold relics: relative temperature T_ncdm1/T_gamma; and its default value

double * ksi_ncdm
double ksi_ncdm_default

list of 2nd parameters in p-s-d of non-cold relics: relative chemical potential ksi_ncdm1/T_ncdm1; and its default value

double * ncdm_psd_parameters

list of parameters for specifying/modifying ncdm p.s.d.'s, to be customized for given model (could be e.g. mixing angles)

int * got_files

list of flags for each species, set to true if p-s-d is passed through file

char * ncdm_psd_files

list of filenames for tabulated p-s-d

double h

reduced Hubble parameter

double age

age in Gyears

double conformal_age

conformal age in Mpc

double K

$ K $: Curvature parameter $ K=-\Omega0_k*a_{today}^2*H_0^2$;

int sgnK

K/|K|: -1, 0 or 1

double * m_ncdm_in_eV

list of ncdm masses in eV (inferred from M_ncdm and other parameters above)

double Neff

so-called "effective neutrino number", computed at earliest time in interpolation table

double Omega0_dcdm

$ \Omega_{0 dcdm} $: decaying cold dark matter

double Omega0_dr

$ \Omega_{0 dr} $: decay radiation

double a_today

scale factor today (arbitrary and irrelevant for most purposes)

int index_bg_a

scale factor

int index_bg_H

Hubble parameter in $Mpc^{-1}$

int index_bg_H_prime

its derivative w.r.t. conformal time

int index_bg_rho_g

photon density

int index_bg_rho_b

baryon density

int index_bg_rho_cdm

cdm density

int index_bg_rho_lambda

cosmological constant density

int index_bg_rho_fld

fluid with constant w density

int index_bg_rho_ur

relativistic neutrinos/relics density

int index_bg_rho_dcdm

dcdm density

int index_bg_rho_dr

dr density

int index_bg_phi_scf

scalar field value

int index_bg_phi_prime_scf

scalar field derivative wrt conformal time

int index_bg_V_scf

scalar field potential V

int index_bg_dV_scf

scalar field potential derivative V'

int index_bg_ddV_scf

scalar field potential second derivative V''

int index_bg_rho_scf

scalar field energy density

int index_bg_p_scf

scalar field pressure

int index_bg_rho_ncdm1

density of first ncdm species (others contiguous)

int index_bg_p_ncdm1

pressure of first ncdm species (others contiguous)

int index_bg_pseudo_p_ncdm1

another statistical momentum useful in ncdma approximation

int index_bg_Omega_r

relativistic density fraction ( $ \Omega_{\gamma} + \Omega_{\nu r} $)

int index_bg_rho_crit

critical density

int index_bg_Omega_m

non-relativistic density fraction ( $ \Omega_b + \Omega_cdm + \Omega_{\nu nr} $)

int index_bg_conf_distance

conformal distance (from us) in Mpc

int index_bg_ang_distance

angular diameter distance in Mpc

int index_bg_lum_distance

luminosity distance in Mpc

int index_bg_time

proper (cosmological) time in Mpc

int index_bg_rs

comoving sound horizon in Mpc

int index_bg_D

density growth factor in dust universe, $ D = H \int [da/(aH)^3] $ (arbitrary normalization)

int index_bg_f

velocity growth factor in dust universe, [dlnD]/[dln a]

int bg_size_short

size of background vector in the "short format"

int bg_size_normal

size of background vector in the "normal format"

int bg_size

size of background vector in the "long format"

int bt_size

number of lines (i.e. time-steps) in the array

double * tau_table

vector tau_table[index_tau] with values of $ \tau $ (conformal time)

double * z_table

vector z_table[index_tau] with values of $ z $ (redshift)

double * background_table

table background_table[index_tau*pba->bg_size+pba->index_bg] with all other quantities (array of size bg_size*bt_size)

double * d2tau_dz2_table

vector d2tau_dz2_table[index_tau] with values of $ d^2 \tau / dz^2 $ (conformal time)

double * d2background_dtau2_table

table d2background_dtau2_table[index_tau*pba->bg_size+pba->index_bg] with values of $ d^2 b_i / d\tau^2 $ (conformal time)

int index_bi_a

{B} scale factor

int index_bi_rho_dcdm

{B} dcdm density

int index_bi_rho_dr

{B} dr density

int index_bi_phi_scf

{B} scalar field value

int index_bi_phi_prime_scf

{B} scalar field derivative wrt conformal time

int index_bi_time

{C} proper (cosmological) time in Mpc

int index_bi_rs

{C} sound horizon

int index_bi_tau

{C} conformal time in Mpc

int index_bi_growth

{C} integral over $ [da/(aH)^3]=[d\tau/(aH^2)]$, useful for growth factor

int bi_B_size

Number of {B} parameters

int bi_size

Number of {B}+{C} parameters

short has_cdm

presence of cold dark matter?

short has_dcdm

presence of decaying cold dark matter?

short has_dr

presence of relativistic decay radiation?

short has_scf

presence of a scalar field?

short has_ncdm

presence of non-cold dark matter?

short has_lambda

presence of cosmological constant?

short has_fld

presence of fluid with constant w and cs2?

short has_ur

presence of ultra-relativistic neutrinos/relics?

short has_curvature

presence of global spatial curvature?

double ** q_ncdm_bg

Pointers to vectors of background sampling in q

double ** w_ncdm_bg

Pointers to vectors of corresponding quadrature weights w

double ** q_ncdm

Pointers to vectors of perturbation sampling in q

double ** w_ncdm

Pointers to vectors of corresponding quadrature weights w

double ** dlnf0_dlnq_ncdm

Pointers to vectors of logarithmic derivatives of p-s-d

int * q_size_ncdm_bg

Size of the q_ncdm_bg arrays

int * q_size_ncdm

Size of the q_ncdm arrays

double * factor_ncdm

List of normalization factors for calculating energy density etc.

short short_info

flag for calling background_at_eta and return little information

short normal_info

flag for calling background_at_eta and return medium information

short long_info

flag for calling background_at_eta and return all information

short inter_normal

flag for calling background_at_eta and find position in interpolation table normally

short inter_closeby

flag for calling background_at_eta and find position in interpolation table starting from previous position in previous call

short shooting_failed

flag is set to true if shooting failed.

ErrorMsg shooting_error

Error message from shooting failed.

short background_verbose

flag regulating the amount of information sent to standard output (none if set to zero)

ErrorMsg error_message

zone for writing error messages

struct background_parameters_and_workspace

temporary parameters and workspace passed to the background_derivs function

struct background_parameters_for_distributions

temporary parameters and workspace passed to phase space distribution function