From: Guido Kanschat Date: Sun, 5 Jul 2015 16:44:40 +0000 (+0200) Subject: Fix the ordering of renumbering in two tests X-Git-Tag: v8.3.0-rc1~55^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F1084%2Fhead;p=dealii.git Fix the ordering of renumbering in two tests --- diff --git a/tests/multigrid/mg_output_dirichlet.cc b/tests/multigrid/mg_output_dirichlet.cc index b7703e9def..d4a0fe53a4 100644 --- a/tests/multigrid/mg_output_dirichlet.cc +++ b/tests/multigrid/mg_output_dirichlet.cc @@ -223,13 +223,7 @@ void check_simple(const FiniteElement &fe) DoFTools::make_hanging_node_constraints ( mgdof, hnc); - - DoFTools::make_hanging_node_constraints ( - mgdof_renumbered, - hnc_renumbered); hnc.close (); - hnc_renumbered.close (); - std::vector block_component (4,0); block_component[2] = 1; @@ -239,6 +233,10 @@ void check_simple(const FiniteElement &fe) for (unsigned int level=0; level &fe) DoFTools::make_hanging_node_constraints ( mgdof, hnc); - - DoFTools::make_hanging_node_constraints ( - mgdof_renumbered, - hnc_renumbered); hnc.close (); - hnc_renumbered.close (); - std::vector block_component (4,0); block_component[2] = 1; @@ -237,6 +231,10 @@ void check_simple(const FiniteElement &fe) for (unsigned int level=0; level &fe) MGTransferPrebuilt > transfer_renumbered(hnc_renumbered, mg_constrained_dofs_renumbered); transfer_renumbered.build_matrices(mgdof_renumbered); - + + // Fill vector u with some cell based numbering Vector u(mgdof.n_dofs()); initialize(mgdof,u); MGLevelObject > v(0, tr.n_levels()-1); reinit_vector(mgdof, v); - + + // Copy u to a multigrid vector and print transfer.copy_to_mg(mgdof, v, u); print(mgdof, v); - + + // Forget everything so far and fill v with a cell based + // numbering. Prolongate from coarse grid up and transfer to u. u=0; initialize(mgdof, v); for (unsigned int l=0; l &fe) transfer.copy_from_mg(mgdof, u, v); Vector diff = u; - + + // Do the same for the renumbered mesh initialize(mgdof_renumbered,u); reinit_vector(mgdof_renumbered, v); transfer_renumbered.copy_to_mg(mgdof_renumbered, v, u); deallog << "copy_to_mg" << std::endl; print(mgdof_renumbered, v); - + + // Prolongate up from coarse mesh and make sure the result does not + // depend on numbering u=0; initialize(mgdof_renumbered, v); for (unsigned int l=0; l