]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix grid_tools.cc without MPI and ArborX. 18113/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Mon, 10 Feb 2025 20:10:16 +0000 (13:10 -0700)
committerWolfgang Bangerth <bangerth@colostate.edu>
Mon, 10 Feb 2025 20:10:58 +0000 (13:10 -0700)
source/grid/grid_tools.cc

index 4a8450efcc1b435a88818b789e7cc2764e108fba..eb525ccb0d41c4794210cbf67fda6eda06cfd84b 100644 (file)
 #ifdef DEAL_II_WITH_ARBORX
 #  include <deal.II/arborx/access_traits.h>
 #  include <deal.II/arborx/distributed_tree.h>
-#else
-template <int dim, typename Number>
-class BoundingBox;
-
-namespace ArborXWrappers
-{
-  class DistributedTree
-  {
-  public:
-    template <int dim, typename Number>
-    DistributedTree(const MPI_Comm &,
-                    const std::vector<BoundingBox<dim, Number>> &);
-    template <typename QueryType>
-    std::pair<std::vector<std::pair<int, int>>, std::vector<int>>
-    query(const QueryType &queries);
-  };
-  class BoundingBoxIntersectPredicate
-  {};
-} // namespace ArborXWrappers
 #endif
 
 #ifdef DEAL_II_WITH_CGAL
@@ -102,6 +83,33 @@ namespace ArborXWrappers
 
 DEAL_II_NAMESPACE_OPEN
 
+#ifndef DEAL_II_WITH_ARBORX
+
+// If we configured without ArborX, we still need to have a couple of
+// dummy types that we can reference in code below. They do not
+// actually do anything useful.
+template <int dim, typename Number>
+class BoundingBox;
+
+namespace ArborXWrappers
+{
+  class DistributedTree
+  {
+  public:
+    template <int dim, typename Number>
+    DistributedTree(const MPI_Comm &,
+                    const std::vector<BoundingBox<dim, Number>> &);
+
+    template <typename QueryType>
+    std::pair<std::vector<std::pair<int, int>>, std::vector<int>>
+    query(const QueryType &queries);
+  };
+
+  class BoundingBoxIntersectPredicate
+  {};
+} // namespace ArborXWrappers
+#endif
+
 
 namespace GridTools
 {

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.