|
Fast Methods for Cosmological Simulations
FastSim serves as a tool for quick N-body simulations in modified gravity.
|
#include <stdio.h>#include <stdlib.h>#include <math.h>#include <string.h>#include <gsl/gsl_errno.h>#include <gsl/gsl_integration.h>#include <gsl/gsl_sf_expint.h>#include <gsl/gsl_roots.h>#include "ccl.h"#include "ccl_params.h"#include "ccl_halomod.h"
Go to the source code of this file.
Classes | |
| struct | Int_one_halo_Par |
| struct | Int_two_halo_Par |
Functions | |
| static double | u_nfw_c (ccl_cosmology *cosmo, double rv, double c, double k, int *status) |
| double | ccl_halo_concentration (ccl_cosmology *cosmo, double halomass, double a, double odelta, int *status) |
| static double | window_function (ccl_cosmology *cosmo, double m, double k, double a, double odelta, ccl_win_label label, int *status) |
| static double | one_halo_integrand (double log10mass, void *params) |
| static double | one_halo_integral (ccl_cosmology *cosmo, double k, double a, int *status) |
| static double | two_halo_integrand (double log10mass, void *params) |
| static double | two_halo_integral (ccl_cosmology *cosmo, double k, double a, int *status) |
| double | ccl_twohalo_matter_power (ccl_cosmology *cosmo, double k, double a, int *status) |
| double | ccl_onehalo_matter_power (ccl_cosmology *cosmo, double k, double a, int *status) |
| double | ccl_halomodel_matter_power (ccl_cosmology *cosmo, double k, double a, int *status) |
| double ccl_halo_concentration | ( | ccl_cosmology * | cosmo, |
| double | halomass, | ||
| double | a, | ||
| double | odelta, | ||
| int * | status | ||
| ) |
Computes the concentration of a halo of mass M. This is the ratio of virial raidus to scale radius for an NFW halo.
| cosmo | cosmology object containing parameters |
| halomass | halo mass in units of Msun |
| a | scale factor normalised to a=1 today |
| odelta | overdensity criteria (with respect to matter density) used for halo mass |
| status | Status flag: 0 if there are no errors, non-zero otherwise |
Definition at line 52 of file ccl_halomod.c.
References ccl_bhattacharya2011, ccl_constant_concentration, ccl_cosmology_set_status_message(), ccl_duffy2008, CCL_ERROR_CONC_DV, CCL_ERROR_HALOCONC, ccl_growth_factor(), ccl_raise_exception(), ccl_sigmaM(), ccl_cosmology::config, Dv_BryanNorman(), ccl_parameters::h, ccl_configuration::halo_concentration_method, ccl_cosmology::params, and pow().
Referenced by window_function().
| double ccl_halomodel_matter_power | ( | ccl_cosmology * | cosmo, |
| double | k, | ||
| double | a, | ||
| int * | status | ||
| ) |
Computes the halo model density-density power spectrum as the sum of two- and one-halo terms.
| cosmo | cosmology object containing parameters |
| k | wavenumber in units of Mpc^{-1} |
| a | scale factor normalised to a=1 today |
| status | Status flag: 0 if there are no errors, non-zero otherwise |
Definition at line 314 of file ccl_halomod.c.
References ccl_onehalo_matter_power(), and ccl_twohalo_matter_power().
Referenced by compare_halomod().
| double ccl_onehalo_matter_power | ( | ccl_cosmology * | cosmo, |
| double | k, | ||
| double | a, | ||
| int * | status | ||
| ) |
Computes the halo model density-density power spectrum one-halo term.
| cosmo | cosmology object containing parameters |
| k | wavenumber in units of Mpc^{-1} |
| a | scale factor normalised to a=1 today |
| status | Status flag: 0 if there are no errors, non-zero otherwise |
Definition at line 304 of file ccl_halomod.c.
References one_halo_integral().
Referenced by ccl_halomodel_matter_power().
| double ccl_twohalo_matter_power | ( | ccl_cosmology * | cosmo, |
| double | k, | ||
| double | a, | ||
| int * | status | ||
| ) |
Computes the halo model density-density power spectrum two-halo term.
| cosmo | cosmology object containing parameters |
| k | wavenumber in units of Mpc^{-1} |
| a | scale factor normalised to a=1 today |
| status | Status flag: 0 if there are no errors, non-zero otherwise |
Definition at line 277 of file ccl_halomod.c.
References ccl_linear_matter_power(), ccl_nfw, Dv_BryanNorman(), HM_MMIN, two_halo_integral(), and window_function().
Referenced by ccl_halomodel_matter_power().
|
static |
Definition at line 174 of file ccl_halomod.c.
References Int_one_halo_Par::a, ccl_cosmology_set_status_message(), CCL_ERROR_ONE_HALO_INT, ccl_raise_gsl_warning(), cl_cmbl_bm::cosmo, Int_one_halo_Par::cosmo, HM_EPSABS, HM_EPSREL, HM_INT_METHOD, HM_LIMIT, HM_MMAX, HM_MMIN, Int_one_halo_Par::k, one_halo_integrand(), Int_one_halo_Par::status, and w.
Referenced by ccl_onehalo_matter_power().
Definition at line 158 of file ccl_halomod.c.
References Int_one_halo_Par::a, ccl_massfunc(), ccl_nfw, Int_one_halo_Par::cosmo, Dv_BryanNorman(), Int_one_halo_Par::k, p, pow(), Int_one_halo_Par::status, and window_function().
Referenced by one_halo_integral().
|
static |
Definition at line 237 of file ccl_halomod.c.
References Int_two_halo_Par::a, ccl_cosmology_set_status_message(), CCL_ERROR_TWO_HALO_INT, ccl_raise_gsl_warning(), cl_cmbl_bm::cosmo, Int_two_halo_Par::cosmo, HM_EPSABS, HM_EPSREL, HM_INT_METHOD, HM_LIMIT, HM_MMAX, HM_MMIN, Int_two_halo_Par::k, Int_two_halo_Par::status, two_halo_integrand(), and w.
Referenced by ccl_twohalo_matter_power().
Definition at line 218 of file ccl_halomod.c.
References Int_two_halo_Par::a, ccl_halo_bias(), ccl_massfunc(), ccl_nfw, Int_two_halo_Par::cosmo, Dv_BryanNorman(), Int_two_halo_Par::k, p, pow(), Int_two_halo_Par::status, and window_function().
Referenced by two_halo_integral().
|
static |
Definition at line 17 of file ccl_halomod.c.
References cl_cmbl_bm::c, and rs.
Referenced by window_function().
|
static |
Definition at line 119 of file ccl_halomod.c.
References cl_cmbl_bm::c, CCL_ERROR_HALOWIN, ccl_halo_concentration(), ccl_nfw, ccl_raise_exception(), ccl_rho_x(), ccl_species_m_label, r_delta(), and u_nfw_c().
Referenced by ccl_twohalo_matter_power(), one_halo_integrand(), and two_halo_integrand().