Repository navigation
Standardize solver refactoring and shared factorizations - #55
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## maint/deprecations #55 +/- ##
======================================================
- Coverage 100.00% 99.66% -0.34%
======================================================
Files 16 17 +1
Lines 1059 1197 +138
======================================================
+ Hits 1059 1193 +134
- Misses 0 4 +4 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Introduces a public `factor(A=None)` method across all solvers for consistent matrix updates. For direct solvers like `Mumps` and `Pardiso`, a new `_SharedFactorBase` ensures that transposed and conjugated views share the same underlying factorization. This enables efficient re-factorization when the matrix values change but the sparsity pattern and analysis can be reused.
3c06923 to
0794636
Compare
santisoler
left a comment
There was a problem hiding this comment.
It looks good. My only comment would be why instead of "stacking" the inheritance like:
Base --(parent of)--> _SharedFactorBase --(parent of)--> Mumps
we make multiple inheritance like:
class Mumps(_SharedFactorBase, Base):
...We could even make _SharedFactorBase an ABC class and force child classes to implement the factor method.
Just an idea, a bit of nit picking too. What do you think?
I like the idea of making it a mix in class. I don't think the |
Introduces a public
factor(A=None)method across all solvers for consistent matrix updates. Some solvers already supported this. This just makes it a guaranteed interface across all solvers. This enables efficient re-factorization when the matrix values change but the sparsity pattern and analysis can be reused.For direct solvers like
MumpsandPardiso, a new_SharedFactorBaseensures that transposed and conjugated views share the same underlying factorization. This was to make it so that when the underlying solver object is refactored, any other transposed or conjugate views stay in sync with the updated solver.