]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix the cause for a bunch of regressions. Ouch, bad testing...
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Wed, 27 Jun 2007 18:08:36 +0000 (18:08 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Wed, 27 Jun 2007 18:08:36 +0000 (18:08 +0000)
git-svn-id: https://svn.dealii.org/trunk@14819 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/include/dofs/dof_handler.h

index d8480ceb1c550990128e54e5f6f04a6f3c5999cf..6cf0ba08e97c606aa920677113a03cb86d0b3b35 100644 (file)
@@ -1429,10 +1429,32 @@ unsigned int
 DoFHandler<dim>::n_active_fe_indices (const unsigned int obj_level,
                                      const unsigned int obj_index) const
 {
-  Assert (raw_cell_iterator (tria,
-                            obj_level,
-                            obj_index,
-                            this)->used() == true,
+                                  // check that the object we look at is in
+                                  // fact active. the problem is that we have
+                                  // templatized on the dimensionality of the
+                                  // object, so it may be a cell, a face, or
+                                  // a line. we have a bit of trouble doing
+                                  // this all in the generic case, so only
+                                  // check if it is either a cell or a
+                                  // line. the only case this leaves out is
+                                  // faces in 3d -- let's hope that this
+                                  // never is a problem
+  Assert ((dim==structdim
+          ?
+          raw_cell_iterator (tria,
+                             obj_level,
+                             obj_index,
+                             this)->used()
+          :
+          (structdim==1
+           ?
+           raw_line_iterator (tria,
+                              obj_level,
+                              obj_index,
+                              this)->used()
+           :
+           true))
+         == true,
          ExcMessage ("This cell is not active and therefore can't be "
                      "queried for the number of active FE indices"));
   return 1;
@@ -1448,10 +1470,32 @@ DoFHandler<dim>::nth_active_fe_index (const unsigned int obj_level,
                                      const unsigned int obj_index,
                                      const unsigned int n) const
 {
-  Assert (raw_cell_iterator (tria,
-                            obj_level,
-                            obj_index,
-                            this)->used() == true,
+                                  // check that the object we look at is in
+                                  // fact active. the problem is that we have
+                                  // templatized on the dimensionality of the
+                                  // object, so it may be a cell, a face, or
+                                  // a line. we have a bit of trouble doing
+                                  // this all in the generic case, so only
+                                  // check if it is either a cell or a
+                                  // line. the only case this leaves out is
+                                  // faces in 3d -- let's hope that this
+                                  // never is a problem
+  Assert ((dim==structdim
+          ?
+          raw_cell_iterator (tria,
+                             obj_level,
+                             obj_index,
+                             this)->used()
+          :
+          (structdim==1
+           ?
+           raw_line_iterator (tria,
+                              obj_level,
+                              obj_index,
+                              this)->used()
+           :
+           true))
+         == true,
          ExcMessage ("This cell is not active and therefore can't be "
                      "queried for its active FE indices"));
   Assert (n == 0, ExcIndexRange (n, 0, 1));

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.