NAG Library Function Document
nag_sparse_herm_precon_ssor_solve (f11jrc) solves a system of linear equations involving the preconditioning matrix corresponding to SSOR applied to a complex sparse Hermitian matrix, represented in symmetric coordinate storage format.
||nag_sparse_herm_precon_ssor_solve (Integer n,
const Complex a,
const Integer irow,
const Integer icol,
const double rdiag,
const Complex y,
nag_sparse_herm_precon_ssor_solve (f11jrc) solves a system of equations
involving the preconditioning matrix
corresponding to symmetric successive-over-relaxation (SSOR) (see Young (1971)
) on a linear system
is a sparse complex Hermitian matrix stored in symmetric coordinate storage (SCS) format (see Section 2.1.2
in the f11 Chapter Introduction).
In the definition of given above is the diagonal part of , is the strictly lower triangular part of and is a user-defined relaxation argument. Note that since is Hermitian the matrix is necessarily real.
Young D (1971) Iterative Solution of Large Linear Systems Academic Press, New York
n – IntegerInput
On entry: , the order of the matrix .
nnz – IntegerInput
On entry: the number of nonzero elements in the lower triangular part of the matrix .
a[nnz] – const ComplexInput
: the nonzero elements in the lower triangular part of the matrix
, ordered by increasing row index, and by increasing column index within each row. Multiple entries for the same row and column indices are not permitted. The function nag_sparse_herm_sort (f11zpc)
may be used to order the elements in this way.
irow[nnz] – const IntegerInput
icol[nnz] – const IntegerInput
: the row and column indices of the nonzero elements supplied in array a
must satisfy the following constraints (which may be imposed by a call to nag_sparse_herm_sort (f11zpc)
- and , for ;
- or and , for .
rdiag[n] – const doubleInput
On entry: the elements of the diagonal matrix , where is the diagonal part of . Note that since is Hermitian the elements of are necessarily real.
omega – doubleInput
On entry: the relaxation argument .
check – Nag_SparseSym_CheckDataInput
: specifies whether or not the input data should be checked.
- Checks are carried out on the values of n, nnz, irow, icol and omega.
- None of these checks are carried out.
y[n] – const ComplexInput
On entry: the right-hand side vector .
x[n] – ComplexOutput
On exit: the solution vector .
fail – NagError *Input/Output
The NAG error argument (see Section 3.6
in the Essential Introduction).
6 Error Indicators and Warnings
Dynamic memory allocation failed.
On entry, argument had an illegal value.
On entry, .
On entry, .
On entry, and .
An internal error has occurred in this function. Check the function call and any array sizes. If the call is correct then please contact NAG
On entry, , , .
On entry, , and .
On entry, is out of order: .
On entry, the location (
) is a duplicate:
. Consider calling nag_sparse_herm_sort (f11zpc)
to reorder and sum or remove duplicates.
On entry, .
The matrix has no diagonal entry in row .
The computed solution
is the exact solution of a perturbed system of equations
is a modest linear function of
is the machine precision
8 Parallelism and Performance
The time taken for a call to nag_sparse_herm_precon_ssor_solve (f11jrc) is proportional to nnz
This example program solves the preconditioning equation for a by sparse complex Hermitian matrix , given in symmetric coordinate storage (SCS) format.
10.1 Program Text
Program Text (f11jrce.c)
10.2 Program Data
Program Data (f11jrce.d)
10.3 Program Results
Program Results (f11jrce.r)