From: Wolfgang Bangerth Date: Fri, 15 Jan 2010 19:11:49 +0000 (+0000) Subject: Make compile again. Currently fails, however. X-Git-Tag: v8.0.0~6616 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e9f0b24200a88465ad563047785bfa39086baa46;p=dealii.git Make compile again. Currently fails, however. git-svn-id: https://svn.dealii.org/trunk@20379 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/tests/multigrid/transfer_compare_01.cc b/tests/multigrid/transfer_compare_01.cc index 989a04cbe2..63618076a1 100644 --- a/tests/multigrid/transfer_compare_01.cc +++ b/tests/multigrid/transfer_compare_01.cc @@ -41,6 +41,37 @@ using namespace std; +template +void +reinit_vector_by_blocks ( + const dealii::MGDoFHandler &mg_dof, + MGLevelObject > &v, + const unsigned int selected_block, + std::vector >& ndofs) +{ + const unsigned int n_blocks = mg_dof.get_fe().n_blocks(); + Assert(selected_block < n_blocks, ExcIndexRange(selected_block, 0, n_blocks)); + + std::vector selected(n_blocks, false); + selected[selected_block] = true; + + if (ndofs.size() == 0) + { + std::vector > + new_dofs(mg_dof.get_tria().n_levels(), + std::vector(selected.size())); + std::swap(ndofs, new_dofs); + MGTools::count_dofs_per_block (mg_dof, ndofs); + } + + for (unsigned int level=v.get_minlevel(); + level<=v.get_maxlevel();++level) + { + v[level].reinit(ndofs[level][selected_block]); + } +} + + template void reinit_vector_by_blocks ( @@ -82,6 +113,8 @@ reinit_vector_by_blocks ( } + + template void check_block(const FiniteElement& fe) { @@ -112,7 +145,8 @@ void check_block(const FiniteElement& fe) // Store sizes vector ndofs(fe.n_blocks()); DoFTools::count_dofs_per_block(mgdof, ndofs); - std::vector > mg_ndofs(mgdof.get_tria().n_levels()); + std::vector > mg_ndofs(mgdof.get_tria().n_levels(), + std::vector(fe.n_blocks())); MGTools::count_dofs_per_block(mgdof, mg_ndofs); MGTransferPrebuilt > transfer;