7 #define DISTANCES_TOLERANCE 5.0e-7 8 #define DM_TOLERANCE 1.0E-3 34 FILE * f = fopen(
"./tests/benchmark/chi_model1-5.txt",
"r");
42 for (
int i=0; i<6; i++) {
43 int count = fscanf(f,
"%le %le %le %le %le %le\n", &z[i],
44 &chi[0][i], &chi[1][i], &chi[2][i], &chi[3][i], &chi[4][i]);
54 FILE * f = fopen(
"./tests/benchmark/dm_model1-5.txt",
"r");
62 for (
int i=0; i<6; i++) {
63 int count = fscanf(f,
"%le %le %le %le %le %le\n", &z[i],
64 &dm[0][i], &dm[1][i], &dm[2][i], &dm[3][i], &dm[4][i]);
87 double Omega_v[5] = { 0.7, 0.7, 0.7, 0.65, 0.75 };
88 double w_0[5] = { -1.0, -0.9, -0.9, -0.9, -0.9 };
89 double w_a[5] = { 0.0, 0.0, 0.1, 0.1, 0.1 };
92 for (
int i=0; i<5; i++) {
93 data->Omega_v[i] = Omega_v[i];
94 data->w_0[i] = w_0[i];
95 data->w_a[i] = w_a[i];
96 data->Omega_k[i] = 1.0 - data->Omega_c - data->Omega_b - data->Omega_v[i];
111 data->
w_0[model], data->
w_a[model],
112 data->
h, data->
A_s, data->
n_s,-1,-1,-1,-1,NULL,NULL, &status);
122 for (
int j=0; j<6; j++) {
123 double a = 1/(1.+data->
z[j]);
127 if (fabs(absolute_tolerance)<1e-12) absolute_tolerance = 1e-12;
135 if (fabs(absolute_tolerance)<1e-4) absolute_tolerance = 1e-4;
143 CTEST2(distances_cosmomad_lowz, model_1) {
148 CTEST2(distances_cosmomad_lowz, model_2) {
153 CTEST2(distances_cosmomad_lowz, model_3) {
158 CTEST2(distances_cosmomad_lowz, model_4) {
163 CTEST2(distances_cosmomad_lowz, model_5) {
static void read_chi_test_file(double z[6], double chi[5][6])
static void compare_distances(int model, struct distances_cosmomad_lowz_data *data)
size_t count(InputIterator first, InputIterator last, T const &item)
static void read_dm_test_file(double z[6], double dm[5][6])
#define CTEST_SETUP(sname)
#define CTEST_DATA(sname)
#define DISTANCES_TOLERANCE
ccl_cosmology * ccl_cosmology_create(ccl_parameters params, ccl_configuration config)
ccl_mnu_convention mnu_type
void ccl_cosmology_free(ccl_cosmology *cosmo)
#define ASSERT_DBL_NEAR_TOL(exp, real, tol)
const ccl_configuration default_config
#define ASSERT_EQUAL(exp, real)
#define ASSERT_NOT_NULL(real)
double ccl_distance_modulus(ccl_cosmology *cosmo, double a, int *status)
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)
#define CTEST2(sname, tname)