From 01e38c6aa8bb7b5841ff08dbb1f30719bf28a50d Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Mon, 10 Feb 2025 13:10:16 -0700 Subject: [PATCH] Fix grid_tools.cc without MPI and ArborX. --- source/grid/grid_tools.cc | 46 +++++++++++++++++++++++---------------- 1 file changed, 27 insertions(+), 19 deletions(-) diff --git a/source/grid/grid_tools.cc b/source/grid/grid_tools.cc index 4a8450efcc..eb525ccb0d 100644 --- a/source/grid/grid_tools.cc +++ b/source/grid/grid_tools.cc @@ -22,25 +22,6 @@ #ifdef DEAL_II_WITH_ARBORX # include # include -#else -template -class BoundingBox; - -namespace ArborXWrappers -{ - class DistributedTree - { - public: - template - DistributedTree(const MPI_Comm &, - const std::vector> &); - template - std::pair>, std::vector> - 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 +class BoundingBox; + +namespace ArborXWrappers +{ + class DistributedTree + { + public: + template + DistributedTree(const MPI_Comm &, + const std::vector> &); + + template + std::pair>, std::vector> + query(const QueryType &queries); + }; + + class BoundingBoxIntersectPredicate + {}; +} // namespace ArborXWrappers +#endif + namespace GridTools { -- 2.39.5