|
|
◆ csx_ds()
| void csx_ds |
( |
int |
n, |
|
|
const double |
val[], |
|
|
const int |
ptr[], |
|
|
const int |
ind[], |
|
|
int |
base, |
|
|
double |
d[], |
|
|
int * |
info |
|
) |
| |
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 csx_ds_solve().
- Parameters
-
| [in] | n | Dimension of matrix A. (n >= 0) (If n = 0, returns without computation) |
| [in] | val[] | Array val[lval] (lval >= nnz) (nnz is number of non-zero elements of matrix A)
Values of non-zero elements of matrix A. |
| [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. |
| [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 of preconditioner matrix M. |
| [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). |
|