]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Remove redundant specializations of scalar_product for Sacado numbers 5482/head
authorJean-Paul Pelteret <jppelteret@gmail.com>
Fri, 17 Nov 2017 08:09:32 +0000 (09:09 +0100)
committerJean-Paul Pelteret <jppelteret@gmail.com>
Fri, 17 Nov 2017 08:09:32 +0000 (09:09 +0100)
doc/news/changes/minor/20171117Jean-PaulPelteret [new file with mode: 0644]
include/deal.II/differentiation/ad/sacado_product_types.h

diff --git a/doc/news/changes/minor/20171117Jean-PaulPelteret b/doc/news/changes/minor/20171117Jean-PaulPelteret
new file mode 100644 (file)
index 0000000..320ed0f
--- /dev/null
@@ -0,0 +1,4 @@
+Changed: The specializations of the scalar_product function for Sacado::Fad::DFad
+numbers were redundant and have been removed.
+<br>
+(Jean-Paul Pelteret, 2017/11/17)
index 756c53d5716799a0171ed17dc8e60dea60a38854..1de5c404884f2606c2a70d4630b77e4b08ab0a92 100644 (file)
@@ -218,90 +218,6 @@ struct EnableIfScalar<Sacado::Rad::ADvari<T> >
 };
 
 
-
-/**
- * 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

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.