-
-
Notifications
You must be signed in to change notification settings - Fork 54
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
make preconditioners part of the solver rather than a random extra #514
Conversation
... This is the one functionality I missed with LinearSolve. I had a slightly different view on this: see #308 . Unfortunately I had no time to work on this, so thank you for this PR! As for the functionality: Sometimes, e.g. in Newton solvers, it makes sense to update the matrix and keep the preconditioner. The "old" preconditioner may still be good enough for the "new" matrix in the sense that few additional iterations are cheaper than the re-creation of the preconditioner (thinking e.g. of Algebraic multigrid etc.) May be a kwarg |
@j-fu yeah, the only reason I thought about this API is that OrdinaryDiffEq has a (slightly broken very hacky) version of this API already ( |
A couple of thoughts for this API extension:
instead of
May one could achieve both ways via a dispatch between UPDATE:
|
Yeah, we likely would want to add aliases to create iterative algorithms with builtin preconditioners. My reasoning behind |
Let's have a chat on this at JuliaCon! |
Was nice to talk to you and to hear that there is quite some interest in this PR in the SciML org. How can I help do move this on ? |
This is mostly one that I think I just need to put a couple more hours into to get the Pr/Pl/precs handling uniform across everything. This is my next priority after SciML/OrdinaryDiffEq.jl#229. |
61d38ec
to
fbca249
Compare
Co-authored-by: Dennis Ogiermann <[email protected]>
* Don't default to MKL on EPYC * import correctly * Update Project.toml * Update Project.toml Co-authored-by: Chris Elrod <[email protected]> * Update qa.jl * Update static_arrays.jl * Update test/static_arrays.jl * Update test/static_arrays.jl * Update adjoint.jl * Update test/adjoint.jl * Update static_arrays.jl * Update static_arrays.jl * Update test/static_arrays.jl * Update static_arrays.jl * Update test/static_arrays.jl * Update test/static_arrays.jl Co-authored-by: Chris Elrod <[email protected]> --------- Co-authored-by: Chris Elrod <[email protected]>
bea4287
to
cfac4e7
Compare
Co-authored-by: Dennis Ogiermann <[email protected]>
This is now working and tested. I'm planning on merging soon assuming CI is clear. |
This is failing a lot of tests, but so is master. is this ready to merge? |
@fredrikekre can you figure out what |
This still needs tests, but I'm putting it up as a PR first to get feedback. The intended goal here is to make the
dolinsolve
functionality in OrdinaryDiffEq of being able to pass in aprecs
function that takes inA
and possibly some parameters and remakes your preconditioner for the newA
value.Here's an example of the new functionality in action: