Skip to content

Commit 47ee61a

Browse files
committed
test subroutine version, non in-place
1 parent 5f320f9 commit 47ee61a

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

test/linalg/test_linalg_inverse.fypp

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,24 @@ module test_linalg_inverse
4949
if (allocated(error)) return
5050

5151
call check(error,all(abs(a-inva)<epsilon(0.0_${rk}$)),'inverse_${ri}$_eye (function): data converged')
52-
if (allocated(error)) return
53-
54-
!> Inverse subroutine
55-
call invert(a,err=state)
52+
if (allocated(error)) return
53+
54+
!> Inverse subroutine: split
55+
call invert(a,inva,err=state)
5656

5757
call check(error,state%ok(),'inverse_${ri}$_eye (subroutine): '//state%print())
5858
if (allocated(error)) return
5959

6060
call check(error,all(abs(a-inva)<epsilon(0.0_${rk}$)),'inverse_${ri}$_eye (subroutine): data converged')
61+
if (allocated(error)) return
62+
63+
!> Inverse subroutine in-place
64+
call invert(a,err=state)
65+
66+
call check(error,state%ok(),'inverse_${ri}$_eye (in-place): '//state%print())
67+
if (allocated(error)) return
68+
69+
call check(error,all(abs(a-inva)<epsilon(0.0_${rk}$)),'inverse_${ri}$_eye (in-place): data converged')
6170
if (allocated(error)) return
6271

6372
end subroutine test_${ri}$_eye_inverse

0 commit comments

Comments
 (0)