Commit 552a9c16 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Only record that a top-level multipole has interacted via long range if it...

Only record that a top-level multipole has interacted via long range if it actually found any neighbour within range.
parent dee1b5a4
......@@ -1529,7 +1529,6 @@ static INLINE void runner_do_grav_long_range(struct runner *r, struct cell *ci,
/* Flag that contributions will be recieved */
struct gravity_tensors *const multi_i = ci->multipole;
multi_i->pot.interacted = 1;
/* Recover the top-level multipole (for distance checks) */
struct gravity_tensors *const multi_top = top->multipole;
......@@ -1585,6 +1584,9 @@ static INLINE void runner_do_grav_long_range(struct runner *r, struct cell *ci,
runner_dopair_grav_mm(r, ci, cj);
// runner_dopair_recursive_grav_pm(r, ci, cj);
/* Record that this multipole received a contribution */
multi_i->pot.interacted = 1;
} /* We are in charge of this pair */
} /* Loop over top-level cells */
......
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