]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Two tensors in measure() changed to const. 2726/head
authorSAM COX <spc29@le.ac.uk>
Tue, 28 Jun 2016 05:47:44 +0000 (22:47 -0700)
committerSAM COX <spc29@le.ac.uk>
Tue, 28 Jun 2016 16:56:19 +0000 (09:56 -0700)
source/grid/tria_accessor.cc

index a4ada476cd1438ecbf95f71a3d7ab6938fbef8d0..594fede818ae96a2848f30f195b0de8aa717a105 100644 (file)
@@ -981,7 +981,7 @@ namespace
     const Tensor<1,3> v01 = accessor.vertex(1) - accessor.vertex(0);
     const Tensor<1,3> v02 = accessor.vertex(2) - accessor.vertex(0);
 
-    Tensor<1,3> normal = cross_product_3d(v01, v02);
+    const Tensor<1,3> normal = cross_product_3d(v01, v02);
 
     const Tensor<1,3> v03 = accessor.vertex(3) - accessor.vertex(0);
 
@@ -1003,7 +1003,7 @@ namespace
     // the face is planar. then its area is 1/2 of the norm of the
     // cross product of the two diagonals
     const Tensor<1,3> v12 = accessor.vertex(2) - accessor.vertex(1);
-    Tensor<1,3> twice_area = cross_product_3d(v03, v12);
+    const Tensor<1,3> twice_area = cross_product_3d(v03, v12);
     return 0.5 * twice_area.norm();
   }
 

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.