Skip to content

Commit 3b9c77d

Browse files
committed
Print computed matrix for reference.
1 parent 3941673 commit 3b9c77d

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

test/linalg/test_linalg_expm.fypp

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,23 @@ module test_linalg_expm
5656
! Compute matrix exponential.
5757
E = expm(A)
5858

59+
print *, "Reference matrix"
60+
do i = 1, n
61+
print *, (Eref(i, j), j=1, n)
62+
enddo
63+
64+
print *
65+
print *, "Computed matrix"
66+
do i = 1, n
67+
print *, (E(i, j), j=1, n)
68+
enddo
69+
70+
print *
71+
print *, "Difference"
72+
do i = 1, n
73+
print *, (E(i, j) - Eref(i, j), j=1, n)
74+
enddo
75+
5976
! Check result.
6077
err = norm(Eref - E, "inf")
6178
call check(error, err < (n**2)*epsilon(1.0_${rk}$), "Analytical matrix exponential.")

0 commit comments

Comments
 (0)