};
-
-/**
- * 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 <code>operator*</code> 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 <int dim, typename Number, typename T>
-inline
-Sacado::Fad::DFad<T>
-scalar_product (const SymmetricTensor<2,dim,Sacado::Fad::DFad<T> > &t1,
- const Tensor<2,dim,Number> &t2)
-{
- Sacado::Fad::DFad<T> s = 0;
- for (unsigned int i=0; i<dim; ++i)
- for (unsigned int j=0; j<dim; ++j)
- s += t1[i][j] * t2[i][j];
- return s;
-}
-
-
-/**
- * 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 <code>operator*</code> 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 <int dim, typename Number, typename T >
-inline
-Sacado::Fad::DFad<T>
-scalar_product (const Tensor<2,dim,Number> &t1,
- const SymmetricTensor<2,dim,Sacado::Fad::DFad<T> > &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 <code>operator*</code> 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 <int dim, typename Number, typename T>
-inline
-Sacado::Fad::DFad<T>
-scalar_product (const SymmetricTensor<2,dim,Number> &t1,
- const Tensor<2,dim,Sacado::Fad::DFad<T> > &t2)
-{
- Sacado::Fad::DFad<T> s = 0;
- for (unsigned int i=0; i<dim; ++i)
- for (unsigned int j=0; j<dim; ++j)
- s += t1[i][j] * t2[i][j];
- return s;
-}
-
-
-/**
- * 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 <code>operator*</code> 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 <int dim, typename Number, typename T >
-inline
-Sacado::Fad::DFad<T>
-scalar_product (const Tensor<2,dim,Sacado::Fad::DFad<T> > &t1,
- const SymmetricTensor<2,dim,Number> &t2)
-{
- return scalar_product(t2, t1);
-}
-
DEAL_II_NAMESPACE_CLOSE
#endif // DEAL_II_WITH_TRILINOS