<< Benchmark Benchmark spilu_iluhubavail >>

Spilu >> Spilu > Benchmark > spilu_iluhub

spilu_iluhub

A generic hub for various incomplete LU algorithms.

Calling Sequence

[L,U,perm] = spilu_iluhub(A,m)
[L,U,perm] = spilu_iluhub(A,m,a1)
[L,U,perm] = spilu_iluhub(A,m,a1,a2)
[L,U,perm] = spilu_iluhub(A,m,a1,a2,...)

Parameters

A :

n-by-n sparse real matrix of doubles

m :

1-by-1 matrix of strings, the ILU method. Available methods are m = "ilu0", "ilud", "iludp", "iluk", "ilut", "ilutp", "milu0"

a1,a2,... :

optional parameters of the ILU method

L :

n-by-n sparse real matrix of doubles, lower triangular matrix

U :

n-by-n sparse real matrix of doubles, upper triangular matrix

perm :

a 1-by-n dense real matrix of doubles, integer value, the permutation arrays

Description

Builds an incomplete LU factorization of the sparse matrix A, with the method m.

The extra arguments a1, a2, ... are automatically passed to the specific ILU function: see in the specific help page for the meaning of the parameters.

If the specific algorithm does not produce a permutation vector perm, then the permutation is the identity.

Examples

// A small 3-by-3 matrix
// nnz(A)=7
A = [
1 2 0
3 4 5
0 6 7
];
A = sparse(A);
[L,U,perm]=spilu_iluhub(A,"ilu0")

// Test ilud
alph = 0.1;
drop = 0.001;
[L,U,perm]=spilu_iluhub(A,"ilud",alph,drop)

// Test all methods
marray = spilu_iluhubavail();
for m = marray
mprintf("Method: %s\n",m);
[L,U,perm]=spilu_iluhub(A,m);
mprintf("    nnz(LU)= %d\n",nnz(L)+nnz(U));
end

Authors


<< Benchmark Benchmark spilu_iluhubavail >>