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

◆ CsrDussv()

Sub CsrDussv ( Uplo As  String,
Trans As  String,
Diag As  String,
N As  Long,
Val() As  Double,
Rowptr() As  Long,
Colind() As  Long,
X() As  Double,
Optional Info As  Long,
Optional Base As  Long = -1,
Optional IncX As  Long = 1,
Optional Omega As  Double = 1 
)

Solution of Ax = b or ATx = b (triangular matrices) (CSR)

Purpose
This routine solves one of the following systems of equations for a sparse matrix in CSR format.
A*x = b or A^T*x = b
where b and x are n element vectors and A is an N x N upper or lower sparse triangular matrix.
Parameters
[in]UploSpecifies whether the matrix is an upper or lower triangular matrix as follows:
= "U": A is an upper triangular matrix.
= "L": A is an lower triangular matrix.
The other triangular elements (not including diagonal elements) are ignored.
[in]TransSpecifies the equation to be solved as follows:
= "N": A*x = b.
= "T" or "C": A^T*x = b.
[in]DiagSpecifies whether or not A is assumed to be unit triangular.
= "N": A is not assumed to be unit triangular.
= "U": A is assumed to be unit triangular. (diagonal elements are assumed to be ones. Elements of Val() at diagonal element positions (if exist) are ignored.)
[in]NNumber of rows and columns of matrix A. (N >= 0) (If N = 0, returns without computation)
[in]Val()Array Val(LVal - 1) (LVal >= Nnz) (Nnz is the number of nonzero elements of matrix A)
Values of nonzero elements of matrix A.
[in]Rowptr()Array Rowptr(LRowptr - 1) (LRowptr >= N + 1)
Row pointers of matrix A.
[in]Colind()Array Colind(LColind - 1) (LColind >= Nnz)
Column indices of matrix A.
[in,out]X()Array X(LX - 1) (LX >= 1 + (N - 1)*|IncX|)
[in] Right-hand side vector b.
[out] Solution vector x.
[out]Info(Optional)
= 0: Successful exit.
= i < 0: The (-i)-th argument is invalid. = i > 0: The matrix is singular (i-th diagonal element is zero).
[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)
[in]IncX(Optional)
Storage spacing between elements of X(). (IncX <> 0) (default = 1)
[in]Omega(Optional)
ω parameter. (0 < Omega < 2) (default = 1)
if ω <> 1 then Uplo, Trans and Diag are ignored and (D/ω + L)*x = b is solved. This option is provided to use with SOR solver.