]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Check size, rather than assuming that it is already correct.
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 7 Jan 2010 13:23:34 +0000 (13:23 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 7 Jan 2010 13:23:34 +0000 (13:23 +0000)
git-svn-id: https://svn.dealii.org/trunk@20329 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/source/multigrid/mg_dof_tools.cc

index 62ccc8ae2fa952fe62debcd06e404387e2f1f0d5..316675203b1175335d24667e3f5ac923b20666ff 100644 (file)
@@ -1030,7 +1030,7 @@ MGTools::count_dofs_per_block (
   const unsigned int n_blocks = fe.n_blocks();
   const unsigned int n_levels = dof_handler.get_tria().n_levels();
 
-  dofs_per_block.resize (n_levels);
+  AssertDimension (dofs_per_block.size(), n_levels);
 
   for (unsigned int l=0;l<n_levels;++l)
     std::fill (dofs_per_block[l].begin(), dofs_per_block[l].end(), 0U);

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.