|
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_integration.h>#include <gsl/gsl_errno.h>#include <gsl/gsl_roots.h>#include <gsl/gsl_spline.h>#include <gsl/gsl_sf_bessel.h>#include <gsl/gsl_sf_legendre.h>#include "fftlog.h"#include "ccl.h"#include "ccl_params.h"
Go to the source code of this file.
Classes | |
| struct | corr_int_par |
Functions | |
| static int | taper_cl (int n_ell, double *ell, double *cl, double *ell_limits) |
| static void | ccl_tracer_corr_fftlog (ccl_cosmology *cosmo, int n_ell, double *ell, double *cls, int n_theta, double *theta, double *wtheta, int corr_type, int do_taper_cl, double *taper_cl_limits, int *status) |
| static double | corr_bessel_integrand (double l, void *params) |
| static void | ccl_tracer_corr_bessel (ccl_cosmology *cosmo, int n_ell, double *ell, double *cls, int n_theta, double *theta, double *wtheta, int corr_type, int *status) |
| static void | ccl_compute_legendre_polynomial (int corr_type, double theta, int ell_max, double *Pl_theta) |
| static void | ccl_tracer_corr_legendre (ccl_cosmology *cosmo, int n_ell, double *ell, double *cls, int n_theta, double *theta, double *wtheta, int corr_type, int do_taper_cl, double *taper_cl_limits, int *status) |
| void | ccl_correlation (ccl_cosmology *cosmo, int n_ell, double *ell, double *cls, int n_theta, double *theta, double *wtheta, int corr_type, int do_taper_cl, double *taper_cl_limits, int flag_method, int *status) |
| void | ccl_correlation_3d (ccl_cosmology *cosmo, double a, int n_r, double *r, double *xi, int do_taper_pk, double *taper_pk_limits, int *status) |
|
static |
Definition at line 267 of file ccl_correlation.c.
References CCL_CORR_GG, CCL_CORR_GL, and M_PI.
Referenced by ccl_tracer_corr_legendre().
| void ccl_correlation | ( | ccl_cosmology * | cosmo, |
| int | n_ell, | ||
| double * | ell, | ||
| double * | cls, | ||
| int | n_theta, | ||
| double * | theta, | ||
| double * | wtheta, | ||
| int | corr_type, | ||
| int | do_taper_cl, | ||
| double * | taper_cl_limits, | ||
| int | flag_method, | ||
| int * | status | ||
| ) |
Computes the correlation function (wrapper)
| cosmo | :Cosmological parameters |
| n_ell | : number of multipoles in the input power spectrum |
| ell | : multipoles at which the power spectrum is evaluated |
| cls | : input power spectrum |
| n_theta | : number of output values of the separation angle (theta) |
| theta | : values of the separation angle in degrees. |
| wtheta | : the values of the correlation function at the angles above will be returned in this array, which should be pre-allocated |
| do_taper_cl | : |
| taper_cl_limits | |
| flag_method | : method to compute the correlation function. Choose between:
|
| corr_type | : type of correlation function. Choose between:
|
Definition at line 391 of file ccl_correlation.c.
References ccl_check_status(), CCL_CORR_BESSEL, CCL_CORR_FFTLOG, CCL_CORR_LGNDRE, ccl_cosmology_set_status_message(), CCL_ERROR_INCONSISTENT, ccl_tracer_corr_bessel(), ccl_tracer_corr_fftlog(), and ccl_tracer_corr_legendre().
Referenced by compare_corr(), and main().
| void ccl_correlation_3d | ( | ccl_cosmology * | cosmo, |
| double | a, | ||
| int | n_r, | ||
| double * | r, | ||
| double * | xi, | ||
| int | do_taper_pk, | ||
| double * | taper_pk_limits, | ||
| int * | status | ||
| ) |
Computes the 3dcorrelation function (wrapper)
| cosmo | :Cosmological parameters |
| a | : scale factor |
| n_r | : number of output values of distance r |
| r | : values of the distance in Mpc |
| xi | : the values of the correlation function at the distances above will be returned in this array, which should be pre-allocated |
| do_taper_pk | : key for tapering (using cosine tapering by default) |
| taper_pk_limits | limits of tapering |
Definition at line 427 of file ccl_correlation.c.
References ccl_check_status(), ccl_cosmology_set_status_message(), CCL_ERROR_MEMORY, ccl_log_spacing(), ccl_nonlin_matter_power(), ccl_spline_eval(), ccl_spline_free(), ccl_spline_init(), ccl_splines, ccl_spline_params::K_MAX, ccl_spline_params::K_MIN, ccl_spline_params::N_K_3DCOR, pk2xi(), and taper_cl().
Referenced by compare_correlation_3d(), and main().
|
static |
Definition at line 184 of file ccl_correlation.c.
References CCL_CORR_GG, CCL_CORR_GL, CCL_CORR_LM, CCL_CORR_LP, ccl_cosmology_set_status_message(), CCL_ERROR_MEMORY, ccl_gsl, ccl_raise_gsl_warning(), ccl_spline_free(), ccl_spline_init(), ccl_splines, corr_int_par::cl0, corr_int_par::cl_spl, corr_int_par::clf, corr_bessel_integrand(), corr_int_par::ell0, ccl_spline_params::ELL_MAX_CORR, corr_int_par::ellf, corr_int_par::extrapol_0, corr_int_par::extrapol_f, corr_int_par::i_bessel, ccl_gsl_params::INTEGRATION_EPSREL, ccl_gsl_params::INTEGRATION_GAUSS_KRONROD_POINTS, M_PI, ccl_gsl_params::N_ITERATION, corr_int_par::nell, corr_int_par::th, corr_int_par::tilt0, corr_int_par::tiltf, and w.
Referenced by ccl_correlation().
|
static |
Definition at line 50 of file ccl_correlation.c.
References CCL_CORR_GG, CCL_CORR_GL, CCL_CORR_LM, CCL_CORR_LP, ccl_cosmology_set_status_message(), CCL_ERROR_LINSPACE, CCL_ERROR_MEMORY, ccl_log_spacing(), ccl_spline_eval(), ccl_spline_free(), ccl_spline_init(), ccl_splines, ccl_spline_params::ELL_MAX_CORR, ccl_spline_params::ELL_MIN_CORR, fftlog_ComputeXi2D(), M_PI, ccl_spline_params::N_ELL_CORR, pow(), and taper_cl().
Referenced by ccl_correlation().
|
static |
Definition at line 295 of file ccl_correlation.c.
References ccl_compute_legendre_polynomial(), CCL_CORR_LM, CCL_CORR_LP, ccl_cosmology_set_status_message(), CCL_ERROR_MEMORY, CCL_ERROR_NOT_IMPLEMENTED, ccl_spline_eval(), ccl_spline_free(), ccl_spline_init(), ccl_splines, ccl_spline_params::ELL_MAX_CORR, cl_cmbl_bm::l, M_PI, pow(), and taper_cl().
Referenced by ccl_correlation().
Definition at line 158 of file ccl_correlation.c.
References ccl_spline_eval(), corr_int_par::cl0, corr_int_par::cl_spl, corr_int_par::clf, corr_int_par::ell0, corr_int_par::ellf, corr_int_par::extrapol_0, corr_int_par::extrapol_f, corr_int_par::i_bessel, p, pow(), corr_int_par::th, corr_int_par::tilt0, corr_int_par::tiltf, and x.
Referenced by ccl_tracer_corr_bessel().
Definition at line 23 of file ccl_correlation.c.
References M_PI.
Referenced by ccl_correlation_3d(), ccl_tracer_corr_fftlog(), and ccl_tracer_corr_legendre().