From: Jean-Paul Pelteret Date: Fri, 17 Nov 2017 08:09:32 +0000 (+0100) Subject: Remove redundant specializations of scalar_product for Sacado numbers X-Git-Tag: v9.0.0-rc1~746^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=023382aa1889656cbe878911603a3f74834feac9;p=dealii.git Remove redundant specializations of scalar_product for Sacado numbers --- diff --git a/doc/news/changes/minor/20171117Jean-PaulPelteret b/doc/news/changes/minor/20171117Jean-PaulPelteret new file mode 100644 index 0000000000..320ed0f0de --- /dev/null +++ b/doc/news/changes/minor/20171117Jean-PaulPelteret @@ -0,0 +1,4 @@ +Changed: The specializations of the scalar_product function for Sacado::Fad::DFad +numbers were redundant and have been removed. +
+(Jean-Paul Pelteret, 2017/11/17) diff --git a/include/deal.II/differentiation/ad/sacado_product_types.h b/include/deal.II/differentiation/ad/sacado_product_types.h index 756c53d571..1de5c40488 100644 --- a/include/deal.II/differentiation/ad/sacado_product_types.h +++ b/include/deal.II/differentiation/ad/sacado_product_types.h @@ -218,90 +218,6 @@ struct EnableIfScalar > }; - -/** - * Compute the scalar product $a:b=\sum_{i,j} a_{ij}b_{ij}$ between two - * tensors $a,b$ of rank 2. We don't use operator* for this - * operation since the product between two tensors is usually assumed to be - * the contraction over the last index of the first tensor and the first index - * of the second tensor, for example $(a\cdot b)_{ij}=\sum_k a_{ik}b_{kj}$. - * - * @relates Tensor @relates SymmetricTensor - */ -template -inline -Sacado::Fad::DFad -scalar_product (const SymmetricTensor<2,dim,Sacado::Fad::DFad > &t1, - const Tensor<2,dim,Number> &t2) -{ - Sacado::Fad::DFad s = 0; - for (unsigned int i=0; ioperator* for this - * operation since the product between two tensors is usually assumed to be - * the contraction over the last index of the first tensor and the first index - * of the second tensor, for example $(a\cdot b)_{ij}=\sum_k a_{ik}b_{kj}$. - * - * @relates Tensor @relates SymmetricTensor - */ -template -inline -Sacado::Fad::DFad -scalar_product (const Tensor<2,dim,Number> &t1, - const SymmetricTensor<2,dim,Sacado::Fad::DFad > &t2) -{ - return scalar_product(t2, t1); -} - - -/** - * Compute the scalar product $a:b=\sum_{i,j} a_{ij}b_{ij}$ between two - * tensors $a,b$ of rank 2. We don't use operator* for this - * operation since the product between two tensors is usually assumed to be - * the contraction over the last index of the first tensor and the first index - * of the second tensor, for example $(a\cdot b)_{ij}=\sum_k a_{ik}b_{kj}$. - * - * @relates Tensor @relates SymmetricTensor - */ -template -inline -Sacado::Fad::DFad -scalar_product (const SymmetricTensor<2,dim,Number> &t1, - const Tensor<2,dim,Sacado::Fad::DFad > &t2) -{ - Sacado::Fad::DFad s = 0; - for (unsigned int i=0; ioperator* for this - * operation since the product between two tensors is usually assumed to be - * the contraction over the last index of the first tensor and the first index - * of the second tensor, for example $(a\cdot b)_{ij}=\sum_k a_{ik}b_{kj}$. - * - * @relates Tensor @relates SymmetricTensor - */ -template -inline -Sacado::Fad::DFad -scalar_product (const Tensor<2,dim,Sacado::Fad::DFad > &t1, - const SymmetricTensor<2,dim,Number> &t2) -{ - return scalar_product(t2, t1); -} - DEAL_II_NAMESPACE_CLOSE #endif // DEAL_II_WITH_TRILINOS