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

Strategy with precs ? #529

Closed
j-fu opened this issue Aug 20, 2024 · 2 comments
Closed

Strategy with precs ? #529

j-fu opened this issue Aug 20, 2024 · 2 comments
Labels
question Further information is requested

Comments

@j-fu
Copy link
Contributor

j-fu commented Aug 20, 2024

Question❓

What is should be the strategy with implementing precs ?
The pattern I like is:

struct ILUZero_ILU0 end

function (::ILUZero_ILU0)(A, p=nothing)
    (ilu0(sparse(A)),I)
end

so we can have a solver like KrylovJL_CG(precs=ILUZero_ILU0()) etc.
Where this implementation should live ?

a) Due to the fact that this implementation does not depend on LinearSolve, it could become part of the respectve preconditioning packages. So should we go and make PRs there ?

b) Or do you plan to have Package extensions for LinearSolve ?

I find a) quite intriguing...

@j-fu j-fu added the question Further information is requested label Aug 20, 2024
@oscardssmith
Copy link
Contributor

I think for now, it belongs in the preconditioner package, but they could also belong as package extensions. Both approaches seem to work to me, and I don't think either has a hidden downside.

@oscardssmith oscardssmith removed their assignment Oct 15, 2024
@j-fu
Copy link
Contributor Author

j-fu commented Oct 21, 2024

Just wanted to follow up here, now that the code has settled. I intend to do a couple of PRs to ILUZero, AlgebraicMultigrid and the like (i.e. those that I "like"). As for a consistent pattern, I would choose something like ILUZero.ILU0Precs, AlgebraicMultigrid.AlgebraicMultigridPrecs etc., i.e. introduce the pattern XXXPrecs, so people would write KrylovJL_CG(precs=ILU0Precs). Other naming like XXXPreconditioners might be an alternative at this point in time.

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

No branches or pull requests

2 participants