]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Make a couple things compile for 1d face quadrature as well.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Fri, 12 Aug 2011 20:55:03 +0000 (20:55 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Fri, 12 Aug 2011 20:55:03 +0000 (20:55 +0000)
git-svn-id: https://svn.dealii.org/trunk@24051 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/source/base/quadrature.cc

index 4b8a0210b40e9b1c71702cafdf2b7e9b72ce7d34..1925c7e146d1991963cc050d751f65adab643759 100644 (file)
@@ -43,7 +43,7 @@ namespace
 template <>
 Quadrature<0>::Quadrature (const unsigned int n_q)
                :
-               quadrature_points (n_q, Point<0>()),
+               quadrature_points (n_q),
                weights (n_q, 0)
 {}
 
@@ -1094,36 +1094,9 @@ face (const unsigned int face_no,
       const bool         face_rotation,
       const unsigned int n_quadrature_points)
 {
-  Assert (dim != 1, ExcInternalError());
   Assert (face_no < GeometryInfo<dim>::faces_per_cell,
           ExcInternalError());
 
-                                  // in 3d, we have to account for faces that
-                                  // have non-standard face orientation, flip
-                                  // and rotation. thus, we have to store
-                                  // _eight_ data sets per face or subface
-
-                                  // set up a table with the according offsets
-                                  // for non-standard orientation, first index:
-                                  // face_orientation (standard true=1), second
-                                  // index: face_flip (standard false=0), third
-                                  // index: face_rotation (standard false=0)
-                                  //
-                                  // note, that normally we should use the
-                                  // obvious offsets 0,1,2,3,4,5,6,7. However,
-                                  // prior to the changes enabling flipped and
-                                  // rotated faces, in many places of the
-                                  // library the convention was used, that the
-                                  // first dataset with offset 0 corresponds to
-                                  // a face in standard orientation. therefore
-                                  // we use the offsets 4,5,6,7,0,1,2,3 here to
-                                  // stick to that (implicit) convention
-  static const unsigned int offset[2][2][2]=
-    {{{4*GeometryInfo<dim>::faces_per_cell, 5*GeometryInfo<dim>::faces_per_cell},    // face_orientation=false; face_flip=false; face_rotation=false and true
-      {6*GeometryInfo<dim>::faces_per_cell, 7*GeometryInfo<dim>::faces_per_cell}},   // face_orientation=false; face_flip=true;  face_rotation=false and true
-     {{0*GeometryInfo<dim>::faces_per_cell, 1*GeometryInfo<dim>::faces_per_cell},    // face_orientation=true;  face_flip=false; face_rotation=false and true
-      {2*GeometryInfo<dim>::faces_per_cell, 3*GeometryInfo<dim>::faces_per_cell}}};  // face_orientation=true;  face_flip=true;  face_rotation=false and true
-
   switch (dim)
     {
       case 1:
@@ -1132,10 +1105,38 @@ face (const unsigned int face_no,
 
 
       case 3:
-            return ((face_no
-                    + offset[face_orientation][face_flip][face_rotation])
-                   * n_quadrature_points);
-
+      {
+       // in 3d, we have to account for faces that
+       // have non-standard face orientation, flip
+       // and rotation. thus, we have to store
+       // _eight_ data sets per face or subface
+
+        // set up a table with the according offsets
+        // for non-standard orientation, first index:
+        // face_orientation (standard true=1), second
+        // index: face_flip (standard false=0), third
+        // index: face_rotation (standard false=0)
+        //
+        // note, that normally we should use the
+        // obvious offsets 0,1,2,3,4,5,6,7. However,
+        // prior to the changes enabling flipped and
+        // rotated faces, in many places of the
+        // library the convention was used, that the
+        // first dataset with offset 0 corresponds to
+        // a face in standard orientation. therefore
+        // we use the offsets 4,5,6,7,0,1,2,3 here to
+        // stick to that (implicit) convention
+        static const unsigned int offset[2][2][2]=
+        {{{4*GeometryInfo<dim>::faces_per_cell, 5*GeometryInfo<dim>::faces_per_cell},    // face_orientation=false; face_flip=false; face_rotation=false and true
+       {6*GeometryInfo<dim>::faces_per_cell, 7*GeometryInfo<dim>::faces_per_cell}},   // face_orientation=false; face_flip=true;  face_rotation=false and true
+       {{0*GeometryInfo<dim>::faces_per_cell, 1*GeometryInfo<dim>::faces_per_cell},    // face_orientation=true;  face_flip=false; face_rotation=false and true
+       {2*GeometryInfo<dim>::faces_per_cell, 3*GeometryInfo<dim>::faces_per_cell}}};  // face_orientation=true;  face_flip=true;  face_rotation=false and true
+
+        return ((face_no
+                 + offset[face_orientation][face_flip][face_rotation])
+               * n_quadrature_points);
+      }
+      
       default:
             Assert (false, ExcInternalError());
     }

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.