-
Notifications
You must be signed in to change notification settings - Fork 106
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
Adding preconditioner to idrs #297
Conversation
Nice! Did you follow literature or is it just clear how to add the preconditioner here? Pinging @astudillor, can you also have a cursory look? |
s::Number, abstol::Real, reltol::Real, maxiter::Number; smoothing::Bool=false, verbose::Bool=false | ||
) where {T} | ||
s::Number, Pl::precT, abstol::Real, reltol::Real, maxiter::Number; smoothing::Bool=false, verbose::Bool=false | ||
) where {T, precT} |
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 you never use precT
, so you don't need that type parameter in the method signature
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.
Yes, I just followed the "gmres.jl" and added "precT". Maybe it will be useful in the future?
Project.toml
Outdated
@@ -3,6 +3,7 @@ uuid = "42fd0dbc-a981-5370-80f2-aaf504508153" | |||
version = "0.9.0" | |||
|
|||
[deps] | |||
IncompleteLU = "40713840-3770-5561-ab4c-a76e7d0d7895" |
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.
We have a file for test dependencies, https://github.com/JuliaLinearAlgebra/IterativeSolvers.jl/blob/master/test/Project.toml, we only need that dependency for the test, right?
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 just checked the "gmres.jl" and found it use LU instead of the IncompleteLU I added in the dependency,shall I removed it?
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.
It makes sense to have a non-exact preconditioner in the test, or? Perhaps just move the
IncompleteLU = "40713840-3770-5561-ab4c-a76e7d0d7895"
line to https://github.com/JuliaLinearAlgebra/IterativeSolvers.jl/blob/master/test/Project.toml
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.
ok
hahaha |
Haha, you can also compare with https://github.com/astudillor/idrs/blob/master/idrs/idrs.py |
Co-authored-by: Moritz Schauer <[email protected]>
Thank you for your help~ |
Great. Can I ask on what type of problem you are working such that IDR(s) beats GMRES? |
It's a badly conditioned matrix equation on Computational Electromagneticcalled EFIE~ |
Pull Request Test Coverage Report for Build 842243156
💛 - Coveralls |
Pull Request Test Coverage Report for Build 842243156Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
Well it seems to be a problem of problem of setting on preconditioner. GMRES remains the best solver after I corrected it. |
Ref #302 |
Here I added Pl preconditioner to idrs add tested it with IncompleteLU preconditioner.