From f25a7cd352bf21812b0b7354a54de1d43633ce79 Mon Sep 17 00:00:00 2001
From: Matthieu Schaller <schaller@strw.leidenuniv.nl>
Date: Fri, 13 Dec 2019 13:44:53 +0100
Subject: [PATCH] Correctly initialise everything in the non-cosmological case.
 Also extend the range that is probed in testCosmology.c

---
 src/cosmology.c       | 2 ++
 tests/testCosmology.c | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/cosmology.c b/src/cosmology.c
index f7ed1ae01d..0a24dae580 100644
--- a/src/cosmology.c
+++ b/src/cosmology.c
@@ -568,6 +568,8 @@ void cosmology_init_no_cosmo(struct cosmology *c) {
 
   c->a_begin = 1.;
   c->a_end = 1.;
+  c->log_a_begin = 0.;
+  c->log_a_end = 0.;
   c->log_a_table_begin = 0.;
   c->log_a_table_end = 0.;
 
diff --git a/tests/testCosmology.c b/tests/testCosmology.c
index a574773cf1..020e59cc50 100644
--- a/tests/testCosmology.c
+++ b/tests/testCosmology.c
@@ -72,7 +72,7 @@ int main(int argc, char *argv[]) {
   message("Start checking computation...");
 
   for (int i = 0; i < N_CHECK; i++) {
-    double a = 0.1 + 0.9 * i / (N_CHECK - 1.);
+    double a = 0.01 + 0.99 * i / (N_CHECK - 1.);
 
     /* Compute a(t(a)) and check if same results */
     double time = cosmology_get_time_since_big_bang(&cosmo, a);
-- 
GitLab