]> https://gitweb.dealii.org/ - dealii.git/commitdiff
A few more small changes
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Sat, 18 Feb 2006 01:10:43 +0000 (01:10 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Sat, 18 Feb 2006 01:10:43 +0000 (01:10 +0000)
git-svn-id: https://svn.dealii.org/trunk@12409 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/source/dofs/hp_dof_handler.cc

index c750866dc4e67c8081f51c455500d930b0fe6255..dd97b36d1c3b2a66423981202aad08ef125ab0e2 100644 (file)
@@ -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 <int dim>
   void DoFHandler<dim>::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<dim>);
 
-    for (unsigned int i=0; i<levels.size(); ++i)
+    for (unsigned int level=0; level<levels.size(); ++level)
       {
-        if (levels[i]->active_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 ());
           }
       }
   }

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.