ilu
Incomplete LU factorization
Syntax
ilu(设置)
[L,U] = ilu(A,setup)
[L,U,P] = ilu(A,setup)
Description
ilu
produces a unit lower triangular matrix, an upper triangular matrix, and a permutation matrix.
ilu(设置)
computes the incomplete LU factorization ofA
.setup
is an input structure with up to five setup options. The fields must be named exactly as shown in the table below. You can include any number of these fields in the structure and define them in any order. Any additional fields are ignored.
字段名 |
Description |
---|---|
|
Type of factorization. Values for
If |
|
Drop tolerance of the incomplete LU factorization. The nonzero entries of abs(U(i,j)) >= droptol*norm(A(:,j)), with the exception of the diagonal entries, which are retained regardless of satisfying the criterion. The entries of abs(L(i,j)) >= droptol*norm(A(:,j))/U(j,j). |
|
Modified incomplete LU factorization. Values for
|
|
If |
|
Pivot threshold between |
ilu(设置)
returnsL+U-speye(size(A))
, whereL
is a unit lower triangular matrix andU
is an upper triangular matrix.
[L,U] = ilu(A,setup)
returns a unit lower triangular matrix inL
and an upper triangular matrix inU
.
[L,U,P] = ilu(A,setup)
returns a unit lower triangular matrix inL
, an upper triangular matrix inU
, and a permutation matrix inP
.
Limitations
ilu
works on sparse square matrices only.
Examples
Start with a sparse matrix and compute the LU factorization.
A = gallery('neumann', 1600) + speye(1600); setup.type = 'crout'; setup.milu = 'row'; setup.droptol = 0.1; [L,U] = ilu(A,setup); e = ones(size(A,2),1); norm(A*e-L*U*e) ans = 1.4251e-014
This shows thatA
andL*U
, whereL
andU
are given by the modified CroutILU
, have the same row-sum.
Start with a sparse matrix and compute the LU factorization.
A = gallery('neumann', 1600) + speye(1600); setup.type = 'nofill'; nnz(A) ans = 7840 nnz(lu(A)) ans = 126478 nnz(ilu(A,setup)) ans = 7840
This shows thatA
has7840
nonzeros, the complete LU factorization has126478
nonzeros, and the incomplete LU factorization, with0
level of fill-in, has7840
nonzeros, the same amount asA
.
Tips
These incomplete factorizations may be useful as preconditioners for a system of linear equations being solved by iterative methods such as BICG (BiConjugate Gradients), GMRES (Generalized Minimum Residual Method).
References
[1]萨阿德,尤瑟夫Iterative Methods for Sparse Linear Systems, PWS Publishing Company, 1996, Chapter 10 - Preconditioning Techniques.