]> https://gitweb.dealii.org/ - dealii.git/commitdiff
MGTransferMF::interpolate_to_mg(): zero out ghost values 15793/head
authorPeter Munch <peterrmuench@gmail.com>
Tue, 25 Jul 2023 21:42:59 +0000 (23:42 +0200)
committerPeter Munch <peterrmuench@gmail.com>
Wed, 26 Jul 2023 18:51:43 +0000 (20:51 +0200)
doc/news/changes/incompatibilities/20230725Munch [new file with mode: 0644]
include/deal.II/multigrid/mg_transfer_matrix_free.h
tests/mappings/mapping_q_eulerian_08.cc
tests/mappings/mapping_q_eulerian_14.cc
tests/matrix_free/interpolate_to_mg.cc

diff --git a/doc/news/changes/incompatibilities/20230725Munch b/doc/news/changes/incompatibilities/20230725Munch
new file mode 100644 (file)
index 0000000..5e26565
--- /dev/null
@@ -0,0 +1,4 @@
+Changed: MGTransferMatrixFree::interpolate_to_mg()
+returns now non-ghosted vectors.
+<br>
+(Peter Munch, 2023/07/25)
index 5dd17970050c8100886aa079ddabb8985e07dcd0..d4d53f059b1dcc525814b547440ef681bb87be3b 100644 (file)
@@ -632,6 +632,9 @@ MGTransferMatrixFree<dim, Number>::interpolate_to_mg(
 
       dst[level - 1].update_ghost_values();
     }
+
+  for (unsigned int level = min_level; level <= max_level; ++level)
+    dst[level].zero_out_ghost_values();
 }
 
 
index 5139b342ad8f7f6debf4ba678aa836b4cd1e3223..cb6dd8f4df41f42daba8419e6891b52d0b5bcaed 100644 (file)
@@ -305,6 +305,8 @@ test(const unsigned int n_ref = 0)
 
       MatrixFree<dim, LevelNumberType> mg_level_euler;
 
+      displacement_level[level].update_ghost_values();
+
       MappingQEulerian<dim, LinearAlgebra::distributed::Vector<LevelNumberType>>
         euler_level(euler_fe_degree,
                     dof_handler_euler,
index 44766fffea5a69f29b0ae516b7435d21de3ab2cb..f8d33d22e4f0817818cc0905c9276b0ab564883e 100644 (file)
@@ -346,6 +346,8 @@ test(const unsigned int n_ref = 0)
 
       MatrixFree<dim, LevelNumberType> mg_level_euler;
 
+      displacement_level[level].update_ghost_values();
+
       MappingQEulerian<dim, LinearAlgebra::distributed::Vector<LevelNumberType>>
         euler_level(euler_fe_degree,
                     dof_handler_euler,
index f2226fb70c169b3fdd6ea4d8c94bc0277a192199..1d30f8e38e2e2f32e4d010e9383567f489bbeadf 100644 (file)
@@ -211,6 +211,8 @@ test(const unsigned int n_glob_ref = 2, const unsigned int n_ref = 0)
     {
       --level;
 
+      level_projection[level].update_ghost_values();
+
       std::vector<types::global_dof_index>    dof_indices(fe.dofs_per_cell);
       typename DoFHandler<dim>::cell_iterator cell = dof_handler.begin(level);
       typename DoFHandler<dim>::cell_iterator endc = dof_handler.end(level);

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.