|
Fast Methods for Cosmological Simulations
FastSim serves as a tool for quick N-body simulations in modified gravity.
|

Go to the source code of this file.
Functions | |
| CCL_BEGIN_DECLS void | ccl_cosmology_write_power_class_z (char *filename, ccl_cosmology *cosmo, double z, int *status) |
| double | ccl_bcm_model_fka (ccl_cosmology *cosmo, double k, double a, int *status) |
| double | ccl_linear_matter_power (ccl_cosmology *cosmo, double k, double a, int *status) |
| double | ccl_nonlin_matter_power (ccl_cosmology *cosmo, double k, double a, int *status) |
| void | ccl_cosmology_compute_power (ccl_cosmology *cosmo, int *status) |
| double | ccl_sigmaR (ccl_cosmology *cosmo, double R, double a, int *status) |
| double | ccl_sigmaV (ccl_cosmology *cosmo, double R, double a, int *status) |
| double | ccl_sigma8 (ccl_cosmology *cosmo, int *status) |
| double ccl_bcm_model_fka | ( | ccl_cosmology * | cosmo, |
| double | k, | ||
| double | a, | ||
| int * | status | ||
| ) |
Correction for the impact of baryonic physics on the matter power spectrum. Returns f(k,a) [dimensionless] for given cosmology, using the method specified for the baryonic transfer function. f(k,a) is the fractional change in the nonlinear matter power spectrum from the Baryon Correction Model (BCM) of Schenider & Teyssier (2015). The parameters of the model are passed as part of the cosmology class.
| cosmo | Cosmology parameters and configurations, including baryonic parameters. |
| k | Fourier mode, in [1/Mpc] units |
| a | scale factor, normalized to 1 for today |
| status | Status flag. 0 if there are no errors, nonzero otherwise. For specific cases see documentation for ccl_error.c |
Definition at line 574 of file ccl_power.c.
References ccl_parameters::bcm_etab, ccl_parameters::bcm_ks, ccl_parameters::bcm_log10Mc, ccl_parameters::h, ccl_cosmology::params, pow(), and z.
Referenced by ccl_nonlin_matter_power(), and compare_bcm().
| void ccl_cosmology_compute_power | ( | ccl_cosmology * | cosmo, |
| int * | status | ||
| ) |
Compute the power spectrum and create a 2d spline P(k,z) to be stored in the cosmology structure.
| cosmo | Cosmological parameters |
| status | Status flag. 0 if there are no errors, nonzero otherwise. For specific cases see documentation for ccl_error.c |
Definition at line 1403 of file ccl_power.c.
References ccl_bbks, ccl_boltzmann_class, ccl_check_status(), ccl_cosmology_compute_power_bbks(), ccl_cosmology_compute_power_class(), ccl_cosmology_compute_power_eh(), ccl_cosmology_compute_power_emu(), ccl_cosmology_set_status_message(), ccl_eisenstein_hu, ccl_emulator, CCL_ERROR_INCONSISTENT, ccl_cosmology::computed_power, ccl_cosmology::config, and ccl_configuration::transfer_function_method.
Referenced by ccl_linear_matter_power(), and ccl_nonlin_matter_power().
| CCL_BEGIN_DECLS void ccl_cosmology_write_power_class_z | ( | char * | filename, |
| ccl_cosmology * | cosmo, | ||
| double | z, | ||
| int * | status | ||
| ) |
CLASS power spectrum without splines. Write k, P(k,z) [1/Mpc, Mpc^3] for given cosmology at the k values used within CLASS (spectra.ln_k[]), using the method specified in config.matter_power_spectrum_method.
| filename | File into which k, P(k,a) will be written |
| cosmo | Cosmology parameters and configurations |
| z | Redshift at which the power spectrum is evaluated |
| status | Status flag. 0 if there are no errors, nonzero otherwise. |
Definition at line 596 of file ccl_power.c.
References ccl_cosmology_set_status_message(), CCL_ERROR_CLASS, ccl_fill_class_parameters(), ccl_free_class_structs(), ccl_run_class(), run_pk_param_space::nonlinear, run_pk_param_space::precision, and spectra().
Referenced by write_Pk_CLASS().
| double ccl_linear_matter_power | ( | ccl_cosmology * | cosmo, |
| double | k, | ||
| double | a, | ||
| int * | status | ||
| ) |
Linear matter power spectrum. Returns P_lin(k,a) [Mpc^3] for given cosmology, using the method specified in cosmo->config.transfer_function_method.
| cosmo | Cosmology parameters and configurations |
| k | Fourier mode, in [1/Mpc] units |
| a | scale factor, normalized to 1 for today |
| status | Status flag. 0 if there are no errors, nonzero otherwise. For specific cases see documentation for ccl_error.c |
Definition at line 1506 of file ccl_power.c.
References A_MIN_EMU, ccl_spline_params::A_SPLINE_MINLOG_PK, ccl_cosmology_compute_power(), ccl_cosmology_set_status_message(), ccl_emulator, CCL_ERROR_INCONSISTENT, CCL_ERROR_SPLINE_EV, ccl_growth_factor(), ccl_power_extrapol_highk(), ccl_power_extrapol_lowk(), ccl_raise_gsl_warning(), ccl_splines, ccl_cosmology::computed_power, ccl_cosmology::config, ccl_cosmology::data, ccl_data::k_max_lin, ccl_data::k_min_lin, ccl_data::p_lin, and ccl_configuration::transfer_function_method.
Referenced by ccl_nonlin_matter_power(), ccl_twohalo_matter_power(), compare_bbks(), compare_eh(), compare_power_nu(), lin_pow_spec(), main(), sigmaR_integrand(), and sigmaV_integrand().
| double ccl_nonlin_matter_power | ( | ccl_cosmology * | cosmo, |
| double | k, | ||
| double | a, | ||
| int * | status | ||
| ) |
Non-linear matter power spectrum. Returns P_NL(k,a) [Mpc^3] for given cosmology, using the method specified in cosmo->config.transfer_function_method and cosmo->config.matter_power_spectrum_method.
| cosmo | Cosmology parameters and configurations |
| k | Fourier mode, in [1/Mpc] units |
| a | scale factor, normalized to 1 for today |
| status | Status flag. 0 if there are no errors, nonzero otherwise. For specific cases see documentation for ccl_error.c |
Definition at line 1562 of file ccl_power.c.
References A_MIN_EMU, ccl_spline_params::A_SPLINE_MINLOG_PK, ccl_configuration::baryons_power_spectrum_method, ccl_bcm, ccl_bcm_model_fka(), ccl_cosmology_compute_power(), ccl_cosmology_set_status_message(), ccl_emu, ccl_emulator, CCL_ERROR_EMULATOR_BOUND, CCL_ERROR_NOT_IMPLEMENTED, CCL_ERROR_SPLINE_EV, ccl_growth_factor(), ccl_halofit, ccl_linear, ccl_linear_matter_power(), ccl_power_extrapol_highk(), ccl_power_extrapol_lowk(), ccl_raise_gsl_warning(), ccl_raise_warning(), ccl_splines, ccl_cosmology::computed_power, ccl_cosmology::config, ccl_cosmology::data, ccl_data::k_max_nl, ccl_data::k_min_nl, ccl_configuration::matter_power_spectrum_method, ccl_data::p_nl, and ccl_configuration::transfer_function_method.
Referenced by ccl_correlation_3d(), cl_integrand(), compare_bcm(), compare_emu(), compare_emu_nu(), compare_power_nu_nl(), main(), non_lin_pow_spec(), and transfer_nc().
| double ccl_sigma8 | ( | ccl_cosmology * | cosmo, |
| int * | status | ||
| ) |
Computes sigma8, variance of the matter density field with (top-hat) smoothing scale R = 8 Mpc/h, from linear power spectrum. Returns sigma8 for specified cosmology.
| cosmo | Cosmology parameters and configurations |
| status | Status flag. 0 if there are no errors, nonzero otherwise. For specific cases see documentation for ccl_error.c |
Definition at line 1777 of file ccl_power.c.
References ccl_sigmaR(), ccl_parameters::h, and ccl_cosmology::params.
Referenced by ccl_cosmology_compute_power_bbks(), ccl_cosmology_compute_power_eh(), main(), and norm_pwr().
| double ccl_sigmaR | ( | ccl_cosmology * | cosmo, |
| double | R, | ||
| double | a, | ||
| int * | status | ||
| ) |
Variance of the matter density field with (top-hat) smoothing scale R [Mpc]. Returns sigma(R) for specified cosmology at a = 1.
| cosmo | Cosmology parameters and configurations |
| R | Smoothing scale, in [Mpc] units |
| a | scale factor |
| status | Status flag. 0 if there are no errors, nonzero otherwise. For specific cases see documentation for ccl_error.c |
Definition at line 1715 of file ccl_power.c.
References ccl_growth_factor(), ccl_gsl, ccl_raise_gsl_warning(), ccl_splines, cl_cmbl_bm::cosmo, SigmaR_pars::cosmo, ccl_gsl_params::INTEGRATION_SIGMAR_EPSREL, ccl_spline_params::K_MAX, ccl_spline_params::K_MIN, M_PI, ccl_gsl_params::N_ITERATION, SigmaR_pars::R, sigmaR_integrand(), sqrt(), and SigmaR_pars::status.
Referenced by ccl_cosmology_compute_sigma(), ccl_sigma8(), and main().
| double ccl_sigmaV | ( | ccl_cosmology * | cosmo, |
| double | R, | ||
| double | a, | ||
| int * | status | ||
| ) |
Variance of the displacement field with (top-hat) smoothing scale R [Mpc] Returns sigma(V(R)) for specified cosmology at a = 1.
| cosmo | Cosmology parameters and configurations |
| R | smoothing scale, in [Mpc] units |
| a | scale factor |
| status | Status flag. 0 if there are no errors, nonzero otherwise. For specific cases see documentation for ccl_error.c |
Definition at line 1746 of file ccl_power.c.
References ccl_growth_factor(), ccl_gsl, ccl_raise_gsl_warning(), ccl_splines, cl_cmbl_bm::cosmo, SigmaV_pars::cosmo, ccl_gsl_params::INTEGRATION_SIGMAR_EPSREL, ccl_spline_params::K_MAX, ccl_spline_params::K_MIN, M_PI, ccl_gsl_params::N_ITERATION, SigmaV_pars::R, sigmaV_integrand(), sqrt(), and SigmaV_pars::status.