From e80337f7395ae02186cedef563f5d79082fff5ab Mon Sep 17 00:00:00 2001 From: kanschat Date: Fri, 13 Apr 2007 03:02:09 +0000 Subject: [PATCH] MGTools reverted to version 14622 git-svn-id: https://svn.dealii.org/trunk@14625 0785d39b-7218-0410-832d-ea1e28bc413d --- .../deal.II/source/multigrid/mg_dof_tools.cc | 124 +++++++++--------- 1 file changed, 62 insertions(+), 62 deletions(-) diff --git a/deal.II/deal.II/source/multigrid/mg_dof_tools.cc b/deal.II/deal.II/source/multigrid/mg_dof_tools.cc index 8da619dd4d..ff6badc4ab 100644 --- a/deal.II/deal.II/source/multigrid/mg_dof_tools.cc +++ b/deal.II/deal.II/source/multigrid/mg_dof_tools.cc @@ -1010,87 +1010,87 @@ MGTools::count_dofs_per_component ( template void -MGTools::count_dofs_per_block ( +MGTools::count_dofs_per_component ( const MGDoFHandler &dof_handler, std::vector > &result, - std::vector target_block) + std::vector target_component) +{ + count_dofs_per_component(dof_handler, result, false, target_component); +} + + +template +void +MGTools::count_dofs_per_block ( + const MGDoFHandler& dof_handler, + std::vector >& dofs_per_block, + std::vector target_block) { const FiniteElement& fe = dof_handler.get_fe(); const unsigned int n_blocks = fe.n_blocks(); - const unsigned int nlevels = dof_handler.get_tria().n_levels(); + const unsigned int n_levels = dof_handler.get_tria().n_levels(); - Assert (result.size() == nlevels, - ExcDimensionMismatch(result.size(), nlevels)); + dofs_per_block.resize (n_levels, std::vector(n_blocks)); + for (unsigned int l=0;l > + dofs_in_block (n_blocks, std::vector(dof_handler.n_dofs(l), false)); + std::vector > + block_select (n_blocks, std::vector(n_blocks, false)); + Threads::ThreadGroup<> threads; + for (unsigned int i=0; i > - dofs_in_block (n_blocks, - std::vector(dof_handler.n_dofs(l), false)); - std::vector > - block_select (n_blocks, std::vector(n_blocks, false)); - Threads::ThreadGroup<> threads; - for (unsigned int i=0; i &, - const std::vector &, - std::vector &, - bool) - = &DoFTools::template extract_level_dofs; - block_select[i][i] = true; - threads += Threads::spawn (fun_ptr)(l, dof_handler, block_select[i], - dofs_in_block[i], true); - } - threads.join_all(); - - // next count what we got - for (unsigned int block=0;block&, + const std::vector&, + std::vector&, + bool) + = &DoFTools::template extract_level_dofs; + block_select[i][i] = true; + threads += Threads::spawn (fun_ptr)(l, dof_handler, block_select[i], + dofs_in_block[i], true); + }; + threads.join_all (); + + // next count what we got + for (unsigned int block=0;block -void -MGTools::count_dofs_per_component ( - const MGDoFHandler &dof_handler, - std::vector > &result, - std::vector target_component) -{ - count_dofs_per_component(dof_handler, result, false, target_component); -} - - #if deal_II_dimension == 1 template -- 2.39.5