Commit 6e30d519 authored by Peter W. Draper's avatar Peter W. Draper
Browse files

Fix the updated particles count

Strange but drift doesn't seem to visit all cells to reset this count
parent 28ef2bad
......@@ -2359,6 +2359,10 @@ void engine_collect_kick(struct cell *c) {
ti_end_min = min(ti_end_min, cp->ti_end_min);
updated += cp->updated;
g_updated += cp->g_updated;
/* Collected, so clear for next time. */
cp->updated = 0;
cp->g_updated = 0;
}
}
}
......@@ -2394,6 +2398,10 @@ void engine_collect_timestep(struct engine *e) {
ti_end_min = min(ti_end_min, c->ti_end_min);
updates += c->updated;
g_updates += c->g_updated;
/* Collected, so clear for next time. */
c->updated = 0;
c->g_updated = 0;
}
/* Aggregate the data from the different nodes. */
......
......@@ -756,10 +756,6 @@ static void runner_do_drift(struct cell *c, struct engine *e, int drift) {
const int ti_current = e->ti_current;
/* Clear the active particle counters. */
c->updated = 0;
c->g_updated = 0;
/* Unskip any active tasks. */
if (c->ti_end_min == e->ti_current) {
const int forcerebuild = cell_unskip_tasks(c);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment