MILU(0) preconditioning
[L,U]=spilu_milu0(A)
a n-by-n sparse real matrix of doubles
a n-by-n sparse real matrix of doubles, lower triangular
a n-by-n sparse real matrix of doubles, upper triangular
Builds an modified incomplete LU factorization (MILU) of the sparse matrix A
,
that is, computes a lower triangular matrix L
and
an upper triangular matrix U
such that
A ≈ L*U
The process is the same than in the ILU(0) algorithm, but with diagonal compensation in U at the end.
// Incomplete factorization of a simple 6-by-6 matrix. // nnz(A)=16 A=[ -1. 3. 0. 0. 4. 0. 2. -5. 0. 0. 0. 1. 0. 0. -2. 3. 0. 0. 0. 0. 7. -1. 0. 0. -3. 0. 0. 4. 6. 0. 0. 5. 0. 0. -7. 8. ]; A=sparse(A); expL=[ 1. 0. 0. 0. 0. 0. -2. 1. 0. 0. 0. 0. 0. 0. 1. 0. 0. 0. 0. 0. -3.5 1. 0. 0. 3. 0. 0. 0.4210526 1. 0. 0. 0.5555556 0. 0. 0.4666667 1. ]; expU=[ -1. 3. 0. 0. 4. 0. 0. 9. 0. 0. 0. 1. 0. 0. -2. 3. 0. 0. 0. 0. 0. 9.5 0. 0. 0. 0. 0. 0. -15. 0. 0. 0. 0. 0. 0. 7.4444444 ]; [L,U]=spilu_milu0(A) // Check the quality of the decomposition [norm(A-L*U,"inf")/norm(A,"inf") nnz(L)+nnz(U)] // Incomplete factorization of a 960-by-960 sparse matrix // nnz(A)=15844 path = spilu_getpath ( ); filename = fullfile(path,"tests","matrices","nos3.mtx"); A=mmread(filename); n=size(A,1); b=ones(n,1); [L,U]=spilu_milu0(A); x=U\(L\b); norm(A*x-b) | ![]() | ![]() |
Copyright (C) 2011 - DIGITEO - Michael Baudin
Copyright (C) 2011 - NII - Benoit Goepfert
Copyright (C) 2005 - INRIA - Sage Group (IRISA)
Copyright (C) 1993 - Univ. of Tennessee and Oak Ridge National Laboratory - Youcef Saad