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

Increase the limit for PP instead of M2L or M2P to a VEC_SIZE

parent 00472623
......@@ -6393,8 +6393,8 @@ int cell_can_use_pair_mm(const struct cell *ci, const struct cell *cj,
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;
if (ci->grav.count < VEC_SIZE) return 0;
if (cj->grav.count < VEC_SIZE) return 0;
/* Recover the multipole information */
const struct gravity_tensors *const multi_i = ci->grav.multipole;
......
......@@ -1011,8 +1011,8 @@ void runner_dopair_grav_pp(struct runner *r, struct cell *ci, struct cell *cj,
gcount_j);
#endif
const int allow_multipole_i = allow_mpole && ci->grav.count > 1;
const int allow_multipole_j = allow_mpole && cj->grav.count > 1;
const int allow_multipole_i = allow_mpole && ci->grav.count > VEC_SIZE;
const int allow_multipole_j = allow_mpole && cj->grav.count > VEC_SIZE;
/* Fill the caches */
gravity_cache_populate(e->max_active_bin, allow_multipole_j, periodic, dim,
......@@ -1960,7 +1960,7 @@ void runner_dopair_recursive_grav(struct runner *r, struct cell *ci,
/* OK, we actually need to compute this pair. Let's find the cheapest
* option... */
if (ci->grav.count < 2 || cj->grav.count < 2) {
if (ci->grav.count < VEC_SIZE || cj->grav.count < VEC_SIZE) {
/* We have two cheap cells. Go P-P. */
runner_dopair_grav_pp_no_cache(r, ci, cj, /*symmetric=*/1);
......
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