Documentation

ilu

Incomplete LU factorization

Syntax

ilu(设置)
[L,U] = ilu(A,setup)
[L,U,P] = ilu(A,setup)

Description

iluproduces a unit lower triangular matrix, an upper triangular matrix, and a permutation matrix.

ilu(设置)computes the incomplete LU factorization ofA.setupis 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

Type of factorization. Values fortypeinclude:

  • 'nofill'(default)—Performs ILU factorization with0level of fill in, known as ILU(0). Withtypeset to'nofill', only themilusetup option is used; all other fields are ignored.

  • 'crout'—Performs the Crout version of ILU factorization, known as ILUC. Withtypeset to'crout', only thedroptolandmilusetup options are used; all other fields are ignored.

  • 'ilutp'—Performs ILU factorization with threshold and pivoting.

Iftypeis not specified, the ILU factorization with0level of fill in is performed. Pivoting is only performed withtypeset to'ilutp'.

droptol

Drop tolerance of the incomplete LU factorization.droptolis a non-negative scalar. The default value is0, which produces the complete LU factorization.

The nonzero entries ofUsatisfy

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 ofLare tested against the local drop tolerance before being scaled by the pivot, so for nonzeros inL

abs(L(i,j)) >= droptol*norm(A(:,j))/U(j,j).

milu

Modified incomplete LU factorization. Values formiluinclude:

  • 'row'—Produces the row-sum modified incomplete LU factorization. Entries from the newly-formed column of the factors are subtracted from the diagonal of the upper triangular factor,U, preserving column sums. That is,A*e = L*U*e, whereeis the vector of ones.

  • 'col'—Produces the column-sum modified incomplete LU factorization. Entries from the newly-formed column of the factors are subtracted from the diagonal of the upper triangular factor,U, preserving column sums. That is,e'*A = e'*L*U.

  • 'off'(default)—No modified incomplete LU factorization is produced.

udiag

Ifudiagis1, any zeros on the diagonal of the upper triangular factor are replaced by the local drop tolerance. The default is0.

thresh

Pivot threshold between0(forces diagonal pivoting) and1, the default, which always chooses the maximum magnitude entry in the column to be the pivot.

ilu(设置)returnsL+U-speye(size(A)), whereLis a unit lower triangular matrix andUis an upper triangular matrix.

[L,U] = ilu(A,setup)returns a unit lower triangular matrix inLand 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

iluworks 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 thatAandL*U, whereLandUare 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 thatAhas7840nonzeros, the complete LU factorization has126478nonzeros, and the incomplete LU factorization, with0level of fill-in, has7840nonzeros, 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.

See Also

||

Was this topic helpful?