]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Do the right thing in 1d for has_support_on_face also for FE_DGQ
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 13 Jun 2002 13:35:34 +0000 (13:35 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 13 Jun 2002 13:35:34 +0000 (13:35 +0000)
git-svn-id: https://svn.dealii.org/trunk@6096 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/source/fe/fe_dgq.cc
deal.II/doc/news/2002/c-3-4.html

index 01dab334a3b578a5af74afff754b018f351df095..af9b968ecf5ae1980ce838b11a62b5a20c816f79 100644 (file)
@@ -627,10 +627,19 @@ FE_DGQ<dim>::has_support_on_face (const unsigned int shape_index,
   switch (dim)
     {
       case 1:
-                                        // This is not correct, but it
-                                        // should not matter in 1D.
-       return true;
+      {
+                                        // in 1d, things are simple. since
+                                        // there is only one degree of
+                                        // freedom per vertex in this
+                                        // class, the first is on vertex 0
+                                        // (==face 0 in some sense), the
+                                        // second on face 1:
+       return (((shape_index == 0) && (face_index == 0)) ||
+               ((shape_index == 1) && (face_index == 1)));
+      };
+      
       case 2:
+      {
        if (face_index==0 && shape_index < n)
          return true;
        if (face_index==1 && (shape_index % n) == degree)
@@ -640,31 +649,35 @@ FE_DGQ<dim>::has_support_on_face (const unsigned int shape_index,
        if (face_index==3 && (shape_index % n) == 0)
          return true;
        return false;
+      };
+      
       case 3:
-       if (true)
-         {
-           const unsigned int in2 = shape_index % n2;
-           
-                                            // y=0
-           if (face_index==0 && in2 < n )
-             return true;
-                                            // y=1
-           if (face_index==1 && in2 >= n2-n)
-             return true;
-                                            // z=0
-           if (face_index==2 && shape_index < n2)
-             return true;
-                                            // x=1
-           if (face_index==3 && (shape_index % n) == n-1)
-             return true;
-                                            // z=1
-           if (face_index==4 && shape_index >= dofs_per_cell - n2)
-             return true;
-                                            // x=0
-           if (face_index==5 && (shape_index % n) == 0)
-             return true;
-           return false;
-         }
+      {
+       const unsigned int in2 = shape_index % n2;
+       
+                                        // y=0
+       if (face_index==0 && in2 < n )
+         return true;
+                                        // y=1
+       if (face_index==1 && in2 >= n2-n)
+         return true;
+                                        // z=0
+       if (face_index==2 && shape_index < n2)
+         return true;
+                                        // x=1
+       if (face_index==3 && (shape_index % n) == n-1)
+         return true;
+                                        // z=1
+       if (face_index==4 && shape_index >= dofs_per_cell - n2)
+         return true;
+                                        // x=0
+       if (face_index==5 && (shape_index % n) == 0)
+         return true;
+       return false;
+      };
+
+      default:
+           Assert (false, ExcNotImplemented());
     }
   return true;
 }
index 30dbab888e8bd73717d4947b257fd5e4240f6f7e..4ccf3a98b6cac3c6e0ec5e52035962bc350a4d43 100644 (file)
@@ -109,7 +109,9 @@ contributor's names are abbreviated by WB (Wolfgang Bangerth), GK
        class="member">FE_Q::has_support_on_face</code> always returned
        true in 1d, partly because faces are not really an issue in
        1d. It now does so only when the support point of the
-       respective shape function is actually the requested vertex.
+       respective shape function is actually the requested vertex. The
+       same applied to <code
+       class="member">FE_DGQ::has_support_on_face</code>
        <br>
        (WB 2002/06/13)
        </p>

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.