# NAG CL Interfacef11btc (complex_​gen_​basic_​diag)

Settings help

CL Name Style:

## 1Purpose

f11btc is the third in a suite of three functions for the iterative solution of a complex general (non-Hermitian) system of simultaneous linear equations (see Golub and Van Loan (1996)). f11btc returns information about the computations during an iteration and/or after this has been completed. The first function of the suite, f11brc, is a setup function; the second function, f11bsc, is the iterative solver itself.
These three functions are suitable for the solution of large sparse general (non-Hermitian) systems of equations.

## 2Specification

 #include
 void f11btc (Integer *itn, double *stplhs, double *stprhs, double *anorm, double *sigmax, Complex work[], Integer lwork, NagError *fail)
The function may be called by the names: f11btc, nag_sparse_complex_gen_basic_diag or nag_sparse_nherm_basic_diagnostic.

## 3Description

f11btc returns information about the solution process. It can be called either during a monitoring step of f11bsc or after f11bsc has completed its tasks. Calling f11btc at any other time will result in an error condition being raised.
For further information you should read the documentation for f11brc and f11bsc.

## 4References

Golub G H and Van Loan C F (1996) Matrix Computations (3rd Edition) Johns Hopkins University Press, Baltimore

## 5Arguments

1: $\mathbf{itn}$Integer * Output
On exit: the number of iterations carried out by f11bsc.
2: $\mathbf{stplhs}$double * Output
On exit: the current value of the left-hand side of the termination criterion used by f11bsc.
3: $\mathbf{stprhs}$double * Output
On exit: the current value of the right-hand side of the termination criterion used by f11bsc.
4: $\mathbf{anorm}$double * Output
On exit: if ${\mathbf{iterm}}=1$ in the previous call to f11brc, then anorm contains ${‖A‖}_{p}$, where $p=1$, $2$ or $\infty$, either supplied or, in the case of $1$ or $\infty$, estimated by f11bsc; otherwise ${\mathbf{anorm}}=0.0$.
5: $\mathbf{sigmax}$double * Output
On exit: if ${\mathbf{iterm}}=2$ in the previous call to f11brc, the current estimate of the largest singular value ${\sigma }_{1}\left(\overline{A}\right)$ of the preconditioned iteration matrix when it is used by the termination criterion in f11bsc, either when it has been supplied to f11brc or it has been estimated by f11bsc (see also Sections 3 and 5 in f11brc); otherwise, ${\mathbf{sigmax}}=0.0$ is returned.
6: $\mathbf{work}\left[{\mathbf{lwork}}\right]$Complex Communication Array
On entry: the array work as returned by f11bsc (see also Sections 3 and 5 in f11bsc).
7: $\mathbf{lwork}$Integer Input
Constraint: ${\mathbf{lwork}}\ge 120$.
Note:  although the minimum value of lwork ensures the correct functioning of f11btc, a larger value is required by the iterative solver f11bsc (see also f11brc).
8: $\mathbf{fail}$NagError * Input/Output
The NAG error argument (see Section 7 in the Introduction to the NAG Library CL Interface).

## 6Error Indicators and Warnings

NE_ALLOC_FAIL
Dynamic memory allocation failed.
See Section 3.1.2 in the Introduction to the NAG Library CL Interface for further information.
On entry, argument $⟨\mathit{\text{value}}⟩$ had an illegal value.
NE_INT
On entry, ${\mathbf{lwork}}=⟨\mathit{\text{value}}⟩$.
Constraint: ${\mathbf{lwork}}\ge 120$.
NE_INTERNAL_ERROR
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.
See Section 7.5 in the Introduction to the NAG Library CL Interface for further information.
NE_NO_LICENCE
Your licence key may have expired or may not have been installed correctly.
See Section 8 in the Introduction to the NAG Library CL Interface for further information.
NE_OUT_OF_SEQUENCE
f11btc has been called out of sequence.

Not applicable.

## 8Parallelism and Performance

f11btc is not threaded in any implementation.

None.

See f11brc.