naginterfaces.library.sparse.complex_​gen_​solve_​jacssor

naginterfaces.library.sparse.complex_gen_solve_jacssor(method, precon, a, irow, icol, omega, b, m, tol, maxitn, x)[source]

complex_gen_solve_jacssor solves a complex sparse non-Hermitian system of linear equations, represented in coordinate storage format, using a restarted generalized minimal residual (RGMRES), conjugate gradient squared (CGS), stabilized bi-conjugate gradient (BI-CGSTAB), or transpose-free quasi-minimal residual (TFQMR) method, without preconditioning, with Jacobi, or with SSOR preconditioning.

For full information please refer to the NAG Library document for f11ds

https://support.nag.com/numeric/nl/nagdoc_30.2/flhtml/f11/f11dsf.html

Parameters
methodstr

Specifies the iterative method to be used.

Restarted generalized minimum residual method.

Conjugate gradient squared method.

Bi-conjugate gradient stabilized () method.

Transpose-free quasi-minimal residual method.

preconstr, length 1

Specifies the type of preconditioning to be used.

No preconditioning.

Jacobi.

Symmetric successive-over-relaxation (SSOR).

acomplex, array-like, shape

The nonzero elements 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 complex_gen_sort() may be used to order the elements in this way.

irowint, array-like, shape

The row indices of the nonzero elements supplied in .

icolint, array-like, shape

The column indices of the nonzero elements supplied in .

omegafloat

If , is the relaxation parameter to be used in the SSOR method. Otherwise need not be initialized and is not referenced.

bcomplex, array-like, shape

The right-hand side vector .

mint

If , is the dimension of the restart subspace.

If , is the order of the polynomial BI-CGSTAB method.

Otherwise, is not referenced.

tolfloat

The required tolerance. Let denote the approximate solution at iteration , and the corresponding residual. The algorithm is considered to have converged at iteration if

If , is used, where is the machine precision. Otherwise is used.

maxitnint

The maximum number of iterations allowed.

xcomplex, array-like, shape

An initial approximation to the solution vector .

Returns
xcomplex, ndarray, shape

An improved approximation to the solution vector .

rnormfloat

The final value of the residual norm , where is the output value of .

itnint

The number of iterations carried out.

Raises
NagValueError
(errno )

On entry, .

Constraint:

(errno )

On entry, .

Constraint: .

(errno )

On entry, and .

Constraint: .

(errno )

On entry, .

Constraint: , or .

(errno )

On entry, .

Constraint:

(errno )

On entry, .

Constraint: , or .

(errno )

On entry, and .

Constraint: .

(errno )

On entry, .

Constraint: .

(errno )

On entry, .

Constraint: .

(errno )

On entry, the location () is a duplicate: .

(errno )

On entry, is out of order: .

(errno )

On entry, , and .

Constraint: and .

(errno )

On entry, , and .

Constraint: and .

(errno )

The matrix has a zero diagonal entry in row .

(errno )

The matrix has no diagonal entry in row .

(errno )

Algorithmic breakdown. A solution is returned, although it is possible that it is completely inaccurate.

(errno )

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 for assistance.

Warns
NagAlgorithmicWarning
(errno )

The required accuracy could not be obtained. However, a reasonable accuracy may have been achieved.

(errno )

The solution has not converged after iterations.

Notes

complex_gen_solve_jacssor solves a complex sparse non-Hermitian system of linear equations:

using an RGMRES (see Saad and Schultz (1986)), CGS (see Sonneveld (1989)), BI-CGSTAB() (see Van der Vorst (1989) and Sleijpen and Fokkema (1993)), or TFQMR (see Freund and Nachtigal (1991) and Freund (1993)) method.

complex_gen_solve_jacssor allows the following choices for the preconditioner:

  • no preconditioning;

  • Jacobi preconditioning (see Young (1971));

  • symmetric successive-over-relaxation (SSOR) preconditioning (see Young (1971)).

For incomplete (ILU) preconditioning see complex_gen_solve_ilu().

The matrix is represented in coordinate storage (CS) format (see the F11 Introduction) in the arrays , and . The array holds the nonzero entries in the matrix, while and hold the corresponding row and column indices.

complex_gen_solve_jacssor is a Black Box function which calls complex_gen_basic_setup(), complex_gen_basic_solver() and complex_gen_basic_diag(). If you wish to use an alternative storage scheme, preconditioner, or termination criterion, or require additional diagnostic information, you should call these underlying functions directly.

References

Freund, R W, 1993, A transpose-free quasi-minimal residual algorithm for non-Hermitian linear systems, SIAM J. Sci. Comput. (14), 470–482

Freund, R W and Nachtigal, N, 1991, QMR: a Quasi-Minimal Residual Method for Non-Hermitian Linear Systems, Numer. Math. (60), 315–339

Saad, Y and Schultz, M, 1986, GMRES: a generalized minimal residual algorithm for solving nonsymmetric linear systems, SIAM J. Sci. Statist. Comput. (7), 856–869

Sleijpen, G L G and Fokkema, D R, 1993, BiCGSTAB for linear equations involving matrices with complex spectrum, ETNA (1), 11–32

Sonneveld, P, 1989, CGS, a fast Lanczos-type solver for nonsymmetric linear systems, SIAM J. Sci. Statist. Comput. (10), 36–52

Van der Vorst, H, 1989, Bi-CGSTAB, a fast and smoothly converging variant of Bi-CG for the solution of nonsymmetric linear systems, SIAM J. Sci. Statist. Comput. (13), 631–644

Young, D, 1971, Iterative Solution of Large Linear Systems, Academic Press, New York