From 1f2daa69cbeba89123af9d034abbfc669b0efeff Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Wed, 27 Sep 2017 11:55:28 -0500 Subject: [PATCH] Fix target / source switch in list-3-close criterion (Fixes #16 on gitlab) --- boxtree/traversal.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/boxtree/traversal.py b/boxtree/traversal.py index 0bb5a31..4377f93 100644 --- a/boxtree/traversal.py +++ b/boxtree/traversal.py @@ -516,9 +516,9 @@ inline bool meets_sep_smaller_criterion( { coord_t target_rad = LEVEL_TO_RAD(target_level); coord_t source_rad = LEVEL_TO_RAD(source_level); - coord_t max_allowed_center_l_inf_dist = ( - 3 * target_rad - + (1 + stick_out_factor) * source_rad); + coord_t min_allowed_center_l_inf_dist = ( + 3 * source_rad + + (1 + stick_out_factor) * target_rad); coord_t l_inf_dist = 0; %for i in range(dimensions): @@ -527,7 +527,7 @@ inline bool meets_sep_smaller_criterion( fabs(target_center.s${i} - source_center.s${i})); %endfor - return l_inf_dist >= max_allowed_center_l_inf_dist * (1 - 8 * COORD_T_MACH_EPS); + return l_inf_dist >= min_allowed_center_l_inf_dist * (1 - 8 * COORD_T_MACH_EPS); } -- GitLab