From 95ecc05cb047432cb0a472e0ab223fd53d63d91e Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Wed, 16 Oct 2019 21:13:26 +0200 Subject: [PATCH] better test ... --- src/math.f90 | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/math.f90 b/src/math.f90 index 453145700..5a3a5f467 100644 --- a/src/math.f90 +++ b/src/math.f90 @@ -1404,6 +1404,7 @@ subroutine unitTest integer, dimension(5) :: range_out_ = [1,2,3,4,5] real(pReal) :: det + real(pReal), dimension(3) :: v3_1,v3_2,v3_3,v3_4 real(pReal), dimension(6) :: v6 real(pReal), dimension(9) :: v9 real(pReal), dimension(3,3) :: t33,t33_2 @@ -1452,6 +1453,15 @@ subroutine unitTest if(any(dNeq0(math_6toSym33(v6) - math_symmetric33(math_6toSym33(v6))))) & call IO_error(401,ext_msg='math_symmetric33') + call random_number(v3_1) + call random_number(v3_2) + call random_number(v3_3) + call random_number(v3_4) + + if(dNeq(abs(dot_product(math_cross(v3_1-v3_4,v3_2-v3_4),v3_3-v3_4))/6.0, & + math_volTetrahedron(v3_1,v3_2,v3_3,v3_4),tol=1.0e-12_pReal)) & + call IO_error(401,ext_msg='math_volTetrahedron') + call random_number(t33) if(dNeq(math_det33(math_symmetric33(t33)),math_detSym33(math_symmetric33(t33)),tol=1.0e-12_pReal)) & call IO_error(401,ext_msg='math_det33/math_detSym33')