From 3467e662770d7584666d0762810ac3e1d922532b Mon Sep 17 00:00:00 2001 From: bangerth Date: Sat, 13 Feb 2010 00:52:05 +0000 Subject: [PATCH] Add make_boundary_list also for IndexSet arguments. git-svn-id: https://svn.dealii.org/trunk@20582 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/deal.II/include/multigrid/mg_tools.h | 35 +++++++++++++------ .../deal.II/source/multigrid/mg_dof_tools.cc | 26 ++++++++++++++ 2 files changed, 51 insertions(+), 10 deletions(-) diff --git a/deal.II/deal.II/include/multigrid/mg_tools.h b/deal.II/deal.II/include/multigrid/mg_tools.h index 6967a36a6d..9f6bf21252 100644 --- a/deal.II/deal.II/include/multigrid/mg_tools.h +++ b/deal.II/deal.II/include/multigrid/mg_tools.h @@ -13,15 +13,15 @@ #ifndef __deal2__mg_tools_h #define __deal2__mg_tools_h -// This file moved here from mg_dof_tools.h Revision 1.36 - #include +#include #include #include #include #include + DEAL_II_NAMESPACE_OPEN template class MGLevelObject; @@ -237,14 +237,29 @@ class MGTools * of levels. */ template - static void make_boundary_list( - const MGDoFHandler& mg_dof, - const typename FunctionMap::type& function_map, - std::vector >& boundary_indices, - const std::vector& component_mask = std::vector()); - /** - * Maybe no longer needed. - */ + static + void + make_boundary_list (const MGDoFHandler &mg_dof, + const typename FunctionMap::type &function_map, + std::vector > &boundary_indices, + const std::vector &component_mask = std::vector()); + + /** + * The same function as above, but return + * an IndexSet rather than a + * std::set on each level. + */ + template + static + void + make_boundary_list (const MGDoFHandler &mg_dof, + const typename FunctionMap::type &function_map, + std::vector &boundary_indices, + const std::vector &component_mask = std::vector()); + + /** + * Maybe no longer needed. + */ template static void apply_boundary_values ( 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 7f0d8146be..c1ea3c7c70 100644 --- a/deal.II/deal.II/source/multigrid/mg_dof_tools.cc +++ b/deal.II/deal.II/source/multigrid/mg_dof_tools.cc @@ -1298,6 +1298,26 @@ MGTools::make_boundary_list( #endif +template +void +MGTools:: +make_boundary_list(const MGDoFHandler& dof, + const typename FunctionMap::type& function_map, + std::vector& boundary_indices, + const std::vector& component_mask) +{ + std::vector > + my_boundary_indices (boundary_indices.size()); + make_boundary_list (dof, function_map, my_boundary_indices, component_mask); + for (unsigned int i=0; i @@ -1555,6 +1575,12 @@ template void MGTools::make_boundary_list( std::vector >&, const std::vector&); +template void MGTools::make_boundary_list( + const MGDoFHandler&, + const FunctionMap::type&, + std::vector&, + const std::vector&); + template void MGTools:: -- 2.39.5