From: bangerth Date: Tue, 10 Feb 2009 16:35:19 +0000 (+0000) Subject: Set variable to correct size before passing to DoFTools::count_dofs_per_component. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3ef3de46175b371c1bb543cea83cb0e17145bf6c;p=dealii-svn.git Set variable to correct size before passing to DoFTools::count_dofs_per_component. git-svn-id: https://svn.dealii.org/trunk@18351 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/source/multigrid/mg_transfer_component.cc b/deal.II/deal.II/source/multigrid/mg_transfer_component.cc index 96eb06b3f0..bb33f0689d 100644 --- a/deal.II/deal.II/source/multigrid/mg_transfer_component.cc +++ b/deal.II/deal.II/source/multigrid/mg_transfer_component.cc @@ -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&>(mg_dof), component_start, true, target_component);