Fast Methods for Cosmological Simulations
FastSim serves as a tool for quick N-body simulations in modified gravity.
ccl_massfunc.h
Go to the documentation of this file.
1 
2 #ifndef __CCL_MASSFUNC_H_INCLUDED__
3 #define __CCL_MASSFUNC_H_INCLUDED__
4 
6 
7 /*
8  * Computes sigma(R), the power spectrum normalization, over log-spaced values of mass and radii
9  * The result is attached to the cosmology object
10  * @param cosmo Cosmological parameters
11  * @param status Status flag. 0 if there are no errors, nonzero otherwise.
12  * For specific cases see documentation for ccl_error.
13  */
15 
16 // TODO: smooth_mass is not really correct in this function, tho it makes sense in compute_sigma
17 /*
18  * Compute halo mass function at a given mass for a given cosmology as dn/ dlog10(M)
19  * @param cosmo Cosmological parameters
20  * @param smooth_mass Mass to compute at, in units of Msun
21  * @param a Scale factor, normalized to a=1 today
22  * @param odelta choice of Delta
23  * @param status Status flag. 0 if there are no errors, nonzero otherwise.
24  * For specific cases see documentation for ccl_error.
25  * @return massfunc, the value of the mass function at the specified parameters
26  */
27 double ccl_massfunc(ccl_cosmology *cosmo, double smooth_mass, double a, double odelta, int *status);
28 
29 // TODO: status flag unused here
30 /*
31  * Compute the linear halo bias for a cosmology and mass scale
32  * @param cosmo Cosmological parameters
33  * @param smooth_mass Mass to compute at, in units of Msun
34  * @param a Scale factor, normalized to a=1 today
35  * @param status Status flag. 0 if there are no errors, nonzero otherwise.
36  * For specific cases see documentation for ccl_error.
37  * @return hb, the halo bias at the specified parameters
38  */
39 double ccl_halo_bias(ccl_cosmology *cosmo, double smooth_mass, double a, double odelta, int *status);
40 
41 /*
42  * Convert smoothing halo mass in units of Msun to smoothing halo radius in units of Mpc.
43  * @param cosmo Cosmological parameters
44  * @param smooth_mass Mass to compute at, in units of Msun
45  * @param a Scale factor, normalized to a=1 today
46  * @param odelta choice of Delta
47  * @param status Status flag. 0 if there are no errors, nonzero otherwise.
48  * For specific cases see documentation for ccl_error.
49  * @return smooth_radius, the equivalent tophat smoothing radius corresponding to smooth_mass
50  */
51 double ccl_massfunc_m2r(ccl_cosmology *cosmo, double smooth_mass, int *status);
52 
53 /*
54  * Calculate the standard deviation of density at smoothing mass M via interpolation.
55  * Return sigma from the sigmaM interpolation. Also computes the sigma interpolation if necessary.
56  * @param cosmo Cosmological parameters
57  * @param smooth_mass Mass to compute at, in units of Msun
58  * @param a Scale factor, normalized to a=1 today
59  * @param status Status flag. 0 if there are no errors, nonzero otherwise.
60  * For specific cases see documentation for ccl_error.
61  * @return sigmaM, the standard deviation of density at mass scale M
62  */
63 double ccl_sigmaM(ccl_cosmology *cosmo, double smooth_mass, double a, int *status);
64 
65  /*
66  * Fitting function for the spherical-model critical linear density for collapse
67  * Fitting formula from Nakamura & Suto (1997; arXiv:astro-ph/9710107)
68  * @param cosmo Cosmological parameters
69  * @param a, scale factor, normalized to a=1 today
70  * @param status Status flag. 0 if there are no errors, nonzero otherwise.
71  */
72  double dc_NakamuraSuto(ccl_cosmology *cosmo, double a, int *status);
73 
74  /*
75  * Fitting function for virial collapse density contrast assuming LCDM.
76  * Density contrast is relative to background *matter* density, *not* critical density
77  * Fitting formula from Bryan & Norman (1998; arXiv:astro-ph/9710107)
78  * @param cosmo Cosmological parameters
79  * @param a, scale factor, normalized to a=1 today
80  * @param status Status flag. 0 if there are no errors, nonzero otherwise.
81  */
82  double Dv_BryanNorman(ccl_cosmology *cosmo, double a, int *status);
83 
84 /*
85  * Calcualtes the comoving halo radius assuming a given overdensity criteria
86  * @param cosmo Cosmological parameters
87  * @param halomass in units of Msun
88  * @param a, scale factor, normalized to a=1 today
89  * @param status Status flag. 0 if there are no errors, nonzero otherwise.
90  */
91 double r_delta(ccl_cosmology *cosmo, double halomass, double a, double odelta, int *status);
92 
94 
95 #endif
double r_delta(ccl_cosmology *cosmo, double halomass, double a, double odelta, int *status)
Definition: ccl_massfunc.c:52
#define CCL_BEGIN_DECLS
Definition: ccl_defs.h:17
double ccl_massfunc(ccl_cosmology *cosmo, double smooth_mass, double a, double odelta, int *status)
Definition: ccl_massfunc.c:562
double dc_NakamuraSuto(ccl_cosmology *cosmo, double a, int *status)
Definition: ccl_massfunc.c:21
double ccl_sigmaM(ccl_cosmology *cosmo, double smooth_mass, double a, int *status)
Definition: ccl_massfunc.c:624
double ccl_massfunc_m2r(ccl_cosmology *cosmo, double smooth_mass, int *status)
Definition: ccl_massfunc.c:606
double ccl_halo_bias(ccl_cosmology *cosmo, double smooth_mass, double a, double odelta, int *status)
Definition: ccl_massfunc.c:582
double Dv_BryanNorman(ccl_cosmology *cosmo, double a, int *status)
Definition: ccl_massfunc.c:37
CCL_BEGIN_DECLS void ccl_cosmology_compute_sigma(ccl_cosmology *cosmo, int *status)
Definition: ccl_massfunc.c:431
#define CCL_END_DECLS
Definition: ccl_defs.h:18