diff --git a/src/const.h b/src/const.h index 628353275515eb8467f3e5a005e02a34a3c5aac0..521d094f51e61fde1e1f983caa7194bc0242214b 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 a2bb8da6e8c5c92288541c206b453af141bf094e..b6136f1d550bcd7fc551cf3a3890250737e57aff 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 a2e443dc246121ddfb9de9b58527f6e1509ed772..57c7bc88dd7c9145ef9f440e3eb74cf6cb80d86f 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 */