From: Peter Munch Date: Mon, 12 Sep 2022 17:46:46 +0000 (+0200) Subject: GT::distributed_compute_point_locations(): project reference points onto cell X-Git-Tag: v9.5.0-rc1~976^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8978fa3753ade64e21b56491471d6f1f450012b0;p=dealii.git GT::distributed_compute_point_locations(): project reference points onto cell --- diff --git a/doc/news/changes/minor/20220912Munch_2 b/doc/news/changes/minor/20220912Munch_2 new file mode 100644 index 0000000000..27256ac3ea --- /dev/null +++ b/doc/news/changes/minor/20220912Munch_2 @@ -0,0 +1,6 @@ +Fixed: The function GridTools::internal::distributed_compute_point_locations() +now projects reference points outside of a cell (but within a tolerance) onto +the unit cell. This enables the use of FE_Q_iso_Q1 in +Utilities::MPI::RemotePointEvaluation. +
+(Peter Munch, Magdalena Schreter, 2022/09/12) diff --git a/source/grid/grid_tools.cc b/source/grid/grid_tools.cc index f6f642ab1f..86d0e96363 100644 --- a/source/grid/grid_tools.cc +++ b/source/grid/grid_tools.cc @@ -6089,13 +6089,22 @@ namespace GridTools for (const auto &cell_and_reference_position : cells_and_reference_positions) { + const auto cell = cell_and_reference_position.first; + auto reference_position = + cell_and_reference_position.second; + + // TODO: we need to implement + // ReferenceCell::project_to_unit_cell() + if (cell->reference_cell().is_hyper_cube()) + reference_position = + GeometryInfo::project_to_unit_cell( + reference_position); + send_components.emplace_back( - std::pair( - cell_and_reference_position.first->level(), - cell_and_reference_position.first->index()), + std::pair(cell->level(), cell->index()), other_rank, index_and_point.first, - cell_and_reference_position.second, + reference_position, index_and_point.second, numbers::invalid_unsigned_int); }