From: Marco Feder Date: Thu, 6 Jul 2023 18:09:35 +0000 (+0200) Subject: Avoid undefined reference when spacedim==1 X-Git-Tag: relicensing~677^2~5 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=95407274be837a57b88610682aab274c17c87e66;p=dealii.git Avoid undefined reference when spacedim==1 --- diff --git a/source/grid/grid_tools.cc b/source/grid/grid_tools.cc index c2b37a345e..2b5dea22fa 100644 --- a/source/grid/grid_tools.cc +++ b/source/grid/grid_tools.cc @@ -5954,27 +5954,34 @@ namespace GridTools unsigned int idx = (global_bboxes.size() == 1) ? 0 : Utilities::MPI::this_mpi_process(comm); + if constexpr (spacedim != 1) + { + ArborXWrappers::DistributedTree distributed_tree(comm, + global_bboxes[idx]); - ArborXWrappers::DistributedTree distributed_tree(comm, - global_bboxes[idx]); + if constexpr (std::is_same>::value) + { + ArborXWrappers::PointIntersectPredicate bb_intersect(entities); - if constexpr (std::is_same>::value) - { - ArborXWrappers::PointIntersectPredicate bb_intersect(entities); + const auto &[indices_ranks, offsets] = + distributed_tree.query(bb_intersect); + fill_ranks_and_indices(offsets, indices_ranks); + } + else if constexpr (std::is_same>::value) + { + ArborXWrappers::BoundingBoxIntersectPredicate bb_intersect( + entities); - const auto &[indices_ranks, offsets] = - distributed_tree.query(bb_intersect); - fill_ranks_and_indices(offsets, indices_ranks); + const auto &[indices_ranks, offsets] = + distributed_tree.query(bb_intersect); + fill_ranks_and_indices(offsets, indices_ranks); + } } - else if constexpr (std::is_same>::value) + else { - ArborXWrappers::BoundingBoxIntersectPredicate bb_intersect(entities); - - const auto &[indices_ranks, offsets] = - distributed_tree.query(bb_intersect); - fill_ranks_and_indices(offsets, indices_ranks); + AssertThrow(false, ExcInternalError()); + return {}; } - #endif // convert to CRS