naginterfaces.library.sparse.complex_​herm_​solve_​ilu

naginterfaces.library.sparse.complex_herm_solve_ilu(method, nnz, a, irow, icol, ipiv, istr, b, tol, maxitn, x)[source]

complex_herm_solve_ilu solves a complex sparse Hermitian system of linear equations, represented in symmetric coordinate storage format, using a conjugate gradient or Lanczos method, with incomplete Cholesky preconditioning.

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

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

Parameters
methodstr

Specifies the iterative method to be used.

Conjugate gradient method.

Lanczos method (SYMMLQ).

nnzint

The number of nonzero elements in the lower triangular part of the matrix . This must be the same value as was supplied in the preceding call to complex_herm_precon_ichol().

acomplex, array-like, shape

The values returned in the array by a previous call to complex_herm_precon_ichol().

irowint, array-like, shape

The values returned in arrays , , and by a previous call to complex_herm_precon_ichol().

icolint, array-like, shape

The values returned in arrays , , and by a previous call to complex_herm_precon_ichol().

ipivint, array-like, shape

The values returned in arrays , , and by a previous call to complex_herm_precon_ichol().

istrint, array-like, shape

The values returned in arrays , , and by a previous call to complex_herm_precon_ichol().

bcomplex, array-like, shape

The right-hand side vector .

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

Constraint: or .

(errno )

On entry, and .

Constraint: .

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

Constraint: and .

(errno )

On entry, , and .

Constraint: and .

(errno )

On entry, appears to be invalid.

(errno )

The solution has not converged after iterations.

(errno )

The preconditioner appears not to be positive definite. The computation cannot continue.

(errno )

The matrix of the coefficients appears not to be positive definite. The computation cannot continue.

(errno )

A serious error, code , 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 has been achieved.

Notes

complex_herm_solve_ilu solves a complex sparse Hermitian linear system of equations

using a preconditioned conjugate gradient method (see Meijerink and Van der Vorst (1977)), or a preconditioned Lanczos method based on the algorithm SYMMLQ (see Paige and Saunders (1975)). The conjugate gradient method is more efficient if is positive definite, but may fail to converge for indefinite matrices. In this case the Lanczos method should be used instead. For further details see Barrett et al. (1994).

complex_herm_solve_ilu uses the incomplete Cholesky factorization determined by complex_herm_precon_ichol() as the preconditioning matrix. A call to complex_herm_solve_ilu must always be preceded by a call to complex_herm_precon_ichol(). Alternative preconditioners for the same storage scheme are available by calling complex_herm_solve_jacssor().

The matrix and the preconditioning matrix are represented in symmetric coordinate storage (SCS) format (see the F11 Introduction) in the arrays , and , as returned from complex_herm_precon_ichol(). The array holds the nonzero entries in the lower triangular parts of these matrices, while and hold the corresponding row and column indices.

References

Barrett, R, Berry, M, Chan, T F, Demmel, J, Donato, J, Dongarra, J, Eijkhout, V, Pozo, R, Romine, C and Van der Vorst, H, 1994, Templates for the Solution of Linear Systems: Building Blocks for Iterative Methods, SIAM, Philadelphia

Meijerink, J and Van der Vorst, H, 1977, An iterative solution method for linear systems of which the coefficient matrix is a symmetric M-matrix, Math. Comput. (31), 148–162

Paige, C C and Saunders, M A, 1975, Solution of sparse indefinite systems of linear equations, SIAM J. Numer. Anal. (12), 617–629