XLPack 7.0
XLPack Numerical Library (Excel VBA) Reference Manual
Loading...
Searching...
No Matches

◆ CsrIluSolve()

Sub CsrIluSolve ( ByVal Trans As  String,
N As  Long,
Val() As  Double,
Rowptr() As  Long,
Colind() As  Long,
D() As  Double,
B() As  Double,
X() As  Double,
Optional Info As  Long,
Optional Base As  Long = -1 
)

Incomplete LU decomposition preconditioner (ILU) (CSR)

Purpose
This routine is the incomplete LU decomposition preconditioner (ILU) for the sparse linear equations. It solves the equation M*x = b or M^T*x = b, where M is the preconditioner matrix.
Parameters
[in]Trans= "N": solve M*x = b.
= "T" or "C": solve M^T*x = b.
[in]NDimension of preconditioner matrix. (N >= 0) (if N = 0, returns without computation)
[in]Val()Array Val(LVal - 1) (LVal >= Nnz) (Nnz is number of non-zero elements)
Values of non-zero elements of preconditioner matrix (lower triangular matrix L and upper triangular matrix U).
[in]Rowptr()Array Rowptr(LRowptr - 1) (LRowptr >= N + 1)
Row pointers of preconditioner matrix.
[in]Colind()Array Colind(LColind - 1) (LColind >= Nnz)
Column indices of preconditioner matrix.
[in]D()Array D(LD) (LD >= N)
The diagonal elements of upper triangular matrix U.
[in]B()Array B(LB - 1) (LB >= N)
Right hand side vector b.
[out]X()Array X(LX - 1) (LX >= N)
Solution vector x.
[out]Info(Optional)
= 0: Successful exit.
= i < 0: The (-i)-th argument is invalid.
[in]Base(Optional)
Indexing of Rowptr() and Colind().
= 0: Zero-based (C style) indexing: Starting index is 0.
= 1: One-based (Fortran style) indexing: Starting index is 1.
(default: Assumes 1 if Rowptr(0) = 1, 0 otherwise)
Example Program
See examples of CsrIlu and CsrIlu0.