|
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 <stdarg.h>#include <math.h>#include <gsl/gsl_errno.h>#include "ccl.h"
Go to the source code of this file.
Functions | |
| void | ccl_set_error_policy (CCLErrorPolicy error_policy) |
| void | ccl_set_debug_policy (CCLDebugModePolicy debug_policy) |
| void | ccl_raise_exception (int err, const char *msg,...) |
| void | ccl_raise_warning (int err, const char *msg,...) |
| void | ccl_raise_gsl_warning (int gslstatus, const char *msg,...) |
| void | ccl_check_status (ccl_cosmology *cosmo, int *status) |
| void | ccl_check_status_nocosmo (int *status) |
Variables | |
| static CCLErrorPolicy | _ccl_error_policy = CCL_ERROR_POLICY_EXIT |
| static CCLDebugModePolicy | _ccl_debug_mode_policy = CCL_DEBUG_MODE_WARNING |
| void ccl_check_status | ( | ccl_cosmology * | cosmo, |
| int * | status | ||
| ) |
Check the error status Given a status, check if any errors have occurred, based on the CCL_ERRORs defined so far.
Definition at line 88 of file ccl_error.c.
References CCL_ERROR_COMPUTECHI, CCL_ERROR_HMF_INTERP, CCL_ERROR_LINSPACE, CCL_ERROR_NU_INT, CCL_ERROR_NU_SOLVE, CCL_ERROR_SPLINE, ccl_raise_exception(), and ccl_cosmology::status_message.
Referenced by ccl_angular_cl_native(), ccl_angular_cls(), ccl_cl_tracer(), ccl_comoving_angular_distance(), ccl_comoving_radial_distance(), ccl_correlation(), ccl_correlation_3d(), ccl_cosmology_compute_power(), ccl_distance_modulus(), ccl_dlninvsig_dlogm(), ccl_growth_factor(), ccl_growth_factor_unnorm(), ccl_growth_rate(), ccl_h_over_h0(), ccl_halo_bias(), ccl_omega_x(), ccl_scale_factor_of_chi(), ccl_sigmaM(), h_over_h0(), and massfunc_f().
| void ccl_check_status_nocosmo | ( | int * | status | ) |
Check the error status - no cosmology Given a status, check if any errors have occurred, based on the CCL_ERRORs defined so far.
Definition at line 116 of file ccl_error.c.
References CCL_ERROR_COMPUTECHI, CCL_ERROR_HMF_INTERP, CCL_ERROR_LINSPACE, CCL_ERROR_MNU_UNPHYSICAL, CCL_ERROR_NOT_IMPLEMENTED, CCL_ERROR_NU_INT, CCL_ERROR_NU_SOLVE, CCL_ERROR_SPLINE, and ccl_raise_exception().
Referenced by ccl_nu_masses(), ccl_parameters_create(), ccl_parameters_fill_initial(), and nu_phasespace_intg().
| void ccl_raise_exception | ( | int | err, |
| const char * | msg, | ||
| ... | |||
| ) |
Raise an exception Given a status, give an error message.
Definition at line 35 of file ccl_error.c.
References _ccl_debug_mode_policy, _ccl_error_policy, CCL_DEBUG_MODE_ON, and CCL_ERROR_POLICY_EXIT.
Referenced by calculate_nu_phasespace_spline(), ccl_check_status(), ccl_check_status_nocosmo(), ccl_cosmology_read_config(), ccl_dNdz_tomog(), ccl_halo_concentration(), ccl_norm_integrand(), ccl_parameters_read_yaml(), ccl_pkemu(), and window_function().
| void ccl_raise_gsl_warning | ( | int | gslstatus, |
| const char * | msg, | ||
| ... | |||
| ) |
Raise a warning based on a GSL error message Given a GSL status, give a warning message.
Definition at line 75 of file ccl_error.c.
References ccl_raise_warning().
Referenced by a_of_chi(), calculate_nu_phasespace_spline(), ccl_angular_cl_native(), ccl_comoving_angular_distance(), ccl_comoving_radial_distance(), ccl_cosmology_compute_growth(), ccl_cosmology_compute_sigma(), ccl_dlninvsig_dlogm(), ccl_dNdz_tomog(), ccl_growth_factor(), ccl_growth_rate(), ccl_h_over_h0(), ccl_linear_matter_power(), ccl_nonlin_matter_power(), ccl_norm_integrand(), ccl_power_extrapol_highk(), ccl_power_extrapol_lowk(), ccl_scale_factor_of_chi(), ccl_sigmaM(), ccl_sigmaR(), ccl_sigmaV(), ccl_spline_eval(), ccl_tracer_corr_bessel(), clt_init_nz(), compute_chi(), growth_factor_and_growth_rate(), massfunc_f(), nu_phasespace_intg(), one_halo_integral(), two_halo_integral(), window_lensing(), and window_magnification().
| void ccl_raise_warning | ( | int | err, |
| const char * | msg, | ||
| ... | |||
| ) |
Raise a warning Given a status, give a warning message.
Definition at line 56 of file ccl_error.c.
References _ccl_debug_mode_policy, CCL_DEBUG_MODE_ON, and CCL_DEBUG_MODE_WARNING.
Referenced by ccl_linear_spacing(), ccl_linlog_spacing(), ccl_log_spacing(), ccl_nonlin_matter_power(), and ccl_raise_gsl_warning().
| void ccl_set_debug_policy | ( | CCLDebugModePolicy | debug_policy | ) |
Set the error policy debug_policy the debug mode policy
Definition at line 29 of file ccl_error.c.
References _ccl_debug_mode_policy.
Referenced by compare_cls(), compare_corr(), and Cosmo_Param::init().
| void ccl_set_error_policy | ( | CCLErrorPolicy | error_policy | ) |
Set the error policy error_policy the error policy
Definition at line 23 of file ccl_error.c.
References _ccl_error_policy.
Referenced by Cosmo_Param::init().
|
static |
Definition at line 20 of file ccl_error.c.
Referenced by ccl_raise_exception(), ccl_raise_warning(), and ccl_set_debug_policy().
|
static |
Definition at line 12 of file ccl_error.c.
Referenced by ccl_raise_exception(), and ccl_set_error_policy().