From: Martin Kronbichler Date: Sun, 16 May 2021 20:13:13 +0000 (+0200) Subject: FEFieldFunction: Detect case when some points were not found X-Git-Tag: v9.3.0-rc1~45^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8e1e2482ee4cf237402998cf69e14e7bc7e23450;p=dealii.git FEFieldFunction: Detect case when some points were not found --- diff --git a/include/deal.II/numerics/fe_field_function.templates.h b/include/deal.II/numerics/fe_field_function.templates.h index 90dc040011..8c3da383f7 100644 --- a/include/deal.II/numerics/fe_field_function.templates.h +++ b/include/deal.II/numerics/fe_field_function.templates.h @@ -523,7 +523,9 @@ namespace Functions { // Calling the GridTools routine and preparing output auto cell_qpoint_map = - GridTools::compute_point_locations(cache, points, cell_hint.get()); + GridTools::compute_point_locations_try_all(cache, + points, + cell_hint.get()); const auto &tria_cells = std::get<0>(cell_qpoint_map); cells.resize(tria_cells.size()); unsigned int i = 0; @@ -531,6 +533,10 @@ namespace Functions cells[i++] = typename DoFHandlerType::cell_iterator(*c, dh); qpoints = std::get<1>(cell_qpoint_map); maps = std::get<2>(cell_qpoint_map); + + // Ensure that we found all points + AssertThrow(std::get<3>(cell_qpoint_map).empty(), + VectorTools::ExcPointNotAvailableHere()); return cells.size(); }