From: Sebastian Proell Date: Thu, 2 Mar 2023 14:17:00 +0000 (+0100) Subject: Fix SymmetricTensor::deviator for VectorizedArray X-Git-Tag: v9.5.0-rc1~514^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6349b16ab8c7f00b1af2784eca20725cc27bc21a;p=dealii.git Fix SymmetricTensor::deviator for VectorizedArray --- diff --git a/include/deal.II/base/symmetric_tensor.h b/include/deal.II/base/symmetric_tensor.h index 4a8397a6d0..a9c7da529b 100644 --- a/include/deal.II/base/symmetric_tensor.h +++ b/include/deal.II/base/symmetric_tensor.h @@ -3311,7 +3311,7 @@ deviator(const SymmetricTensor<2, dim, Number> &t) SymmetricTensor<2, dim, Number> tmp = t; // subtract scaled trace from the diagonal - const Number tr = trace(t) / dim; + const Number tr = trace(t) * internal::NumberType::value(1.0 / dim); for (unsigned int i = 0; i < dim; ++i) tmp.data[i] -= tr;