]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
add assertion and clarify documentation
authorkanschat <kanschat@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 13 May 2008 16:33:06 +0000 (16:33 +0000)
committerkanschat <kanschat@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 13 May 2008 16:33:06 +0000 (16:33 +0000)
git-svn-id: https://svn.dealii.org/trunk@16088 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/include/multigrid/mg_tools.h
deal.II/deal.II/source/multigrid/mg_dof_tools.cc

index cf89d0fffd75150ede898fd76f29ea75fd18156f..40de401816b33fa8cfbaab67bc2709b86326e283 100644 (file)
@@ -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 <tt>boundary_indices</tt>
-                                     * 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 <int dim>
     static void make_boundary_list(
index 540b696168e1467252190b5d06ab3e892f261e13..40cc8022a748e2fe3a93b223735f2cb9565102ab 100644 (file)
@@ -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<dim>::type::const_iterator i=function_map.begin();
 //         i!=function_map.end(); ++i)
 //      Assert (n_components == i->second->n_components,

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.