From 7776385b261268c64df3c435737c882eb6ad7b5f Mon Sep 17 00:00:00 2001 From: Timo Heister Date: Wed, 6 Oct 2021 14:34:47 -0400 Subject: [PATCH] add to other test --- tests/mappings/mapping_q_eulerian_08.cc | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tests/mappings/mapping_q_eulerian_08.cc b/tests/mappings/mapping_q_eulerian_08.cc index 209c064f5b..fb226f3481 100644 --- a/tests/mappings/mapping_q_eulerian_08.cc +++ b/tests/mappings/mapping_q_eulerian_08.cc @@ -207,6 +207,21 @@ test(const unsigned int n_ref = 0) const unsigned int min_level = 0; MGLevelObject> 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); -- 2.39.5