-
Notifications
You must be signed in to change notification settings - Fork 31
Use LinearSolve's internal methods for preconditioners #588
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
Conversation
da546d9 to
3a756a1
Compare
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.
Pull Request Overview
This PR refactors the SteadyStateLinearSolver to use LinearSolve's internal preconditioner methods instead of handling preconditioners externally. The Pl and Pr parameters are removed from the solver struct, and preconditioners are now defined directly within the algorithm specification.
Key changes:
- Removed
PlandPrfields fromSteadyStateLinearSolverstruct - Changed default algorithm from
KrylovJL_GMRES()toKrylovJL_GMRES(; precs = (A, p) -> (ilu(A, τ = 0.01), I)) - Removed external preconditioner application logic from
_steadystateand_steadystate_fourierfunctions - Updated
LinearProblemconstructor calls to useLinearProblem{true}for optimization
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/steadystate.jl | Simplified SteadyStateLinearSolver struct by removing preconditioner fields; updated default algorithm to include built-in preconditioner; removed manual preconditioner application logic |
| docs/src/users_guide/steadystate.md | Updated example code to reflect removal of Pl and Pr parameters |
| CHANGELOG.md | Added entry documenting the change to use LinearSolve's internal preconditioner methods |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Can you also apply the same thing for HEOM ? |
Checklist
Thank you for contributing to
QuantumToolbox.jl! Please make sure you have finished the following tasks before opening the PR.make test.juliaformatted by running:make format.docs/folder) related to code changes were updated and able to build locally by running:make docs.CHANGELOG.mdshould be updated (regarding to the code changes) and built by running:make changelog.Request for a review after you have completed all the tasks. If you have not finished them all, you can also open a Draft Pull Request to let the others know this on-going work.
Description
The previous implementation was handling the left and right preconditioners externally. However, this can be directly done in the solver definition, simplifying the syntax.