Now using K_MIN/K_MAX from ccl_splines
#include "ccl.h"
#include <stdio.h>
+#include "ccl_params.h"
int main(int argc, char * argv[])
{
@@ -24,7 +25,6 @@ int main(int argc, char * argv[])
ccl_parameters params = ccl_parameters_create_lcdm_nu(Omega_c, Omega_b, Omega_k,h, A_s, n_s, Neff, Nmass, mnu, &status);
ccl_cosmology * cosmo = ccl_cosmology_create(params, config);
-
// Open file to read k values from CLASS at which to compute things
input = fopen("./only_CCL_passed_params_3massless_pk_nl.dat", "r");
@@ -37,7 +37,7 @@ int main(int argc, char * argv[])
// Open file to output results
output = fopen("./neutrinos_3massless_nl_pk_test.out", "w");
while((fscanf(input, "%le %le\n", &k, &no)!=EOF)){
- if ((k<K_MIN) || (k>K_MAX)) continue;
+ if ((k<ccl_splines->K_MIN_DEFAULT) || (k>ccl_splines->K_MAX)) continue;
// Note CLASS k's are in h/Mpc but CCL takes k's in 1/Mpc, so we convert.
double p = ccl_nonlin_matter_power(cosmo, k * h , 1.0, &status);
// CCL outputs P(k) in Mpc^3, but we want to compare to class, which outputs in (Mpc/h)^3, so convert. Output is in k-> h / Mpc, P(k)-> (Mpc/h)^3.
