From 0fd1bbd49d60009c3fbb52e2a98c38565bcbd63c Mon Sep 17 00:00:00 2001
From: Matthieu Schaller <schaller@strw.leidenuniv.nl>
Date: Tue, 22 Oct 2019 14:02:12 +0200
Subject: [PATCH] Moved the new time-step bin constant to the timeline.h file.

---
 src/const.h    | 3 ---
 src/timeline.h | 4 ++++
 src/timestep.h | 4 ++--
 3 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/src/const.h b/src/const.h
index 6283532755..521d094f51 100644
--- a/src/const.h
+++ b/src/const.h
@@ -26,9 +26,6 @@
 /* Time-step limiter maximal difference in signal velocity */
 #define const_limiter_max_v_sig_ratio 4.1f
 
-/* Maximal difference in time-bins between neighbouring particles */
-#define const_timestep_limiter_max_delta_bin 2
-
 /* I/O Constant; this determines the relative tolerance between the value of
  * redshift read from the snapshot, and the value from the parameter file. This
  * current value asserts that they must match within 0.1%. */
diff --git a/src/timeline.h b/src/timeline.h
index a2bb8da6e8..b6136f1d55 100644
--- a/src/timeline.h
+++ b/src/timeline.h
@@ -50,6 +50,10 @@ typedef int8_t timebin_t;
 /*! Fictitious time-bin for particles woken up */
 #define time_bin_awake (-1)
 
+/* Maximal difference in time-bins between neighbouring particles */
+#define time_bin_neighbour_max_delta_bin 2
+
+
 /**
  * @brief Returns the integer time interval corresponding to a time bin
  *
diff --git a/src/timestep.h b/src/timestep.h
index a2e443dc24..57c7bc88dd 100644
--- a/src/timestep.h
+++ b/src/timestep.h
@@ -31,7 +31,7 @@
  * @brief Compute a valid integer time-step form a given time-step
  *
  * We consider the minimal time-bin of any neighbours and prevent particles
- * to differ from it by a fixed constant `const_timestep_limiter_max_delta_bin`.
+ * to differ from it by a fixed constant `time_bin_neighbour_max_delta_bin`.
  *
  * If min_ngb_bin is set to `num_time_bins`, then no limit from the neighbours
  * is imposed.
@@ -53,7 +53,7 @@ make_integer_timestep(const float new_dt, const timebin_t old_bin,
 
   /* Are we allowed to use this bin given the neighbours? */
   timebin_t new_bin = get_time_bin(new_dti);
-  new_bin = min(new_bin, min_ngb_bin + const_timestep_limiter_max_delta_bin);
+  new_bin = min(new_bin, min_ngb_bin + time_bin_neighbour_max_delta_bin);
   new_dti = get_integer_timestep(new_bin);
 
   /* Current time-step */
-- 
GitLab