From: Jean-Paul Pelteret Date: Wed, 16 Aug 2017 08:58:47 +0000 (-0600) Subject: Generalised symmetric tensor double_contract() on number type X-Git-Tag: v9.0.0-rc1~1196^2~9 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=00c269dd4302483df8e0f6c58a40f306ddee1f37;p=dealii.git Generalised symmetric tensor double_contract() on number type --- diff --git a/include/deal.II/base/symmetric_tensor.h b/include/deal.II/base/symmetric_tensor.h index 30efc6685f..510fc2c91f 100644 --- a/include/deal.II/base/symmetric_tensor.h +++ b/include/deal.II/base/symmetric_tensor.h @@ -3594,12 +3594,12 @@ scalar_product (const Tensor<2,dim,Number> &t1, * @related SymmetricTensor * @author Wolfgang Bangerth, 2005 */ -template +template inline void -double_contract (SymmetricTensor<2,1,Number> &tmp, - const SymmetricTensor<4,1,Number> &t, - const SymmetricTensor<2,1,Number> &s) +double_contract (SymmetricTensor<2,1,typename ProductType::type> &tmp, + const SymmetricTensor<4,1,Number> &t, + const SymmetricTensor<2,1,OtherNumber> &s) { tmp[0][0] = t[0][0][0][0] * s[0][0]; } @@ -3621,12 +3621,12 @@ double_contract (SymmetricTensor<2,1,Number> &tmp, * @related SymmetricTensor * @author Wolfgang Bangerth, 2005 */ -template +template inline void -double_contract (SymmetricTensor<2,1,Number> &tmp, - const SymmetricTensor<2,1,Number> &s, - const SymmetricTensor<4,1,Number> &t) +double_contract (SymmetricTensor<2,1,typename ProductType::type> &tmp, + const SymmetricTensor<2,1,Number> &s, + const SymmetricTensor<4,1,OtherNumber> &t) { tmp[0][0] = t[0][0][0][0] * s[0][0]; } @@ -3647,12 +3647,12 @@ double_contract (SymmetricTensor<2,1,Number> &tmp, * * @related SymmetricTensor @author Wolfgang Bangerth, 2005 */ -template +template inline void -double_contract (SymmetricTensor<2,2,Number> &tmp, - const SymmetricTensor<4,2,Number> &t, - const SymmetricTensor<2,2,Number> &s) +double_contract (SymmetricTensor<2,2,typename ProductType::type> &tmp, + const SymmetricTensor<4,2,Number> &t, + const SymmetricTensor<2,2,OtherNumber> &s) { const unsigned int dim = 2; @@ -3680,12 +3680,12 @@ double_contract (SymmetricTensor<2,2,Number> &tmp, * @related SymmetricTensor * @author Wolfgang Bangerth, 2005 */ -template +template inline void -double_contract (SymmetricTensor<2,2,Number> &tmp, - const SymmetricTensor<2,2,Number> &s, - const SymmetricTensor<4,2,Number> &t) +double_contract (SymmetricTensor<2,2,typename ProductType::type> &tmp, + const SymmetricTensor<2,2,Number> &s, + const SymmetricTensor<4,2,OtherNumber> &t) { const unsigned int dim = 2; @@ -3713,12 +3713,12 @@ double_contract (SymmetricTensor<2,2,Number> &tmp, * @related SymmetricTensor * @author Wolfgang Bangerth, 2005 */ -template +template inline void -double_contract (SymmetricTensor<2,3,Number> &tmp, - const SymmetricTensor<4,3,Number> &t, - const SymmetricTensor<2,3,Number> &s) +double_contract (SymmetricTensor<2,3,typename ProductType::type> &tmp, + const SymmetricTensor<4,3,Number> &t, + const SymmetricTensor<2,3,OtherNumber> &s) { const unsigned int dim = 3; @@ -3749,12 +3749,12 @@ double_contract (SymmetricTensor<2,3,Number> &tmp, * @related SymmetricTensor * @author Wolfgang Bangerth, 2005 */ -template +template inline void -double_contract (SymmetricTensor<2,3,Number> &tmp, - const SymmetricTensor<2,3,Number> &s, - const SymmetricTensor<4,3,Number> &t) +double_contract (SymmetricTensor<2,3,typename ProductType::type> &tmp, + const SymmetricTensor<2,3,Number> &s, + const SymmetricTensor<4,3,OtherNumber> &t) { const unsigned int dim = 3;