From 0a0e8b5972b1cf43634151b3ef9002b4bb0b7b72 Mon Sep 17 00:00:00 2001 From: Peter Munch Date: Sat, 29 May 2021 23:12:51 +0200 Subject: [PATCH] RemotePointEvaluation: make RTree-level parameter --- include/deal.II/base/mpi_remote_point_evaluation.h | 11 +++++++++-- source/base/mpi_remote_point_evaluation.cc | 9 ++++++--- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/include/deal.II/base/mpi_remote_point_evaluation.h b/include/deal.II/base/mpi_remote_point_evaluation.h index ff2a74ecb0..96da515be3 100644 --- a/include/deal.II/base/mpi_remote_point_evaluation.h +++ b/include/deal.II/base/mpi_remote_point_evaluation.h @@ -55,9 +55,11 @@ namespace Utilities * lie exactly on a vertex, edge, or face. * @param enforce_unique_mapping Enforce unique mapping, i.e., * (one-to-one) relation of points and cells. + * @param rtree_level RTree level to be used during the construction of the bounding boxes. */ - RemotePointEvaluation(const double tolerance = 1e-6, - const bool enforce_unique_mapping = false); + RemotePointEvaluation(const double tolerance = 1e-6, + const bool enforce_unique_mapping = false, + const unsigned int rtree_level = 0); /** * Destructor. @@ -186,6 +188,11 @@ namespace Utilities */ const bool enforce_unique_mapping; + /** + * RTree level to be used during the construction of the bounding boxes. + */ + const unsigned int rtree_level; + /** * Storage for the status of the triangulation signal. */ diff --git a/source/base/mpi_remote_point_evaluation.cc b/source/base/mpi_remote_point_evaluation.cc index f7ceca3aef..d6258e1e76 100644 --- a/source/base/mpi_remote_point_evaluation.cc +++ b/source/base/mpi_remote_point_evaluation.cc @@ -37,10 +37,12 @@ namespace Utilities { template RemotePointEvaluation::RemotePointEvaluation( - const double tolerance, - const bool enforce_unique_mapping) + const double tolerance, + const bool enforce_unique_mapping, + const unsigned int rtree_level) : tolerance(tolerance) , enforce_unique_mapping(enforce_unique_mapping) + , rtree_level(rtree_level) , ready_flag(false) {} @@ -86,7 +88,8 @@ namespace Utilities const auto local_tree = pack_rtree(local_boxes); // compress r-tree to a minimal set of bounding boxes - const auto local_reduced_box = extract_rtree_level(local_tree, 0); + const auto local_reduced_box = + extract_rtree_level(local_tree, rtree_level); // gather bounding boxes of other processes const auto global_bboxes = -- 2.39.5