From: Timo Heister Date: Wed, 6 Oct 2021 18:34:47 +0000 (-0400) Subject: add to other test X-Git-Tag: v9.4.0-rc1~960^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7776385b261268c64df3c435737c882eb6ad7b5f;p=dealii.git add to other test --- 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);