9 #define HALOMOD_TOLERANCE 1E-3 42 for (
int model=0; model<3; model++){
45 for (
int i=0; i<2; i++){
48 if(model==0 && i==0){strncpy(infile,
"./tests/benchmark/pk_hm_c1_z0.txt", 256);}
49 if(model==0 && i==1){strncpy(infile,
"./tests/benchmark/pk_hm_c1_z1.txt", 256);}
50 if(model==1 && i==0){strncpy(infile,
"./tests/benchmark/pk_hm_c2_z0.txt", 256);}
51 if(model==1 && i==1){strncpy(infile,
"./tests/benchmark/pk_hm_c2_z1.txt", 256);}
52 if(model==2 && i==0){strncpy(infile,
"./tests/benchmark/pk_hm_c3_z0.txt", 256);}
53 if(model==2 && i==1){strncpy(infile,
"./tests/benchmark/pk_hm_c3_z1.txt", 256);}
56 FILE * f = fopen(infile,
"r");
60 for (
int j=0; j<
NUMK; j++) {
63 int count = fscanf(f,
"%le\t %le\t %le\t %le\t %le\n", &k[model][i][j], &spam, &spam, &spam, &Pk[model][i][j]);
92 double Omega_c[3] = { 0.2500, 0.2265, 0.2685 };
93 double Omega_b[3] = { 0.0500, 0.0455, 0.0490 };
94 double h[3] = { 0.7000, 0.7040, 0.6711 };
95 double sigma_8[3] = { 0.8000, 0.8100, 0.8340 };
96 double n_s[3] = { 0.9600, 0.9670, 0.9624 };
99 for (
int model=0; model<3; model++){
100 data->Omega_c[model] = Omega_c[model];
101 data->Omega_b[model] = Omega_b[model];
102 data->h[model] = h[model];
103 data->sigma_8[model] = sigma_8[model];
104 data->n_s[model] = n_s[model];
124 -1, -1, -1, -1, NULL, NULL, status);
139 for (
int i=0; i<2; i++) {
148 for (
int j=0; j<
NUMK; j++) {
151 double k = data->
k[model][i][j]*params.
h;
152 double Pk = data->
Pk[model][i][j]/
pow(params.
h,3);
double ccl_halomodel_matter_power(ccl_cosmology *cosmo, double k, double a, int *status)
halo_concentration_t halo_concentration_method
ccl_mnu_convention mnu_type
size_t count(InputIterator first, InputIterator last, T const &item)
#define CTEST_SETUP(sname)
#define CTEST_DATA(sname)
static void read_halomod_test_file(double k[3][2][256], double Pk[3][2][256])
static void compare_halomod(int model, struct halomod_data *data)
#define HALOMOD_TOLERANCE
transfer_function_t transfer_function_method
ccl_cosmology * ccl_cosmology_create(ccl_parameters params, ccl_configuration config)
#define ASSERT_DBL_NEAR_TOL(exp, real, tol)
mass_function_t mass_function_method
const ccl_configuration default_config
float pow(float base, unsigned long int exp)
#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)
#define CTEST2(sname, tname)