From 992c54268539cd353a8a32a8c90ac76b2b847638 Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Thu, 19 Mar 2020 18:40:27 -0500 Subject: [PATCH] base/tensor.h: remove redundant recursion step --- include/deal.II/base/tensor.h | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-) diff --git a/include/deal.II/base/tensor.h b/include/deal.II/base/tensor.h index 05bae7e4ca..553d7fcf25 100644 --- a/include/deal.II/base/tensor.h +++ b/include/deal.II/base/tensor.h @@ -1945,25 +1945,6 @@ inline DEAL_II_CONSTEXPR DEAL_II_ALWAYS_INLINE return tmp; } -/** - * Entrywise multiplication of two tensor objects of rank 1. - * - * @relatesalso Tensor - */ -template -inline DEAL_II_CONSTEXPR DEAL_II_ALWAYS_INLINE - Tensor<1, dim, typename ProductType::type> - schur_product(const Tensor<1, dim, Number> & src1, - const Tensor<1, dim, OtherNumber> &src2) -{ - Tensor<1, dim, typename ProductType::type> tmp(src1); - - for (unsigned int i = 0; i < dim; ++i) - tmp[i] *= src2[i]; - - return tmp; -} - /** * Entrywise multiplication of two tensor objects of general rank. * @@ -1986,10 +1967,11 @@ inline DEAL_II_CONSTEXPR DEAL_II_ALWAYS_INLINE schur_product(const Tensor & src1, const Tensor &src2) { - Tensor::type> tmp(src1); + Tensor::type> tmp; for (unsigned int i = 0; i < dim; ++i) - tmp[i] = schur_product(src1[i], src2[i]); + tmp[i] = schur_product(Tensor(src1[i]), + Tensor(src2[i])); return tmp; } -- 2.39.5