]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Try to fix bug in version with tolerance.
authorLuca Heltai <luca.heltai@sissa.it>
Fri, 23 Apr 2021 12:40:32 +0000 (14:40 +0200)
committerLuca Heltai <luca.heltai@sissa.it>
Tue, 11 May 2021 16:55:40 +0000 (18:55 +0200)
source/grid/grid_tools.cc

index 34d5b7b6deb741b50e3f52d04a099491270a3fe9..f9c2c0c249167af12ef8b4742c1650e9f49a3e8d 100644 (file)
@@ -5741,13 +5741,12 @@ namespace GridTools
                   Point<dim>>>
         locally_owned_active_cells_around_point;
 
-      try
-        {
-          const auto first_cell = GridTools::find_active_cell_around_point(
-            cache, point, cell_hint, marked_vertices, tolerance);
-
-          cell_hint = first_cell.first;
+      const auto first_cell = GridTools::find_active_cell_around_point(
+        cache, point, cell_hint, marked_vertices, tolerance);
 
+      cell_hint = first_cell.first;
+      if (cell_hint.state() == IteratorState::valid)
+        {
           const auto active_cells_around_point =
             GridTools::find_all_active_cells_around_point(
               cache.get_mapping(),
@@ -5763,9 +5762,6 @@ namespace GridTools
             if (cell.first->is_locally_owned())
               locally_owned_active_cells_around_point.push_back(cell);
         }
-      catch (...)
-        {}
-
       return locally_owned_active_cells_around_point;
     }
 

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.