CLASS MANUAL
|
Go to the source code of this file.
Data Structures | |
struct | perturbs |
struct | perturb_vector |
struct | perturb_workspace |
struct | perturb_parameters_and_workspace |
Macros | |
#define | _MAX_NUMBER_OF_K_FILES_ 30 |
Enumerations | |
enum | tca_flags |
enum | tca_method |
enum | possible_gauges { newtonian, synchronous } |
#define | _SELECTION_NUM_MAX_ 100 |
Documented includes for perturbation module
struct perturbs |
Structure containing everything about perturbations that other modules need to know, in particular tabled values of the source functions for all requested modes (scalar/vector/tensor), initial conditions, types (temperature, E-polarization, B-polarization, lensing potential, etc), multipole l and wavenumber k.
Data Fields | ||
---|---|---|
short | has_perturbations |
do we need to compute perturbations at all ? |
short | has_cls |
do we need any harmonic space spectrum |
short | has_scalars |
do we need scalars? |
short | has_vectors |
do we need vectors? |
short | has_tensors |
do we need tensors? |
short | has_ad |
do we need adiabatic mode? |
short | has_bi |
do we need isocurvature bi mode? |
short | has_cdi |
do we need isocurvature cdi mode? |
short | has_nid |
do we need isocurvature nid mode? |
short | has_niv |
do we need isocurvature niv mode? |
short | has_perturbed_recombination |
Do we want to consider perturbed temperature and ionization fraction? |
enum tensor_methods | tensor_method |
Neutrino contribution to tensors way to treat neutrinos in tensor perturbations(neglect, approximate as massless, take exact equations) |
short | evolve_tensor_ur |
will we evolve ur tensor perturbations (either because we have ur species, or we have ncdm species with massless approximation) ? |
short | evolve_tensor_ncdm |
will we evolve ncdm tensor perturbations (if we have ncdm species and we use the exact method) ? |
short | has_cl_cmb_temperature |
do we need |
short | has_cl_cmb_polarization |
do we need |
short | has_cl_cmb_lensing_potential |
do we need |
short | has_cl_lensing_potential |
do we need |
short | has_cl_number_count |
do we need |
short | has_pk_matter |
do we need matter Fourier spectrum? |
short | has_density_transfers |
do we need to output individual matter density transfer functions? |
short | has_velocity_transfers |
do we need to output individual matter velocity transfer functions? |
short | has_nl_corrections_based_on_delta_m |
do we want to compute non-linear corrections with an algorithm relying on delta_m (like halofit)? |
short | has_nc_density |
in dCl, do we want density terms ? |
short | has_nc_rsd |
in dCl, do we want redshift space distortion terms ? |
short | has_nc_lens |
in dCl, do we want lensing terms ? |
short | has_nc_gr |
in dCl, do we want gravity terms ? |
int | l_scalar_max |
maximum l value for CMB scalars |
int | l_vector_max |
maximum l value for CMB vectors |
int | l_tensor_max |
maximum l value for CMB tensors |
int | l_lss_max |
maximum l value for LSS |
double | k_max_for_pk |
maximum value of k in 1/Mpc in P(k) (if |
int | selection_num |
number of selection functions (i.e. bins) for matter density |
enum selection_type | selection |
type of selection functions |
double | selection_mean[_SELECTION_NUM_MAX_] |
centers of selection functions |
double | selection_width[_SELECTION_NUM_MAX_] |
widths of selection functions |
int | switch_sw |
in temperature calculation, do we want to include the intrinsic temperature + Sachs Wolfe term? |
int | switch_eisw |
in temperature calculation, do we want to include the early integrated Sachs Wolfe term? |
int | switch_lisw |
in temperature calculation, do we want to include the late integrated Sachs Wolfe term? |
int | switch_dop |
in temperature calculation, do we want to include the Doppler term? |
int | switch_pol |
in temperature calculation, do we want to include the polarization-related term? |
double | eisw_lisw_split_z |
at which redshift do we define the cut between eisw and lisw ? |
int | store_perturbations |
Do we want to store perturbations? |
int | k_output_values_num |
Number of perturbation outputs (default=0) |
double | k_output_values[_MAX_NUMBER_OF_K_FILES_] |
List of k values where perturbation output is requested. |
int * | index_k_output_values |
List of indices corresponding to k-values close to k_output_values for each mode. [index_md*k_output_values_num+ik] |
char | scalar_titles[_MAXTITLESTRINGLENGTH_] |
DELIMITER separated string of titles for scalar perturbation output files. |
char | vector_titles[_MAXTITLESTRINGLENGTH_] |
DELIMITER separated string of titles for vector perturbation output files. |
char | tensor_titles[_MAXTITLESTRINGLENGTH_] |
DELIMITER separated string of titles for tensor perturbation output files. |
int | number_of_scalar_titles |
number of titles/columns in scalar perturbation output files |
int | number_of_vector_titles |
number of titles/columns in vector perturbation output files |
int | number_of_tensor_titles |
number of titles/columns in tensor perturbation output files |
double * | scalar_perturbations_data[_MAX_NUMBER_OF_K_FILES_] |
Array of double pointers to perturbation output for scalars |
double * | vector_perturbations_data[_MAX_NUMBER_OF_K_FILES_] |
Array of double pointers to perturbation output for vectors |
double * | tensor_perturbations_data[_MAX_NUMBER_OF_K_FILES_] |
Array of double pointers to perturbation output for tensors |
int | size_scalar_perturbation_data[_MAX_NUMBER_OF_K_FILES_] |
Array of sizes of scalar double pointers |
int | size_vector_perturbation_data[_MAX_NUMBER_OF_K_FILES_] |
Array of sizes of vector double pointers |
int | size_tensor_perturbation_data[_MAX_NUMBER_OF_K_FILES_] |
Array of sizes of tensor double pointers |
double | three_ceff2_ur |
3 x effective squared sound speed for the ultrarelativistic perturbations |
double | three_cvis2_ur |
3 x effective viscosity parameter for the ultrarelativistic perturbations |
double | z_max_pk |
when we compute only the matter spectrum / transfer functions, but not the CMB, we are sometimes interested to sample source functions at very high redshift, way before recombination. This z_max_pk will then fix the initial sampling time of the sources. |
short | has_cmb |
do we need CMB-related sources (temperature, polarization) ? |
short | has_lss |
do we need LSS-related sources (lensing potential, ...) ? |
enum possible_gauges | gauge |
gauge in which to perform this calculation |
int | index_md_scalars |
index value for scalars |
int | index_md_tensors |
index value for tensors |
int | index_md_vectors |
index value for vectors |
int | md_size |
number of modes included in computation |
int | index_ic_ad |
index value for adiabatic |
int | index_ic_cdi |
index value for CDM isocurvature |
int | index_ic_bi |
index value for baryon isocurvature |
int | index_ic_nid |
index value for neutrino density isocurvature |
int | index_ic_niv |
index value for neutrino velocity isocurvature |
int | index_ic_ten |
index value for unique possibility for tensors |
int * | ic_size |
for a given mode, ic_size[index_md] = number of initial conditions included in computation |
short | has_source_t |
do we need source for CMB temperature? |
short | has_source_p |
do we need source for CMB polarization? |
short | has_source_delta_m |
do we need source for delta of total matter? |
short | has_source_delta_g |
do we need source for delta of gammas? |
short | has_source_delta_b |
do we need source for delta of baryons? |
short | has_source_delta_cdm |
do we need source for delta of cold dark matter? |
short | has_source_delta_dcdm |
do we need source for delta of DCDM? |
short | has_source_delta_fld |
do we need source for delta of dark energy? |
short | has_source_delta_scf |
do we need source for delta from scalar field? |
short | has_source_delta_dr |
do we need source for delta of decay radiation? |
short | has_source_delta_ur |
do we need source for delta of ultra-relativistic neutrinos/relics? |
short | has_source_delta_ncdm |
do we need source for delta of all non-cold dark matter species (e.g. massive neutrinos)? |
short | has_source_theta_m |
do we need source for theta of total matter? |
short | has_source_theta_g |
do we need source for theta of gammas? |
short | has_source_theta_b |
do we need source for theta of baryons? |
short | has_source_theta_cdm |
do we need source for theta of cold dark matter? |
short | has_source_theta_dcdm |
do we need source for theta of DCDM? |
short | has_source_theta_fld |
do we need source for theta of dark energy? |
short | has_source_theta_scf |
do we need source for theta of scalar field? |
short | has_source_theta_dr |
do we need source for theta of ultra-relativistic neutrinos/relics? |
short | has_source_theta_ur |
do we need source for theta of ultra-relativistic neutrinos/relics? |
short | has_source_theta_ncdm |
do we need source for theta of all non-cold dark matter species (e.g. massive neutrinos)? |
short | has_source_phi |
do we need source for metric fluctuation phi? |
short | has_source_phi_prime |
do we need source for metric fluctuation phi'? |
short | has_source_phi_plus_psi |
do we need source for metric fluctuation (phi+psi)? |
short | has_source_psi |
do we need source for metric fluctuation psi? |
int | index_tp_t0 |
index value for temperature (j=0 term) |
int | index_tp_t1 |
index value for temperature (j=1 term) |
int | index_tp_t2 |
index value for temperature (j=2 term) |
int | index_tp_p |
index value for polarization |
int | index_tp_delta_m |
index value for delta tot |
int | index_tp_delta_g |
index value for delta of gammas |
int | index_tp_delta_b |
index value for delta of baryons |
int | index_tp_delta_cdm |
index value for delta of cold dark matter |
int | index_tp_delta_dcdm |
index value for delta of DCDM |
int | index_tp_delta_fld |
index value for delta of dark energy |
int | index_tp_delta_scf |
index value for delta of scalar field |
int | index_tp_delta_dr |
index value for delta of decay radiation |
int | index_tp_delta_ur |
index value for delta of ultra-relativistic neutrinos/relics |
int | index_tp_delta_ncdm1 |
index value for delta of first non-cold dark matter species (e.g. massive neutrinos) |
int | index_tp_perturbed_recombination_delta_temp |
Gas temperature perturbation |
int | index_tp_perturbed_recombination_delta_chi |
Inionization fraction perturbation |
int | index_tp_theta_m |
index value for theta tot |
int | index_tp_theta_g |
index value for theta of gammas |
int | index_tp_theta_b |
index value for theta of baryons |
int | index_tp_theta_cdm |
index value for theta of cold dark matter |
int | index_tp_theta_dcdm |
index value for theta of DCDM |
int | index_tp_theta_fld |
index value for theta of dark energy |
int | index_tp_theta_scf |
index value for theta of scalar field |
int | index_tp_theta_ur |
index value for theta of ultra-relativistic neutrinos/relics |
int | index_tp_theta_dr |
index value for F1 of decay radiation |
int | index_tp_theta_ncdm1 |
index value for theta of first non-cold dark matter species (e.g. massive neutrinos) |
int | index_tp_phi |
index value for metric fluctuation phi |
int | index_tp_phi_prime |
index value for metric fluctuation phi' |
int | index_tp_phi_plus_psi |
index value for metric fluctuation phi+psi |
int | index_tp_psi |
index value for metric fluctuation psi |
int * | tp_size |
number of types tp_size[index_md] included in computation for each mode |
int * | k_size_cmb |
k_size_cmb[index_md] number of k values used for CMB calculations, requiring a fine sampling in k-space |
int * | k_size_cl |
k_size_cl[index_md] number of k values used for non-CMB |
int * | k_size |
k_size[index_md] = total number of k values, including those needed for P(k) but not for |
double ** | k |
k[index_md][index_k] = list of values |
double | k_min |
minimum value (over all modes) |
double | k_max |
maximum value (over all modes) |
int | tau_size |
tau_size = number of values |
double * | tau_sampling |
tau_sampling[index_tau] = list of tau values |
double | selection_min_of_tau_min |
used in presence of selection functions (for matter density, cosmic shear...) |
double | selection_max_of_tau_max |
used in presence of selection functions (for matter density, cosmic shear...) |
double | selection_delta_tau |
used in presence of selection functions (for matter density, cosmic shear...) |
double * | selection_tau_min |
value of conformal time below which W(tau) is considered to vanish for each bin |
double * | selection_tau_max |
value of conformal time above which W(tau) is considered to vanish for each bin |
double * | selection_tau |
value of conformal time at the center of each bin |
double * | selection_function |
selection function W(tau), normalized to |
double *** | sources |
Pointer towards the source interpolation table sources[index_md] [index_ic * ppt->tp_size[index_md] + index_type] [index_tau * ppt->k_size + index_k] |
short | perturbations_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 perturb_vector |
Structure containing the indices and the values of the perturbation variables which are integrated over time (as well as their time-derivatives). For a given wavenumber, the size of these vectors changes when the approximation scheme changes.
struct perturb_workspace |
Workspace containing, among other things, the value at a given time of all background/perturbed quantities, as well as their indices. There will be one such structure created for each mode (scalar/.../tensor) and each thread (in case of parallel computing)
Data Fields | ||
---|---|---|
int | index_mt_psi |
psi in longitudinal gauge |
int | index_mt_phi_prime |
(d phi/d conf.time) in longitudinal gauge |
int | index_mt_h_prime |
h' (wrt conf. time) in synchronous gauge |
int | index_mt_h_prime_prime |
h'' (wrt conf. time) in synchronous gauge |
int | index_mt_eta_prime |
eta' (wrt conf. time) in synchronous gauge |
int | index_mt_alpha |
|
int | index_mt_alpha_prime |
|
int | index_mt_gw_prime_prime |
second derivative wrt conformal time of gravitational wave field, often called h |
int | index_mt_V_prime |
derivative of Newtonian gauge vector metric perturbation V |
int | index_mt_hv_prime_prime |
Second derivative of Synchronous gauge vector metric perturbation |
int | mt_size |
size of metric perturbation vector |
double * | pvecback |
background quantities |
double * | pvecthermo |
thermodynamics quantities |
double * | pvecmetric |
metric quantities |
struct perturb_vector * | pv |
pointer to vector of integrated perturbations and their time-derivatives |
double | delta_rho |
total density perturbation (gives delta Too) |
double | rho_plus_p_theta |
total (rho+p)*theta perturbation (gives delta Toi) |
double | rho_plus_p_shear |
total (rho+p)*shear (gives delta Tij) |
double | delta_p |
total pressure perturbation (gives Tii) |
double | gw_source |
stress-energy source term in Einstein's tensor equations (gives Tij[tensor]) |
double | vector_source_pi |
first stress-energy source term in Einstein's vector equations |
double | vector_source_v |
second stress-energy source term in Einstein's vector equations |
double | tca_shear_g |
photon shear in tight-coupling approximation |
double | tca_slip |
photon-baryon slip in tight-coupling approximation |
double | rsa_delta_g |
photon density in radiation streaming approximation |
double | rsa_theta_g |
photon velocity in radiation streaming approximation |
double | rsa_delta_ur |
photon density in radiation streaming approximation |
double | rsa_theta_ur |
photon velocity in radiation streaming approximation |
double * | delta_ncdm |
relative density perturbation of each ncdm species |
double * | theta_ncdm |
velocity divergence theta of each ncdm species |
double * | shear_ncdm |
shear for each ncdm species |
double | delta_m |
relative density perturbation of all non-relativistic species |
double | theta_m |
velocity divergence theta of all non-relativistic species |
FILE * | perturb_output_file |
filepointer to output file |
int | index_ikout |
index for output k value (when k_output_values is set) |
short | inter_mode |
flag defining the method used for interpolation background/thermo quantities tables |
int | last_index_back |
the background interpolation function background_at_tau() keeps memory of the last point called through this index |
int | last_index_thermo |
the thermodynamics interpolation function thermodynamics_at_z() keeps memory of the last point called through this index |
int | index_ap_tca |
index for tight-coupling approximation |
int | index_ap_rsa |
index for radiation streaming approximation |
int | index_ap_ufa |
index for ur fluid approximation |
int | index_ap_ncdmfa |
index for ncdm fluid approximation |
int | ap_size |
number of relevant approximations for a given mode |
int * | approx |
array of approximation flags holding at a given time: approx[index_ap] |
int | max_l_max |
maximum l_max for any multipole |
double * | s_l |
array of freestreaming coefficients |
struct perturb_parameters_and_workspace |
Structure pointing towards all what the function that perturb_derivs needs to know: fixed input parameters and indices contained in the various structures, workspace, etc.
Data Fields | ||
---|---|---|
struct precision * | ppr |
pointer to the precision structure |
struct background * | pba |
pointer to the background structure |
struct thermo * | pth |
pointer to the thermodynamics structure |
struct perturbs * | ppt |
pointer to the precision structure |
int | index_md |
index of mode (scalar/.../vector/tensor) |
int | index_ic |
index of initial condition (adiabatic/isocurvature(s)/...) |
int | index_k |
index of wavenumber |
double | k |
current value of wavenumber in 1/Mpc |
struct perturb_workspace * | ppw |
workspace defined above |
#define _SELECTION_NUM_MAX_ 100 |
maximum number and types of selection function (for bins of matter density or cosmic shear)
#define _MAX_NUMBER_OF_K_FILES_ 30 |
maximum number of k-values for perturbation output
enum tca_flags |
flags for various approximation schemes (tca = tight-coupling approximation, rsa = radiation streaming approximation, ufa = massless neutrinos / ultra-relativistic relics fluid approximation)
CAUTION: must be listed below in chronological order, and cannot be reversible. When integrating equations for a given mode, it is only possible to switch from left to right in the lists below.
enum tca_method |
labels for the way in which each approximation scheme is implemented
enum possible_gauges |