15 int i_model_vec[6]={1,3,5,6,8,10};
25 sigma8=malloc(6*
sizeof(
double));
26 Omega_c=malloc(6*
sizeof(
double));
27 Omega_b=malloc(6*
sizeof(
double));
28 n_s=malloc(6*
sizeof(
double));
29 h=malloc(6*
sizeof(
double));
30 w_0=malloc(6*
sizeof(
double));
31 w_a=malloc(6*
sizeof(
double));
33 sprintf(fname,
"./tests/benchmark/emu_cosmologies.txt");
36 fprintf(stderr,
"Error opening file %s\n",fname);
40 for(
int i=0;i<6;i++) {
42 status=fscanf(f,
"%le %le %le %le %le %le %le\n",&Omega_c[i],&Omega_b[i],&h[i],&sigma8[i],&n_s[i],&w_0[i],&w_a[i]);
44 fprintf(stderr,
"Error reading file %s, line %d\n",fname,i);
54 ccl_parameters params =
ccl_parameters_create(Omega_c[i_model-1],Omega_b[i_model-1],0.0,
NREL,
NMAS,
MNU,w_0[i_model-1],w_a[i_model-1],h[i_model-1],sigma8[i_model-1],n_s[i_model-1],-1,NULL,NULL, &status);
57 sprintf(fname,
"./tests/benchmark/CLASS_Pk_M%d.txt",i_model_vec[i_model-1]);
59 printf(
"Wrote %s, status = %d\n", fname,status);
64 for (
int i = 1; i < 7; i++){
ccl_cosmology * ccl_cosmology_create(ccl_parameters params, ccl_configuration config)
CCL_BEGIN_DECLS void ccl_cosmology_write_power_class_z(char *filename, ccl_cosmology *cosmo, double z, int *status)
void ccl_cosmology_free(ccl_cosmology *cosmo)
const ccl_configuration default_config
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)
void write_Pk_CLASS(int i_model)