|
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_spline.h>#include <gsl/gsl_integration.h>#include <gsl/gsl_const_mksa.h>#include <gsl/gsl_roots.h>#include "ccl.h"#include "ccl_params.h"
Go to the source code of this file.
Functions | |
| static double | nu_integrand (double x, void *r) |
| gsl_spline * | calculate_nu_phasespace_spline (int *status) |
| double | nu_phasespace_intg (gsl_interp_accel *accel, double mnuOT, int *status) |
| double | ccl_Omeganuh2 (double a, int N_nu_mass, double *mnu, double T_CMB, gsl_interp_accel *accel, int *status) |
| double * | ccl_nu_masses (double OmNuh2, ccl_neutrino_mass_splits mass_split, double T_CMB, int *status) |
Variables | |
| gsl_spline * | nu_spline = ((void*)0) |
| gsl_spline* calculate_nu_phasespace_spline | ( | int * | status | ) |
Spline for the phasespace integral required for getting the fractional energy density of massive neutrinos. Returns a gsl spline for the phase space integral needed for massive neutrinos.
| status | Status flag. 0 if there are no errors, nonzero otherwise. For specific cases see documentation for ccl_error.c |
Definition at line 33 of file ccl_neutrinos.c.
References A_SPLINE_TYPE, ccl_cosmology_read_config(), CCL_ERROR_MISSING_CONFIG_FILE, CCL_ERROR_NU_INT, ccl_gsl, ccl_linear_spacing(), CCL_NU_MNUT_MAX, CCL_NU_MNUT_MIN, CCL_NU_MNUT_N, ccl_raise_exception(), ccl_raise_gsl_warning(), ccl_splines, ccl_gsl_params::INTEGRATION_NU_EPSABS, ccl_gsl_params::INTEGRATION_NU_EPSREL, ccl_gsl_params::N_ITERATION, and nu_integrand().
Referenced by nu_phasespace_intg().
| double* ccl_nu_masses | ( | double | OmNuh2, |
| ccl_neutrino_mass_splits | mass_split, | ||
| double | T_CMB, | ||
| int * | status | ||
| ) |
Returns mass of one neutrino species at a scale factor a.
| a | Scale factor |
| Neff | The effective number of species with neutrino mass mnu. |
| OmNuh2 | Fractional energy density of neutrions with mass mnu, multiplied by h squared. (can be 0). |
| T_CMB | Temperature of the CMB |
| accel | - Interpolation accelerator to be used with phasespace spline. If not set yet, pass NULL. |
| status | Status flag. 0 if there are no errors, nonzero otherwise. For specific cases see documentation for ccl_error.c |
Definition at line 168 of file ccl_neutrinos.c.
References ccl_check_status_nocosmo(), CCL_ERROR_MNU_UNPHYSICAL, ccl_nu_equal, ccl_nu_inverted, ccl_nu_normal, ccl_nu_sum, DELTAM12_sq, DELTAM13_sq_neg, DELTAM13_sq_pos, ccl_test_distances::mnu, and pow().
Referenced by __attribute__().
| double ccl_Omeganuh2 | ( | double | a, |
| int | N_nu_mass, | ||
| double * | mnu, | ||
| double | T_CMB, | ||
| gsl_interp_accel * | accel, | ||
| int * | status | ||
| ) |
Returns density of one neutrino species at a scale factor a. Users are encouraged to access this quantity via the function ccl_omega_x.
| a | Scale factor |
| Neff | The effective number of species with neutrino mass mnu. |
| mnu | Pointer to array containing neutrino mass (can be 0). |
| T_CMB | Temperature of the CMB |
| accel | - Interpolation accelerator to be used with phasespace spline. If not set yet, pass NULL. |
| status | Status flag. 0 if there are no errors, nonzero otherwise. For specific cases see documentation for ccl_error.c |
Definition at line 125 of file ccl_neutrinos.c.
References EV_IN_J, KBOLTZ, NU_CONST, nu_phasespace_intg(), pow(), and TNCDM.
Referenced by ccl_cosmology_compute_power_emu(), ccl_omega_x(), ccl_parameters_fill_initial(), and h_over_h0().
Definition at line 94 of file ccl_neutrinos.c.
References calculate_nu_phasespace_spline(), ccl_check_status_nocosmo(), CCL_NU_MNUT_MAX, CCL_NU_MNUT_MIN, ccl_raise_gsl_warning(), and nu_spline.
Referenced by ccl_Omeganuh2().
| gsl_spline* nu_spline = ((void*)0) |
Definition at line 17 of file ccl_neutrinos.c.
Referenced by nu_phasespace_intg().