4 #include "trigonometric_integrals.h"
9 #define _M_EV_TOO_BIG_FOR_HALOFIT_ 10.
11 #define _M_SUN_ 1.98847e30
13 #define _MAX_NUM_EXTRAPOLATION_ 100000
15 enum non_linear_method {nl_none,nl_halofit,nl_HMcode};
16 enum pk_outputs {pk_linear,pk_nonlinear};
18 enum source_extrapolation {extrap_zero,extrap_only_max,extrap_only_max_units,extrap_max_scaled,extrap_hmcode,extrap_user_defined};
20 enum halofit_integral_type {halofit_integral_one, halofit_integral_two, halofit_integral_three};
22 enum hmcode_baryonic_feedback_model {nl_emu_dmonly, nl_owls_dmonly, nl_owls_ref, nl_owls_agn, nl_owls_dblim, nl_user_defined};
23 enum out_sigmas {out_sigma,out_sigma_prime,out_sigma_disp};
42 enum non_linear_method
method;
46 enum hmcode_baryonic_feedback_model feedback;
219 double ** sigma_disp;
220 double ** sigma_disp_100;
221 double ** sigma_prime;
223 double dark_energy_correction;
247 enum pk_outputs pk_output,
254 int fourier_pks_at_z(
258 enum pk_outputs pk_output,
263 double * out_pk_cb_ic
270 enum pk_outputs pk_output,
278 int fourier_pks_at_k_and_z(
282 enum pk_outputs pk_output,
288 double * out_pk_cb_ic
294 enum pk_outputs pk_output,
310 enum out_sigmas sigma_output,
318 enum pk_outputs pk_output,
397 enum out_sigmas sigma_output,
423 short * halofit_found_k_max
428 double * integrand_array,
436 enum halofit_integral_type type,
453 short * halofit_found_k_max,
537 double * sigma_disp_cb,
545 double * sigma_disp_100,
546 double * sigma_disp_100_cb,
554 double * sigma_prime,
555 double * sigma_prime_cb,
Definition: background.h:48
int fourier_pks_at_kvec_and_zvec(struct background *pba, struct fourier *pfo, enum pk_outputs pk_output, double *kvec, int kvec_size, double *zvec, int zvec_size, double *out_pk, double *out_pk_cb)
Definition: fourier.c:748
int fourier_sigma_at_z(struct background *pba, struct fourier *pfo, double R, double z, int index_pk, double k_per_decade, double *result)
Definition: fourier.c:2467
int fourier_hmcode_sigma8_at_z(struct background *pba, struct fourier *pfo, double z, double *sigma_8, double *sigma_8_cb, struct fourier_workspace *pnw)
Definition: fourier.c:4171
int fourier_k_nl_at_z(struct background *pba, struct fourier *pfo, double z, double *k_nl, double *k_nl_cb)
Definition: fourier.c:1106
int fourier_hmcode_growint(struct precision *ppr, struct background *pba, struct fourier *pfo, double a, double w0, double wa, double *growth)
Definition: fourier.c:3978
int fourier_halofit(struct precision *ppr, struct background *pba, struct perturbations *ppt, struct primordial *ppm, struct fourier *pfo, int index_pk, double tau, double *pk_nl, double *lnpk_l, double *ddlnpk_l, double *k_nl, short *nl_corr_not_computable_at_this_k)
Definition: fourier.c:2556
int fourier_pk_tilt_at_k_and_z(struct background *pba, struct primordial *ppm, struct fourier *pfo, enum pk_outputs pk_output, double k, double z, int index_pk, double *pk_tilt)
Definition: fourier.c:956
int fourier_hmcode_baryonic_feedback(struct fourier *pfo)
Definition: fourier.c:3755
int fourier_hmcode_fill_sigtab(struct precision *ppr, struct background *pba, struct perturbations *ppt, struct primordial *ppm, struct fourier *pfo, int index_tau, double *lnpk_l, double *ddlnpk_l, struct fourier_workspace *pnw)
Definition: fourier.c:3823
int fourier_hmcode(struct precision *ppr, struct background *pba, struct perturbations *ppt, struct primordial *ppm, struct fourier *pfo, int index_pk, int index_tau, double tau, double *pk_nl, double **lnpk_l, double **ddlnpk_l, double *k_nl, short *nl_corr_not_computable_at_this_k, struct fourier_workspace *pnw)
Definition: fourier.c:3100
int fourier_hmcode_sigmadisp100_at_z(struct background *pba, struct fourier *pfo, double z, double *sigma_disp_100, double *sigma_disp_100_cb, struct fourier_workspace *pnw)
Definition: fourier.c:4326
int fourier_hmcode_fill_growtab(struct precision *ppr, struct background *pba, struct fourier *pfo, struct fourier_workspace *pnw)
Definition: fourier.c:3916
int fourier_get_source(struct background *pba, struct perturbations *ppt, struct fourier *pfo, int index_k, int index_ic, int index_tp, int index_tau, double **sources, double *source)
Definition: fourier.c:1967
int fourier_sigmas_at_z(struct precision *ppr, struct background *pba, struct fourier *pfo, double R, double z, int index_pk, enum out_sigmas sigma_output, double *result)
Definition: fourier.c:1030
int fourier_hmcode_halomassfunction(double nu, double *hmf)
Definition: fourier.c:4143
int fourier_free(struct fourier *pfo)
Definition: fourier.c:1654
int fourier_hmcode_workspace_init(struct precision *ppr, struct background *pba, struct fourier *pfo, struct fourier_workspace *pnw)
Definition: fourier.c:3601
int fourier_pk_at_k_and_z(struct background *pba, struct primordial *ppm, struct fourier *pfo, enum pk_outputs pk_output, double k, double z, int index_pk, double *out_pk, double *out_pk_ic)
Definition: fourier.c:378
int fourier_hmcode_window_nfw(struct fourier *pfo, double k, double rv, double c, double *window_nfw)
Definition: fourier.c:4085
int fourier_indices(struct precision *ppr, struct background *pba, struct perturbations *ppt, struct primordial *ppm, struct fourier *pfo)
Definition: fourier.c:1724
int fourier_get_k_list(struct precision *ppr, struct perturbations *ppt, struct fourier *pfo)
Definition: fourier.c:1854
int fourier_hmcode_workspace_free(struct fourier *pfo, struct fourier_workspace *pnw)
Definition: fourier.c:3653
int fourier_get_tau_list(struct perturbations *ppt, struct fourier *pfo)
Definition: fourier.c:1916
int fourier_pk_at_z(struct background *pba, struct fourier *pfo, enum linear_or_logarithmic mode, enum pk_outputs pk_output, double z, int index_pk, double *out_pk, double *out_pk_ic)
Definition: fourier.c:63
int fourier_hmcode_sigmadisp_at_z(struct background *pba, struct fourier *pfo, double z, double *sigma_disp, double *sigma_disp_cb, struct fourier_workspace *pnw)
Definition: fourier.c:4249
int fourier_hmcode_sigmaprime_at_z(struct background *pba, struct fourier *pfo, double z, double *sigma_prime, double *sigma_prime_cb, struct fourier_workspace *pnw)
Definition: fourier.c:4402
int fourier_pk_linear(struct background *pba, struct perturbations *ppt, struct primordial *ppm, struct fourier *pfo, int index_pk, int index_tau, int k_size, double *lnpk, double *lnpk_ic)
Definition: fourier.c:2120
int fourier_halofit_integrate(struct fourier *pfo, double *integrand_array, int integrand_size, int ia_size, int index_ia_k, int index_ia_pk, int index_ia_sum, int index_ia_ddsum, double R, enum halofit_integral_type type, double *sum)
Definition: fourier.c:3022
int fourier_init(struct precision *ppr, struct background *pba, struct thermodynamics *pth, struct perturbations *ppt, struct primordial *ppm, struct fourier *pfo)
Definition: fourier.c:1192
int fourier_sigmas(struct fourier *pfo, double R, double *lnpk_l, double *ddlnpk_l, int k_size, double k_per_decade, enum out_sigmas sigma_output, double *result)
Definition: fourier.c:2291
int fourier_hmcode_dark_energy_correction(struct precision *ppr, struct background *pba, struct fourier *pfo, struct fourier_workspace *pnw)
Definition: fourier.c:3692
double * pk_eq_w_and_Omega
Definition: fourier.h:183
int index_md_scalars
Definition: fourier.h:60
short has_pk_m
Definition: fourier.h:73
double ** nl_corr_density
Definition: fourier.h:164
double ** ddln_pk_nl
Definition: fourier.h:148
int index_tau_min_nl
Definition: fourier.h:167
double * k
Definition: fourier.h:98
int pk_eq_size
Definition: fourier.h:178
int pk_eq_tau_size
Definition: fourier.h:180
double ** ddln_pk_ic_l
Definition: fourier.h:126
double * tau
Definition: fourier.h:161
double ** ddln_pk_l
Definition: fourier.h:141
int index_pk_eq_w
Definition: fourier.h:176
enum source_extrapolation extrapolation_method
Definition: fourier.h:44
int pk_size
Definition: fourier.h:86
enum non_linear_method method
Definition: fourier.h:42
int ic_ic_size
Definition: fourier.h:64
ErrorMsg error_message
Definition: fourier.h:194
int k_size
Definition: fourier.h:96
int index_pk_eq_Omega_m
Definition: fourier.h:177
double eta_0
Definition: fourier.h:49
double * ddstab
Definition: fourier.h:212
double z_infinity
Definition: fourier.h:50
int k_size_pk
Definition: fourier.h:97
int index_pk_total
Definition: fourier.h:81
short has_pk_eq
Definition: fourier.h:52
double ** ln_pk_nl
Definition: fourier.h:143
double ** ln_pk_ic_l
Definition: fourier.h:110
double ** ln_pk_l
Definition: fourier.h:136
int index_ln_tau_pk
Definition: fourier.h:108
short * is_non_zero
Definition: fourier.h:65
double ** k_nl
Definition: fourier.h:165
short has_pk_cb
Definition: fourier.h:74
double * growtable
Definition: fourier.h:214
int tau_size
Definition: fourier.h:160
double c_min
Definition: fourier.h:48
double * pk_eq_tau
Definition: fourier.h:182
int index_pk_cb
Definition: fourier.h:77
int ic_size
Definition: fourier.h:63
double * ln_k
Definition: fourier.h:99
short fourier_verbose
Definition: fourier.h:192
double * pk_eq_ddw_and_ddOmega
Definition: fourier.h:184
int ln_tau_size
Definition: fourier.h:107
double * sigma8
Definition: fourier.h:150
short has_pk_matter
Definition: fourier.h:94
double * stab
Definition: fourier.h:211
int index_pk_cluster
Definition: fourier.h:83
int index_pk_m
Definition: fourier.h:76
double * ln_tau
Definition: fourier.h:101
Definition: fourier.h:204
Definition: perturbations.h:98
linear_or_logarithmic
Definition: primordial.h:21
Definition: primordial.h:79
Definition: thermodynamics.h:59