Skip to content

Commit

Permalink
Merge pull request #14259 from peterrum/rpe_project
Browse files Browse the repository at this point in the history
GT::distributed_compute_point_locations(): project reference points onto cell
  • Loading branch information
peterrum committed Sep 13, 2022
2 parents ce01b6b + 8978fa3 commit 2dc30a0
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
6 changes: 6 additions & 0 deletions doc/news/changes/minor/20220912Munch_2
Original file line number Diff line number Diff line change
@@ -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.
<br>
(Peter Munch, Magdalena Schreter, 2022/09/12)
17 changes: 13 additions & 4 deletions source/grid/grid_tools.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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<dim>::project_to_unit_cell(
reference_position);

send_components.emplace_back(
std::pair<int, int>(
cell_and_reference_position.first->level(),
cell_and_reference_position.first->index()),
std::pair<int, int>(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);
}
Expand Down

0 comments on commit 2dc30a0

Please sign in to comment.