Skip to content
Snippets Groups Projects
Commit 0fd1bbd4 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Moved the new time-step bin constant to the timeline.h file.

parent 43b0648f
Branches
Tags
1 merge request!956Fully implement the timestep limiter (non MPI)
......@@ -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%. */
......
......@@ -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
*
......
......@@ -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 */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment