7 #define DISTANCES_HIZ_TOLERANCE 5.0e-7 32 FILE * f = fopen(
"./tests/benchmark/chi_hiz_model1-3.txt",
"r");
40 for (
int i=0; i<7; i++) {
41 int count = fscanf(f,
"%le %le %le %le \n", &z[i],
42 &chi[0][i], &chi[1][i], &chi[2][i]);
64 double Omega_v[3] = { 0.7, 0.7, 0.7};
65 double w_0[3] = { -1.0, -0.9, -0.9};
66 double w_a[3] = { 0.0, 0.0, 0.1};
69 for (
int i=0; i<3; i++) {
70 data->Omega_v[i] = Omega_v[i];
71 data->w_0[i] = w_0[i];
72 data->w_a[i] = w_a[i];
73 data->Omega_k[i] = 1.0 - data->Omega_c - data->Omega_b - data->Omega_v[i];
87 data->
w_0[model], data->
w_a[model],
88 data->
h, data->
A_s, data->
n_s,-1,-1,-1,-1,NULL,NULL, &status);
98 for (
int j=0; j<7; j++) {
99 double a = 1/(1.+data->
z[j]);
103 if (fabs(absolute_tolerance)<1e-12) absolute_tolerance = 1e-12;
110 CTEST2(distances_cosmomad_hiz, model_1) {
115 CTEST2(distances_cosmomad_hiz, model_2) {
120 CTEST2(distances_cosmomad_hiz, model_3) {
size_t count(InputIterator first, InputIterator last, T const &item)
#define CTEST_SETUP(sname)
#define CTEST_DATA(sname)
static void compare_distances_hiz(int model, struct distances_cosmomad_hiz_data *data)
ccl_cosmology * ccl_cosmology_create(ccl_parameters params, ccl_configuration config)
void ccl_cosmology_free(ccl_cosmology *cosmo)
#define ASSERT_DBL_NEAR_TOL(exp, real, tol)
#define DISTANCES_HIZ_TOLERANCE
const ccl_configuration default_config
#define ASSERT_EQUAL(exp, real)
#define ASSERT_NOT_NULL(real)
ccl_parameters ccl_parameters_create(double Omega_c, double Omega_b, double Omega_k, double Neff, double *mnu, ccl_mnu_convention mnu_type, double w0, double wa, double h, double norm_pk, double n_s, double bcm_log10Mc, double bcm_etab, double bcm_ks, int nz_mgrowth, double *zarr_mgrowth, double *dfarr_mgrowth, int *status)
double ccl_comoving_radial_distance(ccl_cosmology *cosmo, double a, int *status)
static void read_chi_test_file(double z[7], double chi[3][7])
#define CTEST2(sname, tname)
ccl_mnu_convention mnu_type