From: wolf Date: Mon, 21 Oct 2002 21:59:15 +0000 (+0000) Subject: Fix has_support_on_face for 3d. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7ac7159c601c59f34c597c2377d94af1c76f2f3e;p=dealii-svn.git Fix has_support_on_face for 3d. git-svn-id: https://svn.dealii.org/trunk@6704 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/source/fe/fe_nedelec.cc b/deal.II/deal.II/source/fe/fe_nedelec.cc index 2dcff50ba8..d80090b99d 100644 --- a/deal.II/deal.II/source/fe/fe_nedelec.cc +++ b/deal.II/deal.II/source/fe/fe_nedelec.cc @@ -1269,18 +1269,41 @@ FE_Nedelec::has_support_on_face (const unsigned int shape_index, { case 1: { - // only on non-adjacent faces - // are the values actually - // zero. list these in a - // table - const unsigned int opposite_faces_2d[GeometryInfo<2>::faces_per_cell] - = { 2, 3, 0, 1}; - const unsigned int opposite_faces_3d[GeometryInfo<3>::faces_per_cell] - = { 1, 0, 4, 5, 2, 3}; switch (dim) { - case 2: return (face_index != opposite_faces_2d[shape_index]); - case 3: return (face_index != opposite_faces_3d[shape_index]); + case 2: + { + // only on the one + // non-adjacent face + // are the values + // actually zero. list + // these in a table + const unsigned int + opposite_faces[GeometryInfo<2>::faces_per_cell] + = { 2, 3, 0, 1}; + + return (face_index != opposite_faces[shape_index]); + }; + + case 3: + { + // the shape functions + // are zero on the two + // faces opposite the + // two faces adjacent + // to the line the + // shape function is + // defined on + const unsigned int + opposite_faces[GeometryInfo<3>::lines_per_cell][2] + = { {1,4}, {1,5}, {1,2}, {1,3}, {0,4}, {1,5}, + {1,2}, {1,3}, {3,4}, {4,5}, {2,5}, {2,3}}; + + return ((face_index != opposite_faces[shape_index][0]) + && + (face_index != opposite_faces[shape_index][1])); + }; + default: Assert (false, ExcNotImplemented()); }; };