From d1338db2512ee76ad1ee2ef021cf291dd98d8e4b Mon Sep 17 00:00:00 2001 From: Luca Heltai Date: Thu, 14 May 2020 22:57:21 +0200 Subject: [PATCH] Dirty fix. --- source/grid/grid_tools.cc | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/source/grid/grid_tools.cc b/source/grid/grid_tools.cc index 5b41068c71..ce8fb651a4 100644 --- a/source/grid/grid_tools.cc +++ b/source/grid/grid_tools.cc @@ -1724,9 +1724,13 @@ namespace GridTools // the user did not provide a hint_cell, and at the beginning of the // while loop we performed an actual global search on the mesh // vertices. Not finding the point then means the point is outside the - // domain. - AssertThrow(current_cell.state() == IteratorState::valid, - ExcPointNotFound(p)); + // domain, or that we've had problems with the algorithm above. Try as a + // last resort the other (simpler) algorithm. + if (current_cell.state() != IteratorState::valid) + return find_active_cell_around_point(mapping, + mesh, + p, + marked_vertices); current_cell = typename MeshType::active_cell_iterator(); } -- 2.39.5