From f60c950a7c52d6f9ffe48e3f70ae6865e94ef6a0 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Sat, 11 Jun 2022 23:21:34 +0200 Subject: [PATCH] numerically better normalization slightly more expensive, but guarantees a det(R) = 1.0 --- src/math.f90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/math.f90 b/src/math.f90 index 25c90ccf4..b92e1870b 100644 --- a/src/math.f90 +++ b/src/math.f90 @@ -1129,7 +1129,7 @@ pure function math_rotationalPart(F) result(R) - I_U(1)*I_F(1) * transpose(F) & + I_U(1) * transpose(matmul(F,F)) & - matmul(F,C) - R = R /(I_U(1)*I_U(2)-I_U(3)) + R = R*math_det33(R)**(-1.0/3.0) end function math_rotationalPart