From 26c5b4256373351daa3063bf57a57e3bd9c9ec04 Mon Sep 17 00:00:00 2001 From: bangerth Date: Wed, 25 Apr 2012 18:41:25 +0000 Subject: [PATCH] Take over r25444 from branch_cell_fe_operator to avoid a recently added assertion that triggers when using an FEValues object with no quadrature points. git-svn-id: https://svn.dealii.org/trunk@25446 0785d39b-7218-0410-832d-ea1e28bc413d --- .../deal.II/numerics/vectors.templates.h | 24 ++++++++++++------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/deal.II/include/deal.II/numerics/vectors.templates.h b/deal.II/include/deal.II/numerics/vectors.templates.h index 8b3dee4557..f162e74278 100644 --- a/deal.II/include/deal.II/numerics/vectors.templates.h +++ b/deal.II/include/deal.II/numerics/vectors.templates.h @@ -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*> (&cell->get_fe ()) != 0) { typedef FiniteElement FEL; AssertThrow (dynamic_cast*> (&cell->get_fe ()) != 0, - + typename FEL::ExcInterpolationNotImplemented ()); } -- 2.39.5