]> https://gitweb.dealii.org/ - dealii.git/commitdiff
It is now necessary to initialize an output array. Do so.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Thu, 7 Jan 2010 11:20:05 +0000 (11:20 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Thu, 7 Jan 2010 11:20:05 +0000 (11:20 +0000)
git-svn-id: https://svn.dealii.org/trunk@20326 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/source/dofs/block_info.cc

index 60cb4ab05f6f6724778b8a4e877a1a0a06e936d3..fcbdfef5c3266e0ae7c12d9a1abc00b04ef17115 100644 (file)
@@ -2,7 +2,7 @@
 //    $Id$
 //    Version: $Name$
 //
-//    Copyright (C) 2009 by the deal.II authors
+//    Copyright (C) 2009, 2010 by the deal.II authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
@@ -42,10 +42,10 @@ BlockInfo::initialize_local(const DoFHandler<dim, spacedim>& dof)
   std::vector<unsigned int> sizes(fe.n_blocks());
 
   base_elements.resize(fe.n_blocks());
-  
+
   for (unsigned int i=0;i<base_elements.size();++i)
     base_elements[i] = fe.block_to_base_index(i).first;
-  
+
   local_renumbering.resize(fe.n_dofs_per_cell());
   FETools::compute_block_renumbering(fe,
                                     local_renumbering,
@@ -59,10 +59,12 @@ void
 BlockInfo::initialize(const MGDoFHandler<dim, spacedim>& dof)
 {
   initialize((DoFHandler<dim, spacedim>&) dof);
-  
-  std::vector<std::vector<unsigned int> > sizes;
+
+  std::vector<std::vector<unsigned int> > sizes (dof.get_tria().n_levels());
+  for (unsigned int i=0; i<sizes.size(); ++i)
+    sizes[i].resize (dof.get_fe().n_blocks());
   MGTools::count_dofs_per_block(dof, sizes);
-  
+
   levels.resize(sizes.size());
   for (unsigned int i=0;i<sizes.size();++i)
     levels[i].reinit(sizes[i]);

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.