From: guido Date: Thu, 29 Jun 2006 14:46:07 +0000 (+0000) Subject: branch merged X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eae9e531cc3c1bbfab9de4a9fe68f2c0e2b53b79;p=dealii-svn.git branch merged git-svn-id: https://svn.dealii.org/trunk@13315 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/include/multigrid/mg_tools.h b/deal.II/deal.II/include/multigrid/mg_tools.h index 673a200d38..55e047eeca 100644 --- a/deal.II/deal.II/include/multigrid/mg_tools.h +++ b/deal.II/deal.II/include/multigrid/mg_tools.h @@ -25,7 +25,8 @@ template class MGLevelObject; template class MGDoFHandler; template class Vector; template class BlockVector; -template class FullMatrix; +template class FullMatrix; +template class BlockSparseMatrix; /*!@addtogroup mg */ /*@{*/ @@ -165,6 +166,22 @@ class MGTools const unsigned int level, const Table<2,DoFTools::Coupling> &flux_mask); + /** + * Count the dofs block-wise + * on each level. + * + * Result is a vector containing + * for each level a vector + * containing the number of dofs + * for each block (access is + * result[level][block]). + */ + template + static void count_dofs_per_block ( + const MGDoFHandler &mg_dof, + std::vector > &result, + std::vector target_block = std::vector()); + /** * Count the dofs component-wise * on each level. @@ -192,8 +209,46 @@ class MGTools const MGDoFHandler &mg_dof, std::vector > &result, std::vector target_component); + + /** + * Generate a list of those + * degrees of freedom at the + * boundary which should be + * eliminated from the matrix. + * + * This is the multilevel + * equivalent of + * VectorTools::interpolate_boundary_values, + * but since the multilevel + * method does not have its own + * right hand side, the function + * values are igneored. + * + * @arg boundary_indices + * is a vector which contains + * for each level all indices of + * boundary constraint degrees of + * freedom. + */ + 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()); + + template + static void apply_boundary_values ( + const std::vector &boundary_values, + SparseMatrix& matrix, + const bool preserve_symmetry); - + template + static void apply_boundary_values ( + const std::vector& boundary_values, + BlockSparseMatrix& matrix, + const bool preserve_symmetry); + /** * Ajust vectors on all levels to * correct size. Here, we just