Skip to content

Commit e8915aa

Browse files
author
Daniel Ruprecht
committed
Fixes Gmat Parareal test: convert matrices to dense before taking norm
1 parent 8a9b285 commit e8915aa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/test_parareal.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,8 @@ def test_fineisfixedpointGmatprovided(self):
139139

140140
# For comparison also without ucoarse provided and check that both are different
141141
Pmat_ref, Bmat_ref = para.get_parareal_matrix()
142-
assert sparse.linalg.norm(Bmat_ref - Bmat)>1e-4, "Parareal iteration matrix Bmat provided with and without ucoarse as argument do not seem to be different."
143-
assert sparse.linalg.norm(Pmat_ref - Pmat)>1e-4, "Parareal iteration matrix Pmat provided with and without ucoarse as argument do not seem to be different."
142+
assert np.linalg.norm(Bmat_ref.todense() - Bmat.todense(), np.inf)>1e-4, "Parareal iteration matrix Bmat provided with and without ucoarse as argument do not seem to be different."
143+
assert np.linalg.norm(Pmat_ref.todense() - Pmat.todense(), np.inf)>1e-4, "Parareal iteration matrix Pmat provided with and without ucoarse as argument do not seem to be different."
144144

145145
# Apply matrix to fine solution
146146
u_para = Pmat.dot(u) + Bmat.dot(b)

0 commit comments

Comments
 (0)