-
Notifications
You must be signed in to change notification settings - Fork 27
Open
Description
Hi,
I copied your code for the CG solver in pykrylov/cg/cg.py to use it in my own solver class. The CG solver was working just fine when used wthout a preconditioner. With a preconditioner, it failed to converge. Then I checked the code and saw that in pykrylov/cg/cg.py, in line 104, it should say p = -y, and in line 151, p -= y. Right now, only the unconditioned residual r is used in place of y.
Having changed that, everything worked fine again in my code (with and without preconditioner).
Thanks for sharing your solvers online! :) It's a great alternative when one doesn't want to try and understand the convoluted things SciPy is doing in their CG method...
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels