]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Add assert to compute_point_locations_try_all
authorDaniel Arndt <arndtd@ornl.gov>
Tue, 18 May 2021 12:58:00 +0000 (08:58 -0400)
committerDaniel Arndt <arndtd@ornl.gov>
Tue, 18 May 2021 15:43:06 +0000 (11:43 -0400)
include/deal.II/grid/grid_tools.h
source/grid/grid_tools.cc

index 3ce447ad3657933484ecfde0389dd60819b869bc..939f93c31668b14808273b870a615758991fa5ed 100644 (file)
@@ -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 (<tt>spacedim != dim</tt>).
+   *
    * @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 (<tt>spacedim != dim</tt>).
+   *
    * @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
index 94abc37f78ab354ea8a7b1f4899bbb3b94553f5a..c557384fc05e8f18c64db3406033ba1bd586e01d 100644 (file)
@@ -5457,6 +5457,9 @@ namespace GridTools
     const typename Triangulation<dim, spacedim>::active_cell_iterator
       &cell_hint)
   {
+    Assert((dim == spacedim),
+           ExcMessage("Only implemented for dim==spacedim."));
+
     // Alias
     namespace bgi = boost::geometry::index;
 

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.