Repository navigation
Commit 0ee4cac
Add LDLt factorization for HMatrix and use it in the local DDM solvers
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>1 parent 46f0ad3 commit 0ee4cac
27 files changed
Lines changed: 2089 additions & 81 deletions
File tree
- include/htool
- hmatrix/linalg
- matrix/linalg
- solvers
- local_solvers
- wrappers
- tests/functional_tests
- hmatrix
- hmatrix_factorization
- hmatrix_triangular_solve
- matrix
- matrix_factorization
- matrix_triangular_solve
- solvers
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
33 | 37 | | |
34 | 38 | | |
35 | 39 | | |
| |||
39 | 43 | | |
40 | 44 | | |
41 | 45 | | |
| 46 | + | |
| 47 | + | |
42 | 48 | | |
43 | 49 | | |
44 | 50 | | |
| |||
56 | 62 | | |
57 | 63 | | |
58 | 64 | | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
59 | 68 | | |
60 | 69 | | |
61 | 70 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
0 commit comments