Skip to content
Snippets Groups Projects
Commit df19d7b9 authored by Peter W. Draper's avatar Peter W. Draper
Browse files

Skip drift of non-local cells

Same behaviour as old task based drift
parent fd6ed141
No related branches found
No related tags found
1 merge request!176Tasks cleanup
...@@ -597,6 +597,9 @@ void runner_do_drift_mapper(void *map_data, int num_elements, ...@@ -597,6 +597,9 @@ void runner_do_drift_mapper(void *map_data, int num_elements,
struct cell *c = &cells[ind]; struct cell *c = &cells[ind];
if (c == NULL) continue; if (c == NULL) continue;
/* Only drift local particles. */
if (c->nodeID != e->nodeID) continue;
struct part *const parts = c->parts; struct part *const parts = c->parts;
struct xpart *const xparts = c->xparts; struct xpart *const xparts = c->xparts;
struct gpart *const gparts = c->gparts; struct gpart *const gparts = c->gparts;
...@@ -613,10 +616,12 @@ void runner_do_drift_mapper(void *map_data, int num_elements, ...@@ -613,10 +616,12 @@ void runner_do_drift_mapper(void *map_data, int num_elements,
/* No children? */ /* No children? */
if (!c->split) { if (!c->split) {
/* Loop over all the g-particles in the cell */ /* Loop over all the g-particles in the cell */
const int nr_gparts = c->gcount; const int nr_gparts = c->gcount;
for (size_t k = 0; k < nr_gparts; k++) { for (size_t k = 0; k < nr_gparts; k++) {
/* Get a handle on the gpart. */ /* Get a handle on the gpart. */
struct gpart *const gp = &gparts[k]; struct gpart *const gp = &gparts[k];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment