From: Wolfgang Bangerth Date: Thu, 7 Jan 2010 13:22:34 +0000 (+0000) Subject: Properly size arguments to MGTools::count_dofs_per_block(). X-Git-Tag: v8.0.0~6664 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d8c3495f56b41982a63a40054dfac1a59422caf6;p=dealii.git Properly size arguments to MGTools::count_dofs_per_block(). git-svn-id: https://svn.dealii.org/trunk@20328 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/source/multigrid/mg_transfer_block.cc b/deal.II/deal.II/source/multigrid/mg_transfer_block.cc index 9684b3668c..c2a149d0bb 100644 --- a/deal.II/deal.II/source/multigrid/mg_transfer_block.cc +++ b/deal.II/deal.II/source/multigrid/mg_transfer_block.cc @@ -227,7 +227,8 @@ void MGTransferBlockBase::build_matrices ( mg_block[i] = numbers::invalid_unsigned_int; // Compute the lengths of all blocks - sizes.resize(n_levels); + sizes.clear (); + sizes.resize(n_levels, std::vector(fe.n_blocks())); MGTools::count_dofs_per_block(mg_dof, sizes); // Fill some index vectors