]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Take over r25444 from branch_cell_fe_operator to avoid a recently added assertion...
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 25 Apr 2012 18:41:25 +0000 (18:41 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 25 Apr 2012 18:41:25 +0000 (18:41 +0000)
git-svn-id: https://svn.dealii.org/trunk@25446 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/include/deal.II/numerics/vectors.templates.h

index 8b3dee4557907f9a803ab5eab944d7557e7cbc1c..f162e7427838a202b949be63571806926b3be668 100644 (file)
@@ -1641,13 +1641,21 @@ namespace VectorTools
                                           "elements"));
                 }
 
-              typename DH::face_iterator face = cell->face(face_no);
-
-                                               // cast the face iterator to a DoFHandler
-                                               // iterator so that we can access the boundary
-                                               // indicators
+              const typename DH::face_iterator face = cell->face(face_no);
               const types::boundary_id_t boundary_component = face->boundary_indicator();
-              if (function_map.find(boundary_component) != function_map.end())
+
+                                              // see if this face is
+                                              // part of the
+                                              // boundaries for which
+                                              // we are supposed to
+                                              // do something, and
+                                              // also see if the
+                                              // finite element in
+                                              // use here has DoFs on
+                                              // the face at all
+              if ((function_map.find(boundary_component) != function_map.end())
+                 &&
+                 (cell->get_fe().dofs_per_face > 0))
                 {
                                                    // face is of the right component
                   x_fe_values.reinit(cell, face_no);
@@ -2818,7 +2826,7 @@ namespace VectorTools
                                  + jacobians[q_point][1][face_coordinate_direction[face]]
                                  * jacobians[q_point][1][face_coordinate_direction[face]]);
               }
-            
+
             break;
           }
 
@@ -3143,7 +3151,7 @@ namespace VectorTools
                     if (dynamic_cast<const FESystem<dim>*> (&cell->get_fe ()) != 0) {
                       typedef FiniteElement<dim> FEL;
                       AssertThrow (dynamic_cast<const FE_Nedelec<dim>*> (&cell->get_fe ()) != 0,
-                      
+
                                    typename FEL::ExcInterpolationNotImplemented ());
                     }
 

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.