]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Un-transpose matrix again.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Mon, 20 Dec 2010 16:38:36 +0000 (16:38 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Mon, 20 Dec 2010 16:38:36 +0000 (16:38 +0000)
git-svn-id: https://svn.dealii.org/trunk@23028 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/source/fe/mapping_q1.cc

index 9a8485f7223cf370c36a0982e233fe67068983c6..4f2d1af00ba6136d6c59396c5c5239f61ed7b303 100644 (file)
@@ -804,7 +804,14 @@ MappingQ1<dim,spacedim>::fill_fe_values (
                  }
                else
                  {
-                   data.contravariant[point]=transpose(data.contravariant[point]);
+                                                    // temporarily
+                                                    // transpose the
+                                                    // matrix so that
+                                                    // we can refer
+                                                    // to its columns
+                                                    // using a single
+                                                    // index
+                   data.contravariant[point] = transpose(data.contravariant[point]);
 
                                                     // compute the normal
                                                     // vector to this cell
@@ -835,15 +842,20 @@ MappingQ1<dim,spacedim>::fill_fe_values (
                                                     // vectors
                    data.contravariant[point][spacedim-1]
                      /= data.contravariant[point][spacedim-1].norm();
-                   
+
                    if (update_flags & update_normal_vectors)
                      {
                        normal_vectors[point]
                          = data.contravariant[point][spacedim-1];
-                       
+
                        if (cell->direction_flag() == false)
                          normal_vectors[point] *= -1.;
                      }
+
+                                                    // un-transpose
+                                                    // the matrix
+                                                    // again
+                   data.contravariant[point] = transpose(data.contravariant[point]);
                  }
              }
          }
@@ -1065,6 +1077,13 @@ namespace internal
                {
                  Tensor<1,spacedim> cell_normal;
 
+                                                  // temporarily
+                                                  // transpose the
+                                                  // matrix so that
+                                                  // we can refer
+                                                  // to its columns
+                                                  // using a single
+                                                  // index
                  data.contravariant[point] = transpose(data.contravariant[point]);
 
                                                   // compute the normal
@@ -1105,9 +1124,14 @@ namespace internal
                                   data.aux[0][point], cell_normal);
                  else
                    Assert (false, ExcNotImplemented());
+
+                                                  // un-transpose
+                                                  // the matrix
+                                                  // again
+                 data.contravariant[point] = transpose(data.contravariant[point]);
                }
            }
-         
+
 
          if (update_flags & (update_normal_vectors
                              | update_JxW_values))

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.