From: wolf Date: Tue, 22 Oct 2002 15:43:21 +0000 (+0000) Subject: Special-case interior dofs in has_support_on_face. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2ed535ae1d2ae68d7bde25f5890b389c3734915f;p=dealii-svn.git Special-case interior dofs in has_support_on_face. git-svn-id: https://svn.dealii.org/trunk@6718 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/source/fe/fe_q.cc b/deal.II/deal.II/source/fe/fe_q.cc index 68ffba70ac..21d534ddba 100644 --- a/deal.II/deal.II/source/fe/fe_q.cc +++ b/deal.II/deal.II/source/fe/fe_q.cc @@ -1351,6 +1351,15 @@ FE_Q::has_support_on_face (const unsigned int shape_index, else // more dimensions { + // first, special-case interior + // shape functions, since they + // have no support no-where on + // the boundary + if (((dim==2) && (shape_index>=first_quad_index)) + || + ((dim==3) && (shape_index>=first_hex_index))) + return false; + // let's see whether this is a // vertex if (shape_index < first_line_index) @@ -1431,12 +1440,14 @@ FE_Q::has_support_on_face (const unsigned int shape_index, ExcInternalError()); // in 2d, cell bubble are - // zero on all faces - if (dim == 2) - return false; + // zero on all faces. but + // we have treated this + // case above already + Assert (dim != 2, ExcInternalError()); + // in 3d, // quad_index=face_index - else if (dim == 3) + if (dim == 3) return (quad_index == face_index); else Assert (false, ExcNotImplemented()); @@ -1444,13 +1455,18 @@ FE_Q::has_support_on_face (const unsigned int shape_index, else // dof on hex { - Assert (dim == 3, ExcNotImplemented()); - // in 3d, hex dofs are - // bubbles and are zero on - // the boundary + // can only happen in 3d, + // but this case has + // already been covered + // above + Assert (false, ExcNotImplemented()); return false; }; }; + + // we should not have gotten here + Assert (false, ExcInternalError()); + return false; };