ichol
Incomplete Cholesky factorization of a sparse symmetric positive definite matrix.
Category: Mathematics > Sparse Matrices
Syntax
L = ichol(A)
Returns a sparse lower triangular L with the same nonzero pattern as tril(A) such that L*L' approximates A.
L = ichol(A, opts)
Chooses the variant with a struct: type is 'nofill' or 'ict', plus options such as droptol and michol.
Description
A full Cholesky factorization of a sparse matrix creates many new nonzeros (fill-in). The incomplete version discards most of them, keeping a factor that is sparse but only approximately equal to A. It is not used to solve the system directly: L*L' serves as a preconditioner for pcg, which then converges in far fewer iterations.
The factorization can fail with an error if a nonpositive pivot appears.
Input arguments
A- Sparse, symmetric, positive definite matrix. Only its lower triangle is read.
opts- Struct with fields
type,droptol(for'ict') andmichol('on'or'off').
Output arguments
L- Sparse lower triangular incomplete Cholesky factor.
Example
Preconditioning pcg
A = sparse(diag(4*ones(5,1)) + diag(ones(4,1),1) + diag(ones(4,1),-1));
L = ichol(A);
full(L)
b = (1:5)';
[x, flag] = pcg(A, b, 1e-10, 50, L, L');
flag
Output
ans = 5×5
2.0000 0 0 0 0
0.5000 1.9365 0 0 0
0 0.5164 1.9322 0 0
0 0 0.5175 1.9319 0
0 0 0 0.5176 1.9319
flag = 0