From 79e3d416e84c56a7e783a36ee575817a35a5481c Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Mon, 14 Sep 2015 22:05:54 -0500 Subject: [PATCH] tensor.h: Remove specializations of determinant --- include/deal.II/base/tensor.h | 42 ----------------------------------- 1 file changed, 42 deletions(-) diff --git a/include/deal.II/base/tensor.h b/include/deal.II/base/tensor.h index eb7bc279d1..ee4159d7af 100644 --- a/include/deal.II/base/tensor.h +++ b/include/deal.II/base/tensor.h @@ -2117,47 +2117,6 @@ cross_product (const Tensor<1,dim,Number> &src1, //@{ -/** - * Compute the determinant of a tensor or rank 2, here for dim==2. - * - * @relates Tensor - * @author Wolfgang Bangerth, 1998 - */ -template -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 dim==3. - * - * @relates Tensor - * @author Wolfgang Bangerth, 1998 - */ -template -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. -- 2.39.5