From: hartmann Date: Thu, 25 Aug 2005 07:40:02 +0000 (+0000) Subject: templatize determinant. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b9b010eed3e6ef5559b442f86e7a1d42cf84fc56;p=dealii-svn.git templatize determinant. git-svn-id: https://svn.dealii.org/trunk@11322 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/base/include/base/symmetric_tensor.h b/deal.II/base/include/base/symmetric_tensor.h index 966fab7240..e4ab36822c 100644 --- a/deal.II/base/include/base/symmetric_tensor.h +++ b/deal.II/base/include/base/symmetric_tensor.h @@ -28,6 +28,8 @@ template double trace (const SymmetricTensor<2,dim2> &); template SymmetricTensor<2,dim> deviator (const SymmetricTensor<2,dim> &); +template double +determinant (const SymmetricTensor<2,dim> &); namespace internal @@ -889,11 +891,8 @@ class SymmetricTensor template friend double trace (const SymmetricTensor<2,dim2> &d); - friend double determinant (const SymmetricTensor<2,1> &t); - - friend double determinant (const SymmetricTensor<2,2> &t); - - friend double determinant (const SymmetricTensor<2,3> &t); + template + friend double determinant (const SymmetricTensor<2,dim2> &t); template friend SymmetricTensor<2,dim2> @@ -1899,6 +1898,7 @@ SymmetricTensor<4,3>::norm () const * @relates SymmetricTensor * @author Wolfgang Bangerth, 2005 */ +template <> inline double determinant (const SymmetricTensor<2,1> &t) { @@ -1917,6 +1917,7 @@ double determinant (const SymmetricTensor<2,1> &t) * @relates SymmetricTensor * @author Wolfgang Bangerth, 2005 */ +template <> inline double determinant (const SymmetricTensor<2,2> &t) { @@ -1936,6 +1937,7 @@ double determinant (const SymmetricTensor<2,2> &t) * @relates SymmetricTensor * @author Wolfgang Bangerth, 2005 */ +template <> inline double determinant (const SymmetricTensor<2,3> &t) {