]> https://gitweb.dealii.org/ - dealii.git/commitdiff
GT::distributed_compute_point_locations(): project reference points onto cell 14259/head
authorPeter Munch <peterrmuench@gmail.com>
Mon, 12 Sep 2022 17:46:46 +0000 (19:46 +0200)
committerPeter Munch <peterrmuench@gmail.com>
Mon, 12 Sep 2022 20:08:37 +0000 (22:08 +0200)
doc/news/changes/minor/20220912Munch_2 [new file with mode: 0644]
source/grid/grid_tools.cc

diff --git a/doc/news/changes/minor/20220912Munch_2 b/doc/news/changes/minor/20220912Munch_2
new file mode 100644 (file)
index 0000000..27256ac
--- /dev/null
@@ -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)
index f6f642ab1fbed2b4de64616c72596c1cf89b6a08..86d0e96363f343fe444beaecab2debb65b555be1 100644 (file)
@@ -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);
                   }

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.