From 436eb36615f21a8c73b02eccf04f1a01604ba2bd Mon Sep 17 00:00:00 2001 From: James Willis <james.s.willis@durham.ac.uk> Date: Thu, 7 Dec 2017 09:25:09 +0000 Subject: [PATCH] Fix for serial dopair2 in the rare case when the particle separation equals the smoothing length. --- src/runner_doiact.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/runner_doiact.h b/src/runner_doiact.h index 4452cf0801..37ad1312ec 100644 --- a/src/runner_doiact.h +++ b/src/runner_doiact.h @@ -1370,7 +1370,7 @@ void DOPAIR2(struct runner *r, struct cell *ci, struct cell *cj, const int sid, /* Hit or miss? (note that we must avoid the r2 < hig2 cases we already processed) */ - if (r2 < hjg2 && r2 > hig2) { + if (r2 < hjg2 && r2 >= hig2) { IACT_NONSYM(r2, dx, hi, hj, pi, pj); } } /* loop over the active parts in ci. */ @@ -1432,7 +1432,7 @@ void DOPAIR2(struct runner *r, struct cell *ci, struct cell *cj, const int sid, /* Hit or miss? (note that we must avoid the r2 < hig2 cases we already processed) */ - if (r2 < hjg2 && r2 > hig2) { + if (r2 < hjg2 && r2 >= hig2) { /* Does pi need to be updated too? */ if (part_is_active(pi, e)) -- GitLab