Skip to content

Commit

Permalink
assert initial resnorm correctness
Browse files Browse the repository at this point in the history
  • Loading branch information
nschloe committed Apr 25, 2021
1 parent f7e407d commit be8467a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/test_krylov.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ def _run(method, resnorms1, resnorms2, tol=1.0e-13):
print()
resnorms1 = np.asarray(resnorms1)
assert np.all(np.abs(info.resnorms - resnorms1) < tol * (1 + resnorms1))
# make sure the initial errnorm is correct
# make sure the initial resnorm and errnorm are correct
assert abs(np.linalg.norm(A @ x0 - b, 2) - info.resnorms[0]) < 1.0e-13
assert abs(np.linalg.norm(x0 - exact_solution, 2) - info.errnorms[0]) < 1.0e-13

# with "preconditioning"
Expand Down

0 comments on commit be8467a

Please sign in to comment.