From 6349b16ab8c7f00b1af2784eca20725cc27bc21a Mon Sep 17 00:00:00 2001 From: Sebastian Proell Date: Thu, 2 Mar 2023 15:17:00 +0100 Subject: [PATCH] Fix SymmetricTensor::deviator for VectorizedArray --- include/deal.II/base/symmetric_tensor.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.39.5