From: Wolfgang Bangerth Date: Sat, 18 Feb 2006 01:10:43 +0000 (+0000) Subject: A few more small changes X-Git-Tag: v8.0.0~12273 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1005c27b8c8e89aec6a1998d8580a5ace5a0e4f1;p=dealii.git A few more small changes git-svn-id: https://svn.dealii.org/trunk@12409 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/source/dofs/hp_dof_handler.cc b/deal.II/deal.II/source/dofs/hp_dof_handler.cc index c750866dc4..dd97b36d1c 100644 --- a/deal.II/deal.II/source/dofs/hp_dof_handler.cc +++ b/deal.II/deal.II/source/dofs/hp_dof_handler.cc @@ -1383,8 +1383,9 @@ namespace hp finite_elements = &ff; - // This call ensures, the active_fe_indices - // vectors are initialized correctly. + // This call ensures that the + // active_fe_indices vectors are + // initialized correctly. create_active_fe_table (); reserve_space (); @@ -2147,30 +2148,28 @@ namespace hp template void DoFHandler::create_active_fe_table () { - // Create sufficiently many hpDoFLevels. + // Create sufficiently many hp::DoFLevels. while (levels.size () < tria->n_levels ()) levels.push_back (new internal::hp::DoFLevel); - for (unsigned int i=0; iactive_fe_indices.size () == 0) - { -// The size of "refine_flags" serves as -// the number of cells available on that -// level. The alternative would be to -// implement this method for each dimension. - levels[i]->active_fe_indices.reserve (tria->levels[i]->refine_flags.size ()); - std::fill (levels[i]->active_fe_indices.begin (), - levels[i]->active_fe_indices.end (), - 0); - } + if (levels[level]->active_fe_indices.size () == 0) + levels[level]->active_fe_indices.resize (tria->n_raw_cells(level), + deal_II_numbers::invalid_unsigned_int); else { - // Either the active_fe_indices have size - // zero, or the correct size. Other sizes - // indicate that something went wrong. - Assert (levels[i]->active_fe_indices.size () == - tria->levels[i]->refine_flags.size (), ExcInternalError ()); + // Either the + // active_fe_indices have + // size zero because they + // were just created, or + // the correct + // size. Other sizes + // indicate that + // something went wrong. + Assert (levels[level]->active_fe_indices.size () == + tria->n_raw_cells(level), + ExcInternalError ()); } } }