Direct solver for when is symmetric positive semidefinite with a known null space of dimension and positive definite on . Examples are the pure Neumann Weighted Stiffness Matrix, with and , or elasticity with rigid-body modes. A plain Cholesky factorisation breaks down on the zero pivot. Adding a dense correction such as would make it nonsingular, but would destroy the sparsity.
Pinning. Choose indices such that the block (rows of a basis matrix) is invertible, and let be the complement. For constants any single index works. For a general , a column-pivoted QR factorisation of picks a well-conditioned choice.
Proposition. is symmetric positive definite.
Proof. Let with , and extend it by zeros on to . Then , so , i.e. . On this gives , hence and .
is a principal submatrix of , so it is exactly as sparse and has an ordinary sparse Cholesky factorisation with the usual fill-reducing orderings (AMD, nested dissection).
Solving. For a right-hand side :
- make it consistent: with ( orthonormal). For this subtracts the mean;
- solve and set ;
- ground the solution: (see Grounding of the Potential).
The vector from step 2 solves . Take any solution and shift it along so that it vanishes on : . This is still a solution, and its -rows satisfy the same nonsingular system , so . Step 3 then moves to the representative required by the grounding condition, for example zero sum over the boundary nodes. The equations of the pinned rows never have to be solved: they hold automatically because .
Block right-hand sides. Triangular solves with and handle right-hand sides at once (BLAS-3 in supernodal codes). In EIT, all state and adjoint solves of one reconstruction iteration share one factorisation: solves per factorisation.
LDLᵀ instead of Cholesky. Because is SPD, a sparse factorisation without pivoting is equally stable. It avoids square roots and works in any floating-point type. LDLFactorizations.jl is a pure-Julia implementation that reads only the upper triangle, supports symbolic/numeric separation for refactorisation, and handles Float32 on the CPU, which CHOLMOD does not. A bordered system , which would impose the grounding directly, is indefinite. An with a static elimination order meets a zero pivot when the singular block is eliminated first, so pinning plus a posteriori grounding is the robust route.
Changing conductivity. A new changes the values of but not its sparsity pattern. The symbolic analysis (ordering, elimination tree, supernode structure) is reused and only the numeric factorisation is repeated. Keeping a map from the entries of to those of makes this update a simple gather.
Cost. For 2D finite element meshes with unknowns, nested dissection gives fill and factorisation work. Each solve costs per right-hand side. Compared with (block) CG with AMG, this pays off when many right-hand sides share one matrix, when high accuracy is needed, or for moderate . For very large 3D problems the fill-in makes iterative solvers preferable.
Measured (ModularEIT.jl, 2D Q1 mesh, 32 right-hand sides, RTX 3080 / Ryzen 7 7800X3D): at unknowns, re-factorisation plus solve takes 2.2 s with CHOLMOD on the CPU and 0.19 s with cuDSS on the GPU (Float64). AMG-preconditioned block CG needs 20.5 s and 1.8 s respectively. Single precision is not safe for the direct solver: the condition number of the stiffness matrix grows like , and Float32 factorisations reach only about relative residual at unknowns, while Float32 CG stays near .
Alternatives. The bordered (Lagrange multiplier) system is nonsingular but indefinite, so it needs an factorisation. The shift changes the solution (see Null Space of the Neumann Problem). Pinning keeps the SPD structure and gives the exact solution.
In ModularEIT.jl: projected_cholesky, projected_ldl, DirectSolver.
References
- P. Bochev, R. B. Lehoucq (2005). On the Finite Element Solution of the Pure Neumann Problem. SIAM Review 47(1), 50–66. doi:10.1137/S0036144503426074
- Y. Chen, T. A. Davis, W. W. Hager, S. Rajamanickam (2008). Algorithm 887: CHOLMOD, Supernodal Sparse Cholesky Factorization and Update/Downdate. ACM Trans. Math. Softw. 35(3), 22. doi:10.1145/1391989.1391995
- A. George (1973). Nested Dissection of a Regular Finite Element Mesh. SIAM J. Numer. Anal. 10(2), 345–363. doi:10.1137/0710032
- P. R. Amestoy, T. A. Davis, I. S. Duff (1996). An Approximate Minimum Degree Ordering Algorithm. SIAM J. Matrix Anal. Appl. 17(4), 886–905. doi:10.1137/S0895479894278952
- D. Orban and contributors. LDLFactorizations.jl (software). github.com/JuliaSmoothOptimizers/LDLFactorizations.jl
- NVIDIA. cuDSS: CUDA Direct Sparse Solver (documentation). docs.nvidia.com/cuda/cudss