From 0d63284c01e101612f65fb5719172b65c7cc2fc9 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Sun, 12 Jun 2022 16:16:25 +0200 Subject: [PATCH] increase test coverage --- src/math.f90 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/math.f90 b/src/math.f90 index b92e1870b..882706ea7 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*math_det33(R)**(-1.0/3.0) + R = R*math_det33(R)**(-1.0_pReal/3.0_pReal) end function math_rotationalPart @@ -1422,7 +1422,9 @@ subroutine selfTest() t33_2 = math_rotationalPart(transpose(t33)) t33 = math_rotationalPart(t33) if (any(dNeq0(matmul(t33_2,t33) - math_I3,tol=1.0e-10_pReal))) & - error stop 'math_rotationalPart' + error stop 'math_rotationalPart (forward-backward)' + if (dNeq(1.0_pReal,math_det33(math_rotationalPart(t33)),tol=1.0e-10_pReal)) & + error stop 'math_rotationalPart (determinant)' call random_number(r) d = int(r*5.0_pReal) + 1