-
Notifications
You must be signed in to change notification settings - Fork 166
LinearSolver: update after ConvergenceError #4144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
f17f70d
to
b337d9d
Compare
except firedrake.exceptions.ConvergenceError: | ||
assert solver.ksp.getConvergedReason() == PETSc.KSP.ConvergedReason.DIVERGED_MAX_IT | ||
|
||
assert not numpy.allclose(u.dat.data_ro, uinit.dat.data_ro) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
u.dat.data_ro
is zero here, i.e. the zero initial guess, rather than the result from one CG iteration
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The initial guess is -1.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's zero, as ksp_initial_guess_nonzero
defaults to False
.
|
I didn't realize that was the behaviour. Does that mean a |
This is correct.
The effect is very subtle, and is only for the update solve, |
Upon discussing this during the meeting, |
Sounds good, thanks. |
Description
Fixes #4143