]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Simplify code some more.
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 15 Dec 2010 15:37:41 +0000 (15:37 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 15 Dec 2010 15:37:41 +0000 (15:37 +0000)
git-svn-id: https://svn.dealii.org/trunk@22968 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/source/fe/mapping_q1.cc

index d272ec851597155fed8c14df4e7b110ae23fb138..376d74f1744038bb146993881daf2f9762743dfc 100644 (file)
@@ -995,11 +995,22 @@ namespace internal
            Assert (JxW_values.size() == n_q_points,
                    ExcDimensionMismatch(JxW_values.size(), n_q_points));
 
-         mapping.transform (data.unit_tangentials[face_no],
-                            data.aux[0],
-                            data,
-                            mapping_contravariant);
-
+                                          // map the unit tangentials to the real cell
+         for (unsigned int d=0; d<dim-1; ++d)
+           {
+             Assert (face_no+GeometryInfo<dim>::faces_per_cell*d <
+                     data.unit_tangentials.size(),
+                     ExcInternalError());
+             Assert (data.aux[d].size() <=
+                     data.unit_tangentials[face_no+GeometryInfo<dim>::faces_per_cell*d].size(),
+                     ExcInternalError());
+             
+             mapping.transform (data.unit_tangentials[face_no+GeometryInfo<dim>::faces_per_cell*d],
+                                data.aux[d],
+                                data,
+                                mapping_contravariant);
+           }
+         
          switch (dim)
            {
              case 2:
@@ -1011,19 +1022,8 @@ namespace internal
 
              case 3:
              {
-               Assert (face_no+GeometryInfo<dim>::faces_per_cell <
-                       data.unit_tangentials.size(),
-                       ExcInternalError());
-               Assert (data.aux[1].size() <=
-                       data.unit_tangentials[face_no+GeometryInfo<dim>::faces_per_cell].size(),
-                       ExcInternalError());
-               mapping.transform (data.unit_tangentials[face_no+GeometryInfo<dim>::faces_per_cell],
-                                  data.aux[1],
-                                  data,
-                                  mapping_contravariant);
                for (unsigned int i=0; i<n_q_points; ++i)
                  cross_product (boundary_forms[i], data.aux[0][i], data.aux[1][i]);
-
                break;
              }
 

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.