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

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

real_gen_solve_jacssor solves a real sparse nonsymmetric 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 f11de

https://www.nag.com/numeric/nl/nagdoc_28.7/flhtml/f11/f11def.html

Parameters
methodstr

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.

afloat, 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 real_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.

bfloat, 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.

xfloat, array-like, shape

An initial approximation to the solution vector .

Returns
xfloat, 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: and .

(errno )

On entry, .

Constraint: , or .

(errno )

On entry, .

Constraint: and .

(errno )

On entry, , 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 )

A serious error has occurred in an internal call: . Check all function calls and array sizes. Seek expert help.

(errno )

A serious error has occurred in an internal call: . Check all function calls and array sizes. Seek expert help.

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

In the NAG Library the traditional C interface for this routine uses a different algorithmic base. Please contact NAG if you have any questions about compatibility.

real_gen_solve_jacssor solves a real sparse nonsymmetric 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.

The function 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 real_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.

real_gen_solve_jacssor is a Black Box function which calls real_gen_basic_setup(), real_gen_basic_solver() and real_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