ilu
Incomplete LU factorization
Syntax
ilu(A,options)
[L,U] = ilu(A,options)
[L,U,P] = ilu(A,options)
Description
ilu
produces a unit lower triangular matrix, an upper
triangular matrix, and a permutation matrix.
ilu(A,options)
computes the
incomplete LU factorization of A
.
options
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.
Field Name  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(A,options)
returns
L+Uspeye(size(A))
, where L
is
a unit lower triangular matrix and U
is an upper
triangular matrix.
[L,U] = ilu(A,options)
returns a unit
lower triangular matrix in L
and an upper triangular
matrix in U
.
[L,U,P] = ilu(A,options)
returns a
unit lower triangular matrix in L
, an upper triangular
matrix in U
, and a permutation matrix in
P
.
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); options.type = 'crout'; options.milu = 'row'; options.droptol = 0.1; [L,U] = ilu(A,options); e = ones(size(A,2),1); norm(A*eL*U*e) ans = 1.4251e014
This shows that A
and L*U
, where
L
and U
are given by the
modified Crout ILU
, have the same rowsum.
Start with a sparse matrix and compute the LU factorization.
A = gallery('neumann', 1600) + speye(1600); options.type = 'nofill'; nnz(A) ans = 7840 nnz(lu(A)) ans = 126478 nnz(ilu(A,options)) ans = 7840
This shows that A
has 7840
nonzeros, the
complete LU factorization has 126478
nonzeros, and the
incomplete LU factorization, with 0
level of fillin, has
7840
nonzeros, the same amount as
A
.
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] Saad, Yousef, Iterative Methods for Sparse Linear Systems, PWS Publishing Company, 1996, Chapter 10  Preconditioning Techniques.