XLPack 7.0
XLPack Numerical Library (C API) Reference Manual
Loading...
Searching...
No Matches

◆ z_csx_ds()

void z_csx_ds ( int  n,
const doublecomplex  val[],
const int  ptr[],
const int  ind[],
int  base,
doublecomplex  d[],
int *  info 
)

Initialize diagonal scaling preconditioner (Complex matrices) (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]nDimension 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]baseIndexing 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]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).