Repository navigation
Add LDLt factorization for HMatrix and use it in the local DDM solvers - #90
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #90 +/- ##
==========================================
+ Coverage 97.19% 98.30% +1.10%
==========================================
Files 80 188 +108
Lines 5132 11194 +6062
==========================================
+ Hits 4988 11004 +6016
- Misses 144 190 +46 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
PierreMarchand20
force-pushed
the
add_ldlt_factorization
branch
3 times, most recently
from
October 1, 2026 16:22
76619a1 to
996cf95
Compare
Bunch-Kaufman LDLt for symmetric (real or complex) and Hermitian
matrices, dense and hierarchical, selected by a symmetry of 'S' or 'H'
(real 'H' falls back to the symmetric routines).
Dense (matrix/linalg/factorization.hpp):
- ldlt_factorization/ldlt_solve wrapping sytrf/sytrs and hetrf/hetrs.
- triangular_ldlt_matrix_matrix_solve: solve with the unit L/U,
Bunch-Kaufman permutations included, transa in N/T/C like trsm.
- apply_ldlt_diagonal: D^-1 on the left or right, the 2x2 inverse in
sytrs/hetrs's scaled form. A full solve is L^-1, D^-1, L^-T.
- Blas::geru/gerc (BLAS has no plain complex ger).
HMatrix:
- Block-recursive ldlt_factorization storing the unit L in place and D
at the dense diagonal leaves: W = A21 L11^-T, L21 = W D1^-1,
A22 -= L21 W^T. UPLO='U' eliminates the last cluster first.
- ldlt_solve, internal_triangular_ldlt_hmatrix_{hmatrix,matrix,lrmat}_solve
and apply_ldlt_diagonal.hpp (keeps the compression of the blocks D is
applied to, densifying with a warning only below the dense leaves).
Local DDM solvers:
- is_positive_definite option (default false) in LocalHMatrixSolver,
LocalHMatrixPlusOverlapSolver, make_DDM_solver_w_custom_local_solver
and DDMSolverBuilder. Symmetric/Hermitian local HMatrices now use LDLt
unless declared positive definite, since Cholesky silently gave a
wrong factorization for indefinite matrices. Complex symmetric always
uses LDLt.
Fixes:
- HMatrix cholesky_factorization's symmetry check compared UPLO and
could never trigger; LU/Cholesky checks now live in the public
functions dispatching on the execution policy.
- potrf and sytrf/hetrf failures (info > 0) are now reported.
Tests: dense and HMatrix LDLt factorization and triangular solves,
including 2x2 pivots, and Test_local_hmatrix_solvers checking both local
solvers against the assembled system.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PierreMarchand20
force-pushed
the
add_ldlt_factorization
branch
from
October 2, 2026 13:06
996cf95 to
990ccde
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bunch-Kaufman LDLt for symmetric (real or complex) and Hermitian matrices, dense and hierarchical, selected by a symmetry of 'S' or 'H' (real 'H' falls back to the symmetric routines).
Dense (matrix/linalg/factorization.hpp):
HMatrix:
Local DDM solvers:
Fixes:
Tests: dense and HMatrix LDLt factorization and triangular solves, including 2x2 pivots, and Test_local_hmatrix_solvers checking both local solvers against the assembled system.