Commit c5b077bf authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Do not allow for M2L interactions if either of the cells have single particles

parent 536a4676
......@@ -6392,6 +6392,10 @@ int cell_can_use_pair_mm(const struct cell *ci, const struct cell *cj,
const int periodic = s->periodic;
const double dim[3] = {s->dim[0], s->dim[1], s->dim[2]};
/* Check for trivial cases */
if (ci->grav.count < 2) return 0;
if (cj->grav.count < 2) return 0;
/* Recover the multipole information */
const struct gravity_tensors *const multi_i = ci->grav.multipole;
const struct gravity_tensors *const multi_j = cj->grav.multipole;
......
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