CLASS MANUAL
background Struct Reference

#include <background.h>

Data Fields

- input parameters initialized by user in input module

(all other quantities are computed in this module, given these parameters and the content of the 'precision' structure)

The background cosmological parameters listed here form a parameter basis which is directly usable by the background module. Nothing prevents from defining the input cosmological parameters differently, and to pre-process them into this format, using the input module (this might require iterative calls of background_init() e.g. for dark energy or decaying dark matter).

double H0
 
double h
 
double Omega0_g
 
double T_cmb
 
double Omega0_b
 
double Omega0_ur
 
double Omega0_cdm
 
double Omega0_idm
 
double Omega0_idr
 
double T_idr
 
double Omega0_dcdmdr
 
double Omega_ini_dcdm
 
double Gamma_dcdm
 
double tau_dcdm
 
int N_ncdm
 
char * ncdm_psd_files
 
int * got_files
 
double * ncdm_psd_parameters
 
double * M_ncdm
 
double * m_ncdm_in_eV
 
double * Omega0_ncdm
 
double Omega0_ncdm_tot
 
double * T_ncdm
 
double T_ncdm_default
 
double * ksi_ncdm
 
double ksi_ncdm_default
 
double * deg_ncdm
 
double deg_ncdm_default
 
int * ncdm_input_q_size
 
double * ncdm_qmax
 
double Omega0_k
 
double Omega0_lambda
 
double Omega0_fld
 
double Omega0_scf
 
short use_ppf
 
double c_gamma_over_c_fld
 
enum equation_of_state fluid_equation_of_state
 
double w0_fld
 
double wa_fld
 
double cs2_fld
 
double Omega_EDE
 
double * scf_parameters
 
short attractor_ic_scf
 
int scf_tuning_index
 
double phi_ini_scf
 
double phi_prime_ini_scf
 
int scf_parameters_size
 
double varconst_alpha
 
double varconst_me
 
enum varconst_dependence varconst_dep
 
double varconst_transition_redshift
 
- related parameters
double age
 
double conformal_age
 
double K
 
int sgnK
 
double Neff
 
double Omega0_dcdm
 
double Omega0_dr
 
double Omega0_m
 
double Omega0_r
 
double Omega0_de
 
double Omega0_nfsm
 
double a_eq
 
double H_eq
 
double z_eq
 
double tau_eq
 
- all indices for the vector of background (=bg) quantities stored in table
int index_bg_a
 
int index_bg_H
 
int index_bg_H_prime
 
int index_bg_rho_g
 
int index_bg_rho_b
 
int index_bg_rho_cdm
 
int index_bg_rho_idm
 
int index_bg_rho_lambda
 
int index_bg_rho_fld
 
int index_bg_w_fld
 
int index_bg_rho_idr
 
int index_bg_rho_ur
 
int index_bg_rho_dcdm
 
int index_bg_rho_dr
 
int index_bg_phi_scf
 
int index_bg_phi_prime_scf
 
int index_bg_V_scf
 
int index_bg_dV_scf
 
int index_bg_ddV_scf
 
int index_bg_rho_scf
 
int index_bg_p_scf
 
int index_bg_p_prime_scf
 
int index_bg_rho_ncdm1
 
int index_bg_p_ncdm1
 
int index_bg_pseudo_p_ncdm1
 
int index_bg_rho_tot
 
int index_bg_p_tot
 
int index_bg_p_tot_prime
 
int index_bg_Omega_r
 
int index_bg_rho_crit
 
int index_bg_Omega_m
 
int index_bg_conf_distance
 
int index_bg_ang_distance
 
int index_bg_lum_distance
 
int index_bg_time
 
int index_bg_rs
 
int index_bg_D
 
int index_bg_f
 
int index_bg_varc_alpha
 
int index_bg_varc_me
 
int bg_size_short
 
int bg_size_normal
 
int bg_size
 
int index_bg_nu
 
- background interpolation tables
int bt_size
 
double * loga_table
 
double * tau_table
 
double * z_table
 
double * background_table
 
- table of their second derivatives, used for spline interpolation
double * d2tau_dz2_table
 
double * d2z_dtau2_table
 
double * d2background_dloga2_table
 
- all indices for the vector of background quantities to be integrated (=bi)

Most background quantities can be immediately inferred from the scale factor. Only few of them require an integration with respect to conformal time (in the minimal case, only one quantity needs to be integrated with time: the scale factor, using the Friedmann equation). These indices refer to the vector of quantities to be integrated with time. {B} quantities are needed by background_functions() while {C} quantities are not.

int index_bi_rho_dcdm
 
int index_bi_rho_dr
 
int index_bi_rho_fld
 
int index_bi_phi_scf
 
int index_bi_phi_prime_scf
 
int index_bi_time
 
int index_bi_rs
 
int index_bi_tau
 
int index_bi_D
 
int index_bi_D_prime
 
int bi_B_size
 
int bi_size
 
int index_bi_nu
 
- flags describing the absence or presence of cosmological

ingredients

having one of these flag set to zero allows to skip the corresponding contributions, instead of adding null contributions.

short has_cdm
 
short has_idm
 
short has_dcdm
 
short has_dr
 
short has_scf
 
short has_ncdm
 
short has_lambda
 
short has_fld
 
short has_ur
 
short has_idr
 
short has_curvature
 
short has_varconst
 
- arrays related to sampling and integration of ncdm phase space distributions
int * ncdm_quadrature_strategy
 
double ** q_ncdm_bg
 
double ** w_ncdm_bg
 
double ** q_ncdm
 
double ** w_ncdm
 
double ** dlnf0_dlnq_ncdm
 
int * q_size_ncdm_bg
 
int * q_size_ncdm
 
double * factor_ncdm
 
- technical parameters
short shooting_failed
 
ErrorMsg shooting_error
 
short background_verbose
 
ErrorMsg error_message
 
short is_allocated
 

Detailed Description

background structure containing all the background information 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.

Field Documentation

◆ H0

double background::H0

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

◆ h

double background::h

reduced Hubble parameter

◆ Omega0_g

double background::Omega0_g

$ \Omega_{0 \gamma} $: photons

◆ T_cmb

double background::T_cmb

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

◆ Omega0_b

double background::Omega0_b

$ \Omega_{0 b} $: baryons

◆ Omega0_ur

double background::Omega0_ur

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

◆ Omega0_cdm

double background::Omega0_cdm

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

◆ Omega0_idm

double background::Omega0_idm

$ \Omega_{0 idm} $: interacting dark matter with photons, baryons, and idr

◆ Omega0_idr

double background::Omega0_idr

$ \Omega_{0 idr} $: interacting dark radiation

◆ T_idr

double background::T_idr

$ T_{idr} $: current temperature of interacting dark radiation in Kelvins

◆ Omega0_dcdmdr

double background::Omega0_dcdmdr

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

◆ Omega_ini_dcdm

double background::Omega_ini_dcdm

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

◆ Gamma_dcdm

double background::Gamma_dcdm

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

◆ N_ncdm

int background::N_ncdm

Number of distinguishable ncdm species

◆ ncdm_psd_files

char * background::ncdm_psd_files

list of filenames for tabulated p-s-d

◆ got_files

int * background::got_files

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

◆ ncdm_psd_parameters

double * background::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)

◆ M_ncdm

double * background::M_ncdm

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

◆ m_ncdm_in_eV

double * background::m_ncdm_in_eV

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

◆ Omega0_ncdm_tot

double background::Omega0_ncdm_tot

Omega0_ncdm for each species and for the total Omega0_ncdm

◆ T_ncdm_default

double background::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

◆ ksi_ncdm_default

double background::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

◆ deg_ncdm_default

double background::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

◆ ncdm_input_q_size

int * background::ncdm_input_q_size

Vector of numbers of q bins

◆ ncdm_qmax

double * background::ncdm_qmax

Vector of maximum value of q

◆ Omega0_k

double background::Omega0_k

$ \Omega_{0_k} $: curvature contribution

◆ Omega0_lambda

double background::Omega0_lambda

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

◆ Omega0_fld

double background::Omega0_fld

$ \Omega_{0 de} $: fluid

◆ Omega0_scf

double background::Omega0_scf

$ \Omega_{0 scf} $: scalar field

◆ use_ppf

short background::use_ppf

flag switching on PPF perturbation equations instead of true fluid equations for perturbations. It could have been defined inside perturbation structure, but we leave it here in such way to have all fld parameters grouped.

◆ c_gamma_over_c_fld

double background::c_gamma_over_c_fld

ppf parameter defined in eq. (16) of 0808.3125 [astro-ph]

◆ fluid_equation_of_state

enum equation_of_state background::fluid_equation_of_state

parametrisation scheme for fluid equation of state

◆ w0_fld

double background::w0_fld

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

◆ wa_fld

double background::wa_fld

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

◆ cs2_fld

double background::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!)

◆ Omega_EDE

double background::Omega_EDE

$ wa_{DE} $: Early Dark Energy density parameter

◆ scf_parameters

double * background::scf_parameters

list of parameters describing the scalar field potential

◆ attractor_ic_scf

short background::attractor_ic_scf

whether the scalar field has attractor initial conditions

◆ scf_tuning_index

int background::scf_tuning_index

index in scf_parameters used for tuning

◆ phi_ini_scf

double background::phi_ini_scf

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

◆ phi_prime_ini_scf

double background::phi_prime_ini_scf

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

◆ scf_parameters_size

int background::scf_parameters_size

size of scf_parameters

◆ varconst_alpha

double background::varconst_alpha

finestructure constant for varying fundamental constants

◆ varconst_me

double background::varconst_me

electron mass for varying fundamental constants

◆ varconst_dep

enum varconst_dependence background::varconst_dep

dependence of the varying fundamental constants as a function of time

◆ varconst_transition_redshift

double background::varconst_transition_redshift

redshift of transition between varied fundamental constants and normal fundamental constants in the 'varconst_instant' case

◆ age

double background::age

age in Gyears

◆ conformal_age

double background::conformal_age

conformal age in Mpc

◆ K

double background::K

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

◆ sgnK

int background::sgnK

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

◆ Neff

double background::Neff

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

◆ Omega0_dcdm

double background::Omega0_dcdm

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

◆ Omega0_dr

double background::Omega0_dr

$ \Omega_{0 dr} $: decay radiation

◆ Omega0_m

double background::Omega0_m

total non-relativistic matter today

◆ Omega0_r

double background::Omega0_r

total ultra-relativistic radiation today

◆ Omega0_de

double background::Omega0_de

total dark energy density today, currently defined as 1 - Omega0_m - Omega0_r - Omega0_k

◆ Omega0_nfsm

double background::Omega0_nfsm

total non-free-streaming matter, that is, cdm, baryons and wdm

◆ a_eq

double background::a_eq

scale factor at radiation/matter equality

◆ H_eq

double background::H_eq

Hubble rate at radiation/matter equality [Mpc^-1]

◆ z_eq

double background::z_eq

redshift at radiation/matter equality

◆ tau_eq

double background::tau_eq

conformal time at radiation/matter equality [Mpc]

◆ index_bg_a

int background::index_bg_a

scale factor (in fact (a/a_0), see normalisation conventions explained at beginning of background.c)

◆ index_bg_H

int background::index_bg_H

Hubble parameter in $Mpc^{-1}$

◆ index_bg_H_prime

int background::index_bg_H_prime

its derivative w.r.t. conformal time

◆ index_bg_rho_g

int background::index_bg_rho_g

photon density

◆ index_bg_rho_b

int background::index_bg_rho_b

baryon density

◆ index_bg_rho_cdm

int background::index_bg_rho_cdm

cdm density

◆ index_bg_rho_idm

int background::index_bg_rho_idm

idm density

◆ index_bg_rho_lambda

int background::index_bg_rho_lambda

cosmological constant density

◆ index_bg_rho_fld

int background::index_bg_rho_fld

fluid density

◆ index_bg_w_fld

int background::index_bg_w_fld

fluid equation of state

◆ index_bg_rho_idr

int background::index_bg_rho_idr

density of interacting dark radiation

◆ index_bg_rho_ur

int background::index_bg_rho_ur

relativistic neutrinos/relics density

◆ index_bg_rho_dcdm

int background::index_bg_rho_dcdm

dcdm density

◆ index_bg_rho_dr

int background::index_bg_rho_dr

dr density

◆ index_bg_phi_scf

int background::index_bg_phi_scf

scalar field value

◆ index_bg_phi_prime_scf

int background::index_bg_phi_prime_scf

scalar field derivative wrt conformal time

◆ index_bg_V_scf

int background::index_bg_V_scf

scalar field potential V

◆ index_bg_dV_scf

int background::index_bg_dV_scf

scalar field potential derivative V'

◆ index_bg_ddV_scf

int background::index_bg_ddV_scf

scalar field potential second derivative V''

◆ index_bg_rho_scf

int background::index_bg_rho_scf

scalar field energy density

◆ index_bg_p_scf

int background::index_bg_p_scf

scalar field pressure

◆ index_bg_p_prime_scf

int background::index_bg_p_prime_scf

scalar field pressure

◆ index_bg_rho_ncdm1

int background::index_bg_rho_ncdm1

density of first ncdm species (others contiguous)

◆ index_bg_p_ncdm1

int background::index_bg_p_ncdm1

pressure of first ncdm species (others contiguous)

◆ index_bg_pseudo_p_ncdm1

int background::index_bg_pseudo_p_ncdm1

another statistical momentum useful in ncdma approximation

◆ index_bg_rho_tot

int background::index_bg_rho_tot

Total density

◆ index_bg_p_tot

int background::index_bg_p_tot

Total pressure

◆ index_bg_p_tot_prime

int background::index_bg_p_tot_prime

Conf. time derivative of total pressure

◆ index_bg_Omega_r

int background::index_bg_Omega_r

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

◆ index_bg_rho_crit

int background::index_bg_rho_crit

critical density

◆ index_bg_Omega_m

int background::index_bg_Omega_m

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

◆ index_bg_conf_distance

int background::index_bg_conf_distance

conformal distance (from us) in Mpc

◆ index_bg_ang_distance

int background::index_bg_ang_distance

angular diameter distance in Mpc

◆ index_bg_lum_distance

int background::index_bg_lum_distance

luminosity distance in Mpc

◆ index_bg_time

int background::index_bg_time

proper (cosmological) time in Mpc

◆ index_bg_rs

int background::index_bg_rs

comoving sound horizon in Mpc

◆ index_bg_D

int background::index_bg_D

scale independent growth factor D(a) for CDM perturbations

◆ index_bg_f

int background::index_bg_f

corresponding velocity growth factor [dlnD]/[dln a]

◆ index_bg_varc_alpha

int background::index_bg_varc_alpha

value of fine structure constant in varying fundamental constants

◆ index_bg_varc_me

int background::index_bg_varc_me

value of effective electron mass in varying fundamental constants

◆ bg_size_short

int background::bg_size_short

size of background vector in the "short format"

◆ bg_size_normal

int background::bg_size_normal

size of background vector in the "normal format"

◆ bg_size

int background::bg_size

size of background vector in the "long format"

◆ bt_size

int background::bt_size

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

◆ loga_table

double * background::loga_table

vector loga_table[index_loga] with values of log(a) (in fact $ log(a/a0) $, logarithm of relative scale factor compared to today)

◆ tau_table

double * background::tau_table

vector tau_table[index_loga] with values of conformal time $ \tau $ (in fact $ a_0 c tau $, see normalisation conventions explained at beginning of background.c)

◆ z_table

double * background::z_table

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

◆ background_table

double * background::background_table

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

◆ d2tau_dz2_table

double * background::d2tau_dz2_table

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

◆ d2z_dtau2_table

double * background::d2z_dtau2_table

vector d2z_dtau2_table[index_loga] with values of $ d^2 z / d\tau^2 $ (conformal time)

◆ d2background_dloga2_table

double * background::d2background_dloga2_table

table d2background_dtau2_table[index_loga*pba->bg_size+pba->index_bg] with values of $ d^2 b_i / d\log(a)^2 $

◆ index_bi_rho_dcdm

int background::index_bi_rho_dcdm

{B} dcdm density

◆ index_bi_rho_dr

int background::index_bi_rho_dr

{B} dr density

◆ index_bi_rho_fld

int background::index_bi_rho_fld

{B} fluid density

◆ index_bi_phi_scf

int background::index_bi_phi_scf

{B} scalar field value

◆ index_bi_phi_prime_scf

int background::index_bi_phi_prime_scf

{B} scalar field derivative wrt conformal time

◆ index_bi_time

int background::index_bi_time

{C} proper (cosmological) time in Mpc

◆ index_bi_rs

int background::index_bi_rs

{C} sound horizon

◆ index_bi_tau

int background::index_bi_tau

{C} conformal time in Mpc

◆ index_bi_D

int background::index_bi_D

{C} scale independent growth factor D(a) for CDM perturbations.

◆ index_bi_D_prime

int background::index_bi_D_prime

{C} D satisfies $ [D''(\tau)=-aHD'(\tau)+3/2 a^2 \rho_M D(\tau) $

◆ bi_B_size

int background::bi_B_size

Number of {B} parameters

◆ bi_size

int background::bi_size

Number of {B}+{C} parameters

◆ has_cdm

short background::has_cdm

presence of cold dark matter?

◆ has_idm

short background::has_idm

presence of interacting dark matter with photons, baryons, and idr

◆ has_dcdm

short background::has_dcdm

presence of decaying cold dark matter?

◆ has_dr

short background::has_dr

presence of relativistic decay radiation?

◆ has_scf

short background::has_scf

presence of a scalar field?

◆ has_ncdm

short background::has_ncdm

presence of non-cold dark matter?

◆ has_lambda

short background::has_lambda

presence of cosmological constant?

◆ has_fld

short background::has_fld

presence of fluid with constant w and cs2?

◆ has_ur

short background::has_ur

presence of ultra-relativistic neutrinos/relics?

◆ has_idr

short background::has_idr

presence of interacting dark radiation?

◆ has_curvature

short background::has_curvature

presence of global spatial curvature?

◆ has_varconst

short background::has_varconst

presence of varying fundamental constants?

◆ ncdm_quadrature_strategy

int * background::ncdm_quadrature_strategy

Vector of integers according to quadrature strategy.

◆ q_ncdm_bg

double ** background::q_ncdm_bg

Pointers to vectors of background sampling in q

◆ w_ncdm_bg

double ** background::w_ncdm_bg

Pointers to vectors of corresponding quadrature weights w

◆ q_ncdm

double ** background::q_ncdm

Pointers to vectors of perturbation sampling in q

◆ w_ncdm

double ** background::w_ncdm

Pointers to vectors of corresponding quadrature weights w

◆ dlnf0_dlnq_ncdm

double ** background::dlnf0_dlnq_ncdm

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

◆ q_size_ncdm_bg

int * background::q_size_ncdm_bg

Size of the q_ncdm_bg arrays

◆ q_size_ncdm

int * background::q_size_ncdm

Size of the q_ncdm arrays

◆ factor_ncdm

double * background::factor_ncdm

List of normalization factors for calculating energy density etc.

◆ shooting_failed

short background::shooting_failed

flag is set to true if shooting failed.

◆ shooting_error

ErrorMsg background::shooting_error

Error message from shooting failed.

◆ background_verbose

short background::background_verbose

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

◆ error_message

ErrorMsg background::error_message

zone for writing error messages

◆ is_allocated

short background::is_allocated

flag is set to true if allocated

◆ index_bg_nu

int background::index_bg_nu

comoving neutrino horizon in Mpc

◆ index_bi_nu

int background::index_bi_nu

{C} neutrino horizon


The documentation for this struct was generated from the following files: