Returns the name of a ILU parameter, given the index.
name = spilu_iluhubparname(m,k)
1-by-1 matrix of strings, the ILU method. Available methods are m = "ilu0", "ilud", "iludp", "iluk", "ilut", "ilutp", "milu0"
1-by-1 matrix of doubles, integer value, the parameter index
a 1-by-1 matrix of strings, the name of the parameter
Given a ILU method m and a parameter index k, returns the name of this parameter.
name = spilu_iluhubparname("ilud",1) // alph name = spilu_iluhubparname("ilud",2) // drop // A small 3-by-3 matrix // nnz(A)=7 A = [ 1 2 0 3 4 5 0 6 7 ]; A = sparse(A); for experiment = 1 : 4 select experiment case 1 then m = "ilu0"; args = list(); case 2 then m = "milu0"; args = list(); case 3 then m = "ilut"; tol = 0.0001; lfil = 3; args = list(lfil,tol); case 4 then m = "ilud"; tol = 0.075 ; alph= 0.0 ; args = list(alph,tol); else error("Unknown method") end mprintf("Preconditioner #%d: %s\n",experiment,m) for k = 1 : length(args) name = spilu_iluhubparname(m,k); mprintf(" %s = %s\n",name,string(args(k))) end [L,U,perm]=spilu_iluhub(A,m,args(:)); mprintf(" nnz(A) = %d\n", nnz(A)) mprintf(" nnz(LU) = %d\n", nnz(L)+nnz(U)) end | ![]() | ![]() |