From a0f2e106abf6cbfc410663e8c3735b700aaccbe6 Mon Sep 17 00:00:00 2001 From: Daniel Arndt Date: Tue, 18 May 2021 08:58:00 -0400 Subject: [PATCH] Add assert to compute_point_locations_try_all --- include/deal.II/grid/grid_tools.h | 4 ++++ source/grid/grid_tools.cc | 3 +++ 2 files changed, 7 insertions(+) diff --git a/include/deal.II/grid/grid_tools.h b/include/deal.II/grid/grid_tools.h index 3ce447ad36..939f93c316 100644 --- a/include/deal.II/grid/grid_tools.h +++ b/include/deal.II/grid/grid_tools.h @@ -889,6 +889,8 @@ namespace GridTools * The algorithm builds an rtree of @p points to sort them spatially, before * attempting to call find_active_cell_around_point(). * + * @note This function is not implemented for the codimension one case (spacedim != dim). + * * @note If a point is not found inside the mesh, or is lying inside an * artificial cell of a parallel::TriangulationBase, the point is silently * ignored. If you want to infer for which points the search failed, use the @@ -951,6 +953,8 @@ namespace GridTools * > * @endcode * + * @note This function is not implemented for the codimension one case (spacedim != dim). + * * @note This function optimizes the search by making use of * GridTools::Cache::get_cell_bounding_boxes_rtree(), which either returns * a cached rtree or builds and stores one. Building an rtree might hinder diff --git a/source/grid/grid_tools.cc b/source/grid/grid_tools.cc index 94abc37f78..c557384fc0 100644 --- a/source/grid/grid_tools.cc +++ b/source/grid/grid_tools.cc @@ -5457,6 +5457,9 @@ namespace GridTools const typename Triangulation::active_cell_iterator &cell_hint) { + Assert((dim == spacedim), + ExcMessage("Only implemented for dim==spacedim.")); + // Alias namespace bgi = boost::geometry::index; -- 2.39.5