Fixed bug that meant only half test data was being read in
@@ -25,13 +25,13 @@ CTEST_DATA(halomod){
double n_s[3];
// Arrays for power-spectrum data
- double k[3][2][128];
- double Delta2[3][2][128];
+ double k[3][2][256];
+ double Delta2[3][2][256];
};
// Function to read in the benchmark data
-static void read_halomod_test_file(double k[3][2][128], double Delta2[3][2][128]){
+static void read_halomod_test_file(double k[3][2][256], double Delta2[3][2][256]){
// Variables for reading in unwanted stuff and file name
double spam;
@@ -56,7 +56,7 @@ static void read_halomod_test_file(double k[3][2][128], double Delta2[3][2][128]
ASSERT_NOT_NULL(f);
// Loop over wavenumbers, which are k/h in benchmark data, power is Delta^2(k)
- for (int j=0; j<128; j++) {
+ for (int j=0; j<256; j++) {
// Read in data from the benchmark file
int count = fscanf(f, "%le\t %le\t %le\t %le\t %le\n", &k[model][i][j], &spam, &spam, &spam, &Delta2[model][i][j]);
@@ -143,7 +143,7 @@ static void compare_halomod(int model, struct halomod_data * data)
if(i==1){a = 0.5;}
// Loop over wavenumbers
- for (int j=0; j<128; j++) {
+ for (int j=0; j<256; j++) {
// Set variables inside loop, convert CCL outputs to the same units as benchmark
double k = data->k[model][i][j]*params.h; // Convert the benchmark data k/h to pure k
