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

Enable the use of functions as preconditioners #11

Open
mohamed82008 opened this issue Nov 5, 2019 · 2 comments
Open

Enable the use of functions as preconditioners #11

mohamed82008 opened this issue Nov 5, 2019 · 2 comments

Comments

@mohamed82008
Copy link
Member

Often the preconditioner can be defined as a function instead of a type with ldiv! method. For example, see JuliaLinearAlgebra/IterativeSolvers.jl#258. It would be nice to be able to wrap the function in a type PreconditionerFunction and pass that to iterative solvers seamlessly.

@bodhi91
Copy link

bodhi91 commented Jun 18, 2020

Is there a PreconditionerFunction for use? I have coded a multigrid preconditioner which returns a function accepting a vector as its argument. I aim to pass this function to the lobpcg. I was wondering if I have to write my own wrapper trying to overload ldiv! or if there is an existing PreconditionerFunction ready for use?

@JeffFessler
Copy link
Member

Assuming a preconditioner is a linear mapping, how about using LinearMaps.jl instead of a function?

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

No branches or pull requests

3 participants