From: Peter Munch Date: Sat, 29 May 2021 21:12:51 +0000 (+0200) Subject: RemotePointEvaluation: make RTree-level parameter X-Git-Tag: v9.4.0-rc1~1307^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F12353%2Fhead;p=dealii.git RemotePointEvaluation: make RTree-level parameter --- 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 =