naginterfaces.library.sparse.complex_gen_solve_ilu¶
- naginterfaces.library.sparse.complex_gen_solve_ilu(method, nnz, a, irow, icol, ipivp, ipivq, istr, idiag, b, m, tol, maxitn, x)[source]¶
complex_gen_solve_ilu
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, with incomplete preconditioning.For full information please refer to the NAG Library document for f11dq
https://support.nag.com/numeric/nl/nagdoc_30.2/flhtml/f11/f11dqf.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.
- nnzint
The number of nonzero elements in the matrix . This must be the same value as was supplied in the preceding call to
complex_gen_precon_ilu()
.- acomplex, array-like, shape
The values returned in the array by a previous call to
complex_gen_precon_ilu()
.- irowint, array-like, shape
The values returned in arrays , , , , and by a previous call to
complex_gen_precon_ilu()
.and are restored on exit.
- icolint, array-like, shape
The values returned in arrays , , , , and by a previous call to
complex_gen_precon_ilu()
.and are restored on exit.
- ipivpint, array-like, shape
The values returned in arrays , , , , and by a previous call to
complex_gen_precon_ilu()
.and are restored on exit.
- ipivqint, array-like, shape
The values returned in arrays , , , , and by a previous call to
complex_gen_precon_ilu()
.and are restored on exit.
- istrint, array-like, shape
The values returned in arrays , , , , and by a previous call to
complex_gen_precon_ilu()
.and are restored on exit.
- idiagint, array-like, shape
The values returned in arrays , , , , and by a previous call to
complex_gen_precon_ilu()
.and are restored on exit.
- 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: and .
- (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, , , and .
Constraint: and .
- (errno )
On entry, , , .
Constraint: and .
- (errno )
The CS representation of the preconditioner is invalid.
- (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_ilu
solves a complex sparse non-Hermitian linear system of equationsusing a preconditioned 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_ilu
uses the incomplete factorization determined bycomplex_gen_precon_ilu()
as the preconditioning matrix. A call tocomplex_gen_solve_ilu
must always be preceded by a call tocomplex_gen_precon_ilu()
. Alternative preconditioners for the same storage scheme are available by callingcomplex_gen_solve_jacssor()
.The matrix , and the preconditioning matrix , are represented in coordinate storage (CS) format (see the F11 Introduction) in the arrays , and , as returned from
complex_gen_precon_ilu()
. The array holds the nonzero entries in these matrices, while and hold the corresponding row and column indices.complex_gen_solve_ilu
is a Black Box function which callscomplex_gen_basic_setup()
,complex_gen_basic_solver()
andcomplex_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