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

◆ CsxDs()

Sub CsxDs ( N As  Long,
Val() As  Double,
Ptr() As  Long,
Ind() As  Long,
D() As  Double,
Optional Info As  Long,
Optional Base As  Long = -1 
)

Initialize diagonal scaling preconditioner (CSC/CSR)

Purpose
This routine initializes the diagonal scaling preconditioner for the coefficient matrix A of the sparse linear equations. The diagonal matrix of A is defined as the preconditioner matrix.
The output D() is used by CsxDsSolve().
Parameters
[in]NDimension of the matrix A. (N >= 0) (if N = 0, returns without computation)
[in]Val()Array Val(LVal - 1) (LVal >= nnz)
Values of nonzero elements of matrix A. (nnz is number of non-zero elements)
[in]Ptr()Array Ptr(LPtr - 1) (LPtr >= N + 1)
Column pointers (CSC) / row pointers (CSR) of matrix A.
[in]Ind()Array Ind(LInd - 1) (LInd >= Nnz) (Nnz is number of nonzero elements of matrix A)
Row indices (CSC) / column indices (CSR) of matrix A.
[out]D()Array D(LD - 1) (LD >= N)
Diagonal elements of preconditioner matrix M.
[out]Info(Optional)
= 0: Successful exit.
= i < 0: The (-i)-th argument is invalid.
= j > 0: j diagonal elements are zero (Returns 1 in D() for such elements).
[in]Base(Optional)
Indexing of Ptr() and Ind().
= 0: Zero-based (C style) indexing: Starting index is 0.
= 1: One-based (Fortran style) indexing: Starting index is 1.
(default: Assumes 1 if Ptr(0) = 1, 0 otherwise)
Example Program
See examples of CsxDsSolve.