-
Notifications
You must be signed in to change notification settings - Fork 7
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
Update csc interface #23
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportPatch coverage:
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more Additional details and impacted files@@ Coverage Diff @@
## main #23 +/- ##
==========================================
- Coverage 90.27% 90.21% -0.06%
==========================================
Files 15 15
Lines 1831 1830 -1
==========================================
- Hits 1653 1651 -2
- Misses 178 179 +1
... and 1 file with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
But doesn't solve! redo all factorization steps ? The assumption I used is that sparspaklu returns some factorization object, and ldiv! solves the factorized problem. Due to the lack of a factorization type I (mis)used the SparseSolver itself in the corresponding state as "factorization" in the context of sparspaklu, sparspaklu! and ldiv! . LinearSolve.jl uses these things in this way, and this corresponds to what we have with e.g. with KLU.jl (which I took as an example). I think this can be corrected by introducing a factorization type which can be returned by sparspaklu:
than we are free to dispatch ldiv! either on the solver or on the factorization. I think this is a discussion on the architecture of the package in #24 . |
It shouldn't: the sparse solver maintains a state. If something invalidates the factorization, it will factorize; otherwise not. |
Ah ok - in that case I tinkk there would'nt be a problem. But I indeed think that we should have this factorization struct as it may be more clear in its functionality. In the moment I am in holidays and the weather is good, so it may take some time to get to this. |
I have not discovered the reason we store the sparse matrix in the sparse solver. Do you remember what it is? We don't seem to use it once it is stored... |
It is for dispatching this call:
properly. If |
I think this would be not very logical, as IMHO the Problem itself is a (linked list) sparse matrix structure together with a right hand side and a solution vector. We would have to keep these vectors uninitialized or unused when runnin with the sparselu logic. As I see, the SparseSPDSolver in the We just could do the same as for the SparseSolver and let I am ready to care about the SPD stuff for SparseMatrixCSC. |
Yes. The the whole thing is half-baked at the moment.
I guess we could do that. I was thinking that perhaps code duplication could be avoided by
That is super. Beware: the code has not been tested (very much) yet. |
A critical occurence of code doubling is between
and Sparspak.jl/src/SparseMethod/SpkSparseBase.jl Line 323 in 020b13b
This is the code inserting an entry into the solver data structure. This could be made into a function which can be called within both of the I think we will see a similar situation when making the CSC equivalent for
I don't see any other critical occurences of code doubling, though. Once you have a running version for the SPD case with |
@j-fu I would like to enable
\
on the solver without a prior factorization. For this purpose I have replaced the logic inldiv!
withsolve!
. All tests pass. Please tell me what you think.