|
|
◆ csx_ssor()
| void csx_ssor |
( |
int |
n, |
|
|
double |
omega, |
|
|
const double |
val[], |
|
|
const int |
ptr[], |
|
|
const int |
ind[], |
|
|
int |
base, |
|
|
double |
d[], |
|
|
int |
iwork[], |
|
|
int * |
info |
|
) |
| |
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 csc_ssor_solve(), csr_ssor_solve(), ssc_ssor_solve() or ssr_ssor_solve().
- Parameters
-
| [in] | n | Dimension of matrix A. (n >= 0) (If n = 0, returns without computation) |
| [in] | omega | The relaxation parameter ω. (0 < ω < 2) |
| [in] | val[] | Array val[lval] (lval >= nnz)
Values of non-zero elements of matrix A. (nnz is number of non-zero elements) |
| [in] | ptr[] | Array ptr[lptr] (lptr >= n + 1)
Column pointers (CSC) / row pointers (CSR) of matrix A. |
| [in] | ind[] | Array ind[lind] (lind >= nnz)
Row indices (CSC) / column indices (CSR) of matrix A. (nnz is number of non-zero elements) |
| [in] | base | 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. |
| [out] | d[] | Array d[ld] (ld >= n)
Diagonal elements D/ω. |
| [out] | iwork[] | Array iwork[liwork] (liwork >= n)
Work array. |
| [out] | info | = 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). |
|