]> https://gitweb.dealii.org/ - dealii.git/commitdiff
tensor.h: Remove specializations of determinant
authorMatthias Maier <tamiko@43-1.org>
Tue, 15 Sep 2015 03:05:54 +0000 (22:05 -0500)
committerMatthias Maier <tamiko@43-1.org>
Tue, 15 Sep 2015 18:28:13 +0000 (13:28 -0500)
include/deal.II/base/tensor.h

index eb7bc279d11a0531c59bd0c75bad9191b764c6ac..ee4159d7af76057cd3cb7bff6b45f8e43520c8cd 100644 (file)
@@ -2117,47 +2117,6 @@ cross_product (const Tensor<1,dim,Number> &src1,
 //@{
 
 
-/**
- * Compute the determinant of a tensor or rank 2, here for <tt>dim==2</tt>.
- *
- * @relates Tensor
- * @author Wolfgang Bangerth, 1998
- */
-template <typename Number>
-inline
-Number determinant (const Tensor<2,2,Number> &t)
-{
-  return ((t[0][0] * t[1][1]) - (t[1][0] * t[0][1]));
-}
-
-
-/**
- * Compute the determinant of a tensor or rank 2, here for <tt>dim==3</tt>.
- *
- * @relates Tensor
- * @author Wolfgang Bangerth, 1998
- */
-template <typename Number>
-inline
-Number determinant (const Tensor<2,3,Number> &t)
-{
-  // use exactly the same expression with the
-  // same order of operations as for the inverse
-  // to let the compiler use common
-  // subexpression elimination when using
-  // determinant and inverse in nearby code
-  const Number t4 = t[0][0]*t[1][1],
-               t6 = t[0][0]*t[1][2],
-               t8 = t[0][1]*t[1][0],
-               t00 = t[0][2]*t[1][0],
-               t01 = t[0][1]*t[2][0],
-               t04 = t[0][2]*t[2][0],
-               det = (t4*t[2][2]-t6*t[2][1]-t8*t[2][2]+
-                      t00*t[2][1]+t01*t[1][2]-t04*t[1][1]);
-  return det;
-}
-
-
 /**
  * Compute the determinant of a tensor or rank 2.
  *
@@ -2199,7 +2158,6 @@ Number determinant (const Tensor<2,1,Number> &t)
 #endif
 
 
-
 /**
  * Compute and return the trace of a tensor of rank 2, i.e. the sum of its
  * diagonal entries.

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.