From d92e20624786de0c5578503dd5a8c620e2df4755 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Tue, 7 Jan 2020 20:39:43 -0700 Subject: [PATCH] Simplify the instantiations of DoFTools::count_dofs_per_block(). --- source/dofs/dof_tools.inst.in | 128 ++++++++++++++-------------------- 1 file changed, 53 insertions(+), 75 deletions(-) diff --git a/source/dofs/dof_tools.inst.in b/source/dofs/dof_tools.inst.in index 4f8a57dec2..15c788aa66 100644 --- a/source/dofs/dof_tools.inst.in +++ b/source/dofs/dof_tools.inst.in @@ -18,38 +18,59 @@ for (DoFHandler : DOFHANDLER_TEMPLATES; deal_II_dimension, deal_II_space_dimension : DIMENSIONS) { #if deal_II_dimension <= deal_II_space_dimension - template void DoFTools::extract_locally_relevant_dofs< - DoFHandler>( - const DoFHandler &dof_handler, - IndexSet & dof_set); - - template void DoFTools::extract_locally_relevant_level_dofs< - DoFHandler>( - const DoFHandler &dof_handler, - const unsigned int level, - IndexSet & dof_set); - - template void DoFTools::extract_locally_owned_dofs< - DoFHandler>( - const DoFHandler &dof_handler, - IndexSet & dof_set); - - template void DoFTools::extract_locally_active_dofs< - DoFHandler>( - const DoFHandler &dof_handler, - IndexSet & dof_set); - - template std::vector DoFTools::locally_owned_dofs_per_component< - DoFHandler>( - const DoFHandler &dof_handler, - const ComponentMask & components); - - template void DoFTools::count_dofs_per_component< - DoFHandler>( - const DoFHandler &, - std::vector &, - const bool, - const std::vector &); + namespace DoFTools + \{ + template void + extract_locally_relevant_dofs< + DoFHandler>( + const DoFHandler + & dof_handler, + IndexSet &dof_set); + + template void + extract_locally_relevant_level_dofs< + DoFHandler>( + const DoFHandler + & dof_handler, + const unsigned int level, + IndexSet & dof_set); + + template void + extract_locally_owned_dofs< + DoFHandler>( + const DoFHandler + & dof_handler, + IndexSet &dof_set); + + template void + extract_locally_active_dofs< + DoFHandler>( + const DoFHandler + & dof_handler, + IndexSet &dof_set); + + template std::vector + locally_owned_dofs_per_component< + DoFHandler>( + const DoFHandler + & dof_handler, + const ComponentMask &components); + + template void + count_dofs_per_component< + DoFHandler>( + const DoFHandler &, + std::vector &, + const bool, + const std::vector &); + + template void + count_dofs_per_block< + DoFHandler>( + const DoFHandler &, + std::vector &, + const std::vector &); + \} #endif } @@ -372,18 +393,6 @@ for (deal_II_dimension : DIMENSIONS) std::vector &); #endif - - template void DoFTools::count_dofs_per_block>( - const DoFHandler &, - std::vector &, - const std::vector &); - - template void - DoFTools::count_dofs_per_block>( - const hp::DoFHandler &, - std::vector &, - const std::vector &); - template void DoFTools::map_dof_to_boundary_indices< DoFHandler>(const DoFHandler &, const std::set &, @@ -407,37 +416,6 @@ for (deal_II_dimension : DIMENSIONS) std::vector &); -#if deal_II_dimension < 3 - - template void DoFTools::count_dofs_per_block< - DoFHandler>( - const DoFHandler &, - std::vector &, - const std::vector &); - - template void DoFTools::count_dofs_per_block< - hp::DoFHandler>( - const hp::DoFHandler &, - std::vector &, - const std::vector &); - -#endif - - -#if deal_II_dimension == 3 - - template void DoFTools::count_dofs_per_block>( - const DoFHandler<1, 3> &, - std::vector &, - const std::vector &); - - template void DoFTools::count_dofs_per_block>( - const hp::DoFHandler<1, 3> &, - std::vector &, - const std::vector &); - -#endif - template void DoFTools::write_gnuplot_dof_support_point_info( std::ostream &, const std::map> &); -- 2.39.5