]> https://gitweb.dealii.org/ - dealii.git/commitdiff
add to other test 12791/head
authorTimo Heister <timo.heister@gmail.com>
Wed, 6 Oct 2021 18:34:47 +0000 (14:34 -0400)
committerTimo Heister <timo.heister@gmail.com>
Wed, 6 Oct 2021 18:34:47 +0000 (14:34 -0400)
tests/mappings/mapping_q_eulerian_08.cc

index 209c064f5b051209e9eb5e93ceaa762c67e571b3..fb226f348198cab0f29536873a0a26215af56b24 100644 (file)
@@ -207,6 +207,21 @@ test(const unsigned int n_ref = 0)
   const unsigned int min_level = 0;
   MGLevelObject<LinearAlgebra::distributed::Vector<LevelNumberType>>
     displacement_level(min_level, max_level);
+
+  // Important! This preallocation of the displacement vectors with
+  // all relevant ghost indices is required to certain meshes.
+  for (unsigned int level = min_level; level <= max_level; ++level)
+    {
+      IndexSet relevant_mg_dofs;
+      DoFTools::extract_locally_relevant_level_dofs(dof_handler_euler,
+                                                    level,
+                                                    relevant_mg_dofs);
+      displacement_level[level].reinit(dof_handler_euler.locally_owned_mg_dofs(
+                                         level),
+                                       relevant_mg_dofs,
+                                       mpi_communicator);
+    }
+
   mg_transfer_euler.interpolate_to_mg(dof_handler_euler,
                                       displacement_level,
                                       displacement);

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.