// Store the point only if it is inside a locally owned sphere cell
if (cell->subdomain_id() == my_rank)
loc_owned_points.emplace_back(center_pt);
- // Find the cube cell where center pt lies
- auto my_pair = GridTools::find_active_cell_around_point(cache, center_pt);
- // If it is inside a locally owned cell it shall be returned
- // from distributed compute point locations
- if (my_pair.first->is_locally_owned())
+ try
{
- computed_pts++;
- auto cells_it = std::find(computed_cells.begin(),
- computed_cells.end(),
- my_pair.first);
-
- if (cells_it == computed_cells.end())
+ // Find the cube cell where center pt lies
+ auto my_pair =
+ GridTools::find_active_cell_around_point(cache, center_pt);
+ // If it is inside a locally owned cell it shall be returned
+ // from distributed compute point locations
+ if (my_pair.first->is_locally_owned())
{
- // Cell not found: adding a new cell
- computed_cells.emplace_back(my_pair.first);
- computed_qpoints.emplace_back(1, my_pair.second);
- computed_points.emplace_back(1, center_pt);
- computed_ranks.emplace_back(1, cell->subdomain_id());
- }
- else
- {
- // Cell found: just adding the point index and qpoint to the list
- unsigned int current_cell = cells_it - computed_cells.begin();
- computed_qpoints[current_cell].emplace_back(my_pair.second);
- computed_points[current_cell].emplace_back(center_pt);
- computed_ranks[current_cell].emplace_back(cell->subdomain_id());
+ computed_pts++;
+ auto cells_it = std::find(computed_cells.begin(),
+ computed_cells.end(),
+ my_pair.first);
+
+ if (cells_it == computed_cells.end())
+ {
+ // Cell not found: adding a new cell
+ computed_cells.emplace_back(my_pair.first);
+ computed_qpoints.emplace_back(1, my_pair.second);
+ computed_points.emplace_back(1, center_pt);
+ computed_ranks.emplace_back(1, cell->subdomain_id());
+ }
+ else
+ {
+ // Cell found: just adding the point index and qpoint to the
+ // list
+ unsigned int current_cell = cells_it - computed_cells.begin();
+ computed_qpoints[current_cell].emplace_back(my_pair.second);
+ computed_points[current_cell].emplace_back(center_pt);
+ computed_ranks[current_cell].emplace_back(
+ cell->subdomain_id());
+ }
}
}
+ catch (const GridTools::ExcPointNotFound<dim> &)
+ {}
}
// Computing bounding boxes describing the locally owned part of the mesh