From: kanschat Date: Tue, 13 May 2008 16:33:06 +0000 (+0000) Subject: add assertion and clarify documentation X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4f0ee254d4804c82bea061ea9d578435ab350bef;p=dealii-svn.git add assertion and clarify documentation git-svn-id: https://svn.dealii.org/trunk@16088 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 cf89d0fffd..40de401816 100644 --- a/deal.II/deal.II/include/multigrid/mg_tools.h +++ b/deal.II/deal.II/include/multigrid/mg_tools.h @@ -2,7 +2,7 @@ // $Id$ // Version: $Name$ // -// Copyright (C) 2005, 2006, 2007 by the deal.II authors +// Copyright (C) 2005, 2006, 2007, 2008 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer @@ -227,13 +227,15 @@ class MGTools * but since the multilevel * method does not have its own * right hand side, the function - * values are igneored. + * values are ignored. * * @arg boundary_indices - * is a vector which contains - * for each level all indices of + * is a vector which on return + * contains all indices of * boundary constraint degrees of - * freedom. + * freedom for each level. Its + * length has to match the number + * of levels. */ template static void make_boundary_list( 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 540b696168..40cc8022a7 100644 --- a/deal.II/deal.II/source/multigrid/mg_dof_tools.cc +++ b/deal.II/deal.II/source/multigrid/mg_dof_tools.cc @@ -2,7 +2,7 @@ // $Id$ // Version: $Name$ // -// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 by the deal.II authors +// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer @@ -1124,10 +1124,13 @@ MGTools::make_boundary_list( // immediately if (function_map.size() == 0) return; - - const unsigned int n_components = DoFTools::n_components(dof); - const bool fe_is_system = (n_components != 1); + const unsigned int n_components = DoFTools::n_components(dof); + const unsigned int n_levels = dof.get_tria().n_levels(); + const bool fe_is_system = (n_components != 1); + + AssertDimension (boundary_indices.size(), n_levels); + // for (typename FunctionMap::type::const_iterator i=function_map.begin(); // i!=function_map.end(); ++i) // Assert (n_components == i->second->n_components,