From: Daniel Arndt Date: Tue, 18 May 2021 12:58:00 +0000 (-0400) Subject: Add assert to compute_point_locations_try_all X-Git-Tag: v9.3.0-rc1~36^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a0f2e106abf6cbfc410663e8c3735b700aaccbe6;p=dealii.git Add assert to compute_point_locations_try_all --- 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;