From 846e08b45e36bf1317a38e5ec0ff8b653d5a3202 Mon Sep 17 00:00:00 2001 From: Pedro Gonnet <gonnet@google.com> Date: Mon, 26 Jun 2017 21:37:16 +0200 Subject: [PATCH] clear the do_drift and do_sub_drift flags after drifting. --- src/cell.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/cell.c b/src/cell.c index 6d85877e13..f767f28f4d 100644 --- a/src/cell.c +++ b/src/cell.c @@ -1910,6 +1910,10 @@ void cell_drift_part(struct cell *c, const struct engine *e, int force) { /* Update the time of the last drift */ c->ti_old_part = ti_current; + /* Clear the drift flags. */ + c->do_drift = 0; + c->do_sub_drift = 0; + } else if (force && ti_current > ti_old_part) { /* Loop over all the gas particles in the cell */ @@ -1956,6 +1960,10 @@ void cell_drift_part(struct cell *c, const struct engine *e, int force) { /* Update the time of the last drift */ c->ti_old_part = ti_current; + + /* Clear the drift flags. */ + c->do_drift = 0; + c->do_sub_drift = 0; } } -- GitLab