From df19d7b9567654519a120bb16cb818465634fd8c Mon Sep 17 00:00:00 2001 From: "Peter W. Draper" <p.w.draper@durham.ac.uk> Date: Wed, 3 Aug 2016 10:04:12 +0100 Subject: [PATCH] Skip drift of non-local cells Same behaviour as old task based drift --- src/runner.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/runner.c b/src/runner.c index e6cc88ae52..5f451a4695 100644 --- a/src/runner.c +++ b/src/runner.c @@ -597,6 +597,9 @@ void runner_do_drift_mapper(void *map_data, int num_elements, struct cell *c = &cells[ind]; if (c == NULL) continue; + /* Only drift local particles. */ + if (c->nodeID != e->nodeID) continue; + struct part *const parts = c->parts; struct xpart *const xparts = c->xparts; struct gpart *const gparts = c->gparts; @@ -613,10 +616,12 @@ void runner_do_drift_mapper(void *map_data, int num_elements, /* No children? */ if (!c->split) { + /* Loop over all the g-particles in the cell */ const int nr_gparts = c->gcount; for (size_t k = 0; k < nr_gparts; k++) { + /* Get a handle on the gpart. */ struct gpart *const gp = &gparts[k]; -- GitLab