Skip to content
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

Add preconditioning to CG solver #526

Open
VTrappler opened this issue Sep 21, 2023 · 2 comments
Open

Add preconditioning to CG solver #526

VTrappler opened this issue Sep 21, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@VTrappler
Copy link

Hi,
I use pylops for solving large linear systems, and to test preconditioners.
Since pylops.optimization.solver.cg is very close to scipy.sparse.linalg.cg, I wondered if one could implement this feature, where the preconditioner is given as a linear operator which approximates the inverse of the original matrix (scipy's cg)
I have already implemented it as an new solver, if you are interested, I can prepare a PR.
Thank you

@mrava87
Copy link
Collaborator

mrava87 commented Sep 30, 2023

Hello,
Indeed the two solvers should be identical. The only reason we implemented cg was to have a solver compatible with cupy arrays (scipy one is not). If you have this feature and can add it to our cg in a similar fashion to what scipy does, that would be great. Feel free to make a PR at any time :)

@mrava87 mrava87 added the enhancement New feature or request label Sep 30, 2023
@VTrappler
Copy link
Author

Great, I'll try to do it soon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants