]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Improve in-code documentation of SymmetricTensor<2,3> inverse. 7209/head
authorJean-Paul Pelteret <jppelteret@gmail.com>
Tue, 18 Sep 2018 12:59:32 +0000 (14:59 +0200)
committerJean-Paul Pelteret <jppelteret@gmail.com>
Tue, 18 Sep 2018 12:59:32 +0000 (14:59 +0200)
include/deal.II/base/symmetric_tensor.h

index 634c36ceac807cb08967654b5df5cf0d3b186ac6..64e4105f8222e637d061296c0802be6de5475ef6 100644 (file)
@@ -1227,21 +1227,38 @@ namespace internal
 
         // Sympy result: ([
         // [  (t11*t22 - t12**2)/(t00*t11*t22 - t00*t12**2 - t01**2*t22 +
-        // 2*t01*t02*t12 - t02**2*t11),
+        //                        2*t01*t02*t12 - t02**2*t11),
         //    (-t01*t22 + t02*t12)/(t00*t11*t22 - t00*t12**2 - t01**2*t22 +
-        //    2*t01*t02*t12 - t02**2*t11), (t01*t12 - t02*t11)/(t00*t11*t22 -
-        //    t00*t12**2 - t01**2*t22 + 2*t01*t02*t12 - t02**2*t11)],
+        //                          2*t01*t02*t12 - t02**2*t11),
+        //    (t01*t12 - t02*t11)/(t00*t11*t22 -  t00*t12**2 - t01**2*t22 +
+        //                         2*t01*t02*t12 - t02**2*t11)],
         // [  (-t01*t22 + t02*t12)/(t00*t11*t22 - t00*t12**2 - t01**2*t22 +
-        // 2*t01*t02*t12 - t02**2*t11),
+        //                          2*t01*t02*t12 - t02**2*t11),
         //    (t00*t22 - t02**2)/(t00*t11*t22 - t00*t12**2 - t01**2*t22 +
-        //    2*t01*t02*t12 - t02**2*t11), (t00*t12 - t01*t02)/(-t00*t11*t22 +
-        //    t00*t12**2 + t01**2*t22 - 2*t01*t02*t12 + t02**2*t11)],
+        //                        2*t01*t02*t12 - t02**2*t11),
+        //    (t00*t12 - t01*t02)/(-t00*t11*t22 + t00*t12**2 + t01**2*t22 -
+        //                         2*t01*t02*t12 + t02**2*t11)],
         // [  (t01*t12 - t02*t11)/(t00*t11*t22 - t00*t12**2 - t01**2*t22 +
-        // 2*t01*t02*t12 - t02**2*t11),
+        //                         2*t01*t02*t12 - t02**2*t11),
         //    (t00*t12 - t01*t02)/(-t00*t11*t22 + t00*t12**2 + t01**2*t22 -
-        //    2*t01*t02*t12 + t02**2*t11),
+        //                         2*t01*t02*t12 + t02**2*t11),
         //    (-t00*t11 + t01**2)/(-t00*t11*t22 + t00*t12**2 + t01**2*t22 -
-        //    2*t01*t02*t12 + t02**2*t11)]  ])
+        //                         2*t01*t02*t12 + t02**2*t11)]  ])
+        //
+        // =
+        //
+        // [  (t11*t22 - t12**2)/det_t,
+        //    (-t01*t22 + t02*t12)/det_t,
+        //    (t01*t12 - t02*t11)/det_t],
+        // [  (-t01*t22 + t02*t12)/det_t,
+        //    (t00*t22 - t02**2)/det_t,
+        //    (-t00*t12 + t01*t02)/det_t],
+        // [  (t01*t12 - t02*t11)/det_t,
+        //    (-t00*t12 + t01*t02)/det_t,
+        //    (t00*t11 - t01**2)/det_t]   ])
+        //
+        // with det_t = (t00*t11*t22 - t00*t12**2 - t01**2*t22 +
+        //               2*t01*t02*t12 - t02**2*t11)
         const TableIndices<2> idx_00(0, 0);
         const TableIndices<2> idx_01(0, 1);
         const TableIndices<2> idx_02(0, 2);

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.