Skip to content

Commit

Permalink
test subroutine version, non in-place
Browse files Browse the repository at this point in the history
  • Loading branch information
perazz committed Jun 5, 2024
1 parent 5f320f9 commit 47ee61a
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions test/linalg/test_linalg_inverse.fypp
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,24 @@ module test_linalg_inverse
if (allocated(error)) return

call check(error,all(abs(a-inva)<epsilon(0.0_${rk}$)),'inverse_${ri}$_eye (function): data converged')
if (allocated(error)) return

!> Inverse subroutine
call invert(a,err=state)
if (allocated(error)) return
!> Inverse subroutine: split
call invert(a,inva,err=state)

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

call check(error,all(abs(a-inva)<epsilon(0.0_${rk}$)),'inverse_${ri}$_eye (subroutine): data converged')
if (allocated(error)) return

!> Inverse subroutine in-place
call invert(a,err=state)

call check(error,state%ok(),'inverse_${ri}$_eye (in-place): '//state%print())
if (allocated(error)) return

call check(error,all(abs(a-inva)<epsilon(0.0_${rk}$)),'inverse_${ri}$_eye (in-place): data converged')
if (allocated(error)) return

end subroutine test_${ri}$_eye_inverse
Expand Down

0 comments on commit 47ee61a

Please sign in to comment.