From 59519b775eea82cc22560cc30d1b39444203d304 Mon Sep 17 00:00:00 2001 From: Luca Heltai Date: Fri, 23 Apr 2021 14:40:32 +0200 Subject: [PATCH] Try to fix bug in version with tolerance. --- source/grid/grid_tools.cc | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/source/grid/grid_tools.cc b/source/grid/grid_tools.cc index 34d5b7b6de..f9c2c0c249 100644 --- a/source/grid/grid_tools.cc +++ b/source/grid/grid_tools.cc @@ -5741,13 +5741,12 @@ namespace GridTools Point>> 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; } -- 2.39.5