]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Fix has_support_on_face for 3d.
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 21 Oct 2002 21:59:15 +0000 (21:59 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 21 Oct 2002 21:59:15 +0000 (21:59 +0000)
git-svn-id: https://svn.dealii.org/trunk@6704 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/source/fe/fe_nedelec.cc

index 2dcff50ba819bc9d35925e72d23dc75287583c5c..d80090b99dc1ab8ffe49cc4a09b32b74c906d44a 100644 (file)
@@ -1269,18 +1269,41 @@ FE_Nedelec<dim>::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());
           };
       };

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.