]> https://gitweb.dealii.org/ - dealii.git/commitdiff
RemotePointEvaluation: make RTree-level parameter 12353/head
authorPeter Munch <peterrmuench@gmail.com>
Sat, 29 May 2021 21:12:51 +0000 (23:12 +0200)
committerPeter Munch <peterrmuench@gmail.com>
Sat, 29 May 2021 21:12:51 +0000 (23:12 +0200)
include/deal.II/base/mpi_remote_point_evaluation.h
source/base/mpi_remote_point_evaluation.cc

index ff2a74ecb062fb78a98d613a4c32a4a96ae5e3de..96da515be3b638caf86b7fe6b92c4eae1fce04d8 100644 (file)
@@ -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.
        */
index f7ceca3aefa006d3bb4223b9cbc0a3d93719026e..d6258e1e765c10cef6022e6f198c89c06f335c77 100644 (file)
@@ -37,10 +37,12 @@ namespace Utilities
   {
     template <int dim, int spacedim>
     RemotePointEvaluation<dim, spacedim>::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 =

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.