From a38ec385c7879bb98c4970a4634d050aebc2e8f5 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Sun, 26 Nov 2023 19:03:17 +0100 Subject: [PATCH] test simple tensor operations --- src/math.f90 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/math.f90 b/src/math.f90 index 8d4d3ff9c..c6a358407 100644 --- a/src/math.f90 +++ b/src/math.f90 @@ -1380,6 +1380,12 @@ subroutine math_selfTest() if (any(dNeq0(math_eye(3),math_inv33(math_I3)))) & error stop 'math_inv33(math_I3)' + if (any(dNeq(t33,math_symmetric33(t33)+math_skew33(t33)))) & + error stop 'math_symmetric/skew' + + if (any(dNeq(t33,math_spherical33(t33)+math_deviatoric33(t33)))) & + error stop 'math_spherical/deviatoric' + do while(abs(math_det33(t33))<1.0e-9_pREAL) call random_number(t33) end do