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

◆ CsxSsor()

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

Initialize symmetric successive over-relaxation (SSOR) preconditioner (CSC/CSR)

Purpose
This routine initializes the symmetric successive over-relaxation (SSOR) preconditioner for the coefficient matrix A of the sparse linear equations. The preconditioner matrix is defined as follows.
M(ω) = (1/(2 - ω))(D/ω + L)(D/ω)^(-1)(D/ω + U)
where L, D and U are the lower triangular part, the diagonal part and the upper triangular part of the coefficient matrix A, respectively (If A is a symmetric matrix, U = L^T).

The output D() is used by CscSsorSolve(), CsrSsorSolve(), SscSsorSolve() or SsrSsorSolve().
Parameters
[in]NDimension of the matrix A. (N >= 0) (if N = 0, returns without computation)
[in]OmegaThe relaxation parameter ω. (0 < ω < 2)
[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 CsrSsorSolve and CscSsorSolve.