]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Set variable to correct size before passing to DoFTools::count_dofs_per_component.
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 10 Feb 2009 16:35:19 +0000 (16:35 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 10 Feb 2009 16:35:19 +0000 (16:35 +0000)
git-svn-id: https://svn.dealii.org/trunk@18351 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/source/multigrid/mg_transfer_component.cc

index 96eb06b3f00cf42721b34be674d6178e40b8d699..bb33f0689de45231e0f1961d7a422ad55aa127b5 100644 (file)
@@ -2,7 +2,7 @@
 //    $Id$
 //    Version: $Name$
 //
-//    Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 by the deal.II authors
+//    Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 by the deal.II authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
@@ -112,7 +112,8 @@ void MGTransferComponentBase::build_matrices (
        }
     }
 
-  component_start.resize(target_component.size());
+  component_start.resize(*std::max_element (target_component.begin(),
+                                           target_component.end()) + 1);
   DoFTools::
     count_dofs_per_component (static_cast<const DoFHandler<dim,spacedim>&>(mg_dof),
                               component_start, true, target_component);

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.