From: Jean-Paul Pelteret Date: Sat, 1 Feb 2020 19:00:04 +0000 (+0100) Subject: Fix SymmetricTensor and Tensor ProductType X-Git-Tag: v9.2.0-rc1~584^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0334837011498c395a9de03cbe2fadbb61faacc9;p=dealii.git Fix SymmetricTensor and Tensor ProductType Fixes a compiler error on the old Apple Clang 8.0.0 compiler, where the product type between complex numbers and tensors could not be determined. --- diff --git a/include/deal.II/base/symmetric_tensor.h b/include/deal.II/base/symmetric_tensor.h index ca531dfa5f..f90e3e4d79 100644 --- a/include/deal.II/base/symmetric_tensor.h +++ b/include/deal.II/base/symmetric_tensor.h @@ -72,6 +72,24 @@ DEAL_II_CONSTEXPR inline DEAL_II_ALWAYS_INLINE Number namespace internal { + template + struct ProductTypeImpl, std::complex> + { + using type = + SymmetricTensor::type>>; + }; + + template + struct ProductTypeImpl, SymmetricTensor> + { + using type = + SymmetricTensor::type>>; + }; + /** * A namespace for functions and classes that are internal to how the * SymmetricTensor class (and its associate functions) works. diff --git a/include/deal.II/base/tensor.h b/include/deal.II/base/tensor.h index a1fbcdc4b8..a1952271f1 100644 --- a/include/deal.II/base/tensor.h +++ b/include/deal.II/base/tensor.h @@ -755,6 +755,20 @@ private: namespace internal { + template + struct ProductTypeImpl, std::complex> + { + using type = + Tensor::type>>; + }; + + template + struct ProductTypeImpl, Tensor> + { + using type = + Tensor::type>>; + }; + /** * The structs below are needed to initialize nested Tensor objects. * Also see numbers.h for another specialization.