Add array length checking assertions in ccl_background.i, to match what is done in other modules
@@ -23,42 +23,49 @@ void growth_factor_vec(ccl_cosmology * cosmo,
double* a, int na,
double* output, int nout)
{
+ assert(nout == na);
ccl_growth_factors(cosmo, na, a, output);
}
void growth_factor_unnorm_vec(ccl_cosmology * cosmo,
double* a, int na,
double* output, int nout){
+ assert(nout == na);
ccl_growth_factors_unnorm(cosmo, na, a, output);
}
void growth_rate_vec(ccl_cosmology * cosmo,
double* a, int na,
double* output, int nout) {
+ assert(nout == na);
ccl_growth_rates(cosmo, na, a, output);
}
void comoving_radial_distance_vec(ccl_cosmology * cosmo,
double* a, int na,
double* output, int nout) {
+ assert(nout == na);
ccl_comoving_radial_distances(cosmo, na, a, output);
}
void h_over_h0_vec(ccl_cosmology * cosmo,
double* a, int na,
double* output, int nout) {
+ assert(nout == na);
ccl_h_over_h0s(cosmo, na, a, output);
}
void luminosity_distance_vec(ccl_cosmology * cosmo,
double* a, int na,
double* output, int nout) {
+ assert(nout == na);
ccl_luminosity_distances(cosmo, na, a, output);
}
void scale_factor_of_chi_vec(ccl_cosmology * cosmo,
double* chi, int nchi,
double* output, int nout) {
+ assert(nout == nchi);
ccl_scale_factor_of_chis(cosmo, nchi, chi, output);
}
