From ef2152c99b850404cea540c5bb55c48adc565592 Mon Sep 17 00:00:00 2001 From: Matthieu Schaller <matthieu.schaller@durham.ac.uk> Date: Mon, 10 Sep 2018 17:58:52 +0100 Subject: [PATCH] Add a check at the end of the time-step task to verify that the next time-step is larger than 0. --- src/runner.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/runner.c b/src/runner.c index 94d36f0f9c..6156bcacb4 100644 --- a/src/runner.c +++ b/src/runner.c @@ -1689,6 +1689,13 @@ void runner_do_timestep(struct runner *r, struct cell *c, int timer) { c->ti_gravity_end_max = ti_gravity_end_max; c->ti_gravity_beg_max = ti_gravity_beg_max; +#ifdef SWIFT_DEBUG_CHECKS + if (c->ti_hydro_end_min == e->ti_current) + error("End of next hydro step is current time!"); + if (c->ti_gravity_end_min == e->ti_current) + error("End of next gravity step is current time!"); +#endif + if (timer) TIMER_TOC(timer_timestep); } -- GitLab