From e69f8b500608a511e1a47b88bc1275a4d268912a Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Fri, 11 May 2018 19:19:58 -0500 Subject: [PATCH 1/2] Fix list 3 far criterion when from_sep_smaller_crit == 'static_l2' --- boxtree/traversal.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/boxtree/traversal.py b/boxtree/traversal.py index 6960e45..28bb0da 100644 --- a/boxtree/traversal.py +++ b/boxtree/traversal.py @@ -794,8 +794,8 @@ void generate(LIST_ARG_DECL USER_ARG_DECL box_id_t target_box_number) coord_t l_2_box_dist = sqrt(l_2_squared_center_dist) - sqrt((coord_t) (${dimensions})) - * tgt_stickout_l_inf_rad - - source_l_inf_rad; + * (tgt_stickout_l_inf_rad + + source_l_inf_rad); meets_sep_crit = l_2_box_dist >= (2 - 8 * COORD_T_MACH_EPS) * source_l_inf_rad; -- GitLab From 1d0220e2acc8235205e6bd616a04c234186bcabb Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Fri, 11 May 2018 19:20:20 -0500 Subject: [PATCH 2/2] Improve comment for list 4 separation criterion --- boxtree/traversal.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/boxtree/traversal.py b/boxtree/traversal.py index 28bb0da..9051067 100644 --- a/boxtree/traversal.py +++ b/boxtree/traversal.py @@ -921,6 +921,24 @@ inline bool meets_sep_bigger_criterion( coord_vec_t source_center, int source_level, coord_t stick_out_factor) { + <% + assert not sources_have_extent + %> + + // What we are interested in ensuring is that + + // (*) + // d_2(src_box, tgt_center) + // >= 3 * (radius of tgt box potentially + // including stick-out) + + // (because convergence factors are in l^2, + // irrespective of how we measure) + + // Since d_2(a, b) >= d_inf(a, b), ensuring that + // (*) holds with d_inf implies that it also holds + // with d_2. + 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 = ( -- GitLab