Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
1 merge request!267Mark tasks in drift2
...@@ -2359,6 +2359,10 @@ void engine_collect_kick(struct cell *c) { ...@@ -2359,6 +2359,10 @@ void engine_collect_kick(struct cell *c) {
ti_end_min = min(ti_end_min, cp->ti_end_min); ti_end_min = min(ti_end_min, cp->ti_end_min);
updated += cp->updated; updated += cp->updated;
g_updated += cp->g_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) { ...@@ -2394,6 +2398,10 @@ void engine_collect_timestep(struct engine *e) {
ti_end_min = min(ti_end_min, c->ti_end_min); ti_end_min = min(ti_end_min, c->ti_end_min);
updates += c->updated; updates += c->updated;
g_updates += c->g_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. */ /* Aggregate the data from the different nodes. */
......
...@@ -756,10 +756,6 @@ static void runner_do_drift(struct cell *c, struct engine *e, int drift) { ...@@ -756,10 +756,6 @@ static void runner_do_drift(struct cell *c, struct engine *e, int drift) {
const int ti_current = e->ti_current; const int ti_current = e->ti_current;
/* Clear the active particle counters. */
c->updated = 0;
c->g_updated = 0;
/* Unskip any active tasks. */ /* Unskip any active tasks. */
if (c->ti_end_min == e->ti_current) { if (c->ti_end_min == e->ti_current) {
const int forcerebuild = cell_unskip_tasks(c); const int forcerebuild = cell_unskip_tasks(c);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment