# NAG FL Interfacef11btf (complex_​gen_​basic_​diag)

## ▸▿ Contents

Settings help

FL Name Style:

FL Specification Language:

## 1Purpose

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

## 2Specification

Fortran Interface
 Subroutine f11btf ( itn, work,
 Integer, Intent (In) :: lwork Integer, Intent (Inout) :: ifail Integer, Intent (Out) :: itn Real (Kind=nag_wp), Intent (Out) :: stplhs, stprhs, anorm, sigmax Complex (Kind=nag_wp), Intent (Inout) :: work(lwork)
#include <nag.h>
 void f11btf_ (Integer *itn, double *stplhs, double *stprhs, double *anorm, double *sigmax, Complex work[], const Integer *lwork, Integer *ifail)
The routine may be called by the names f11btf or nagf_sparse_complex_gen_basic_diag.

## 3Description

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

## 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 f11bsf.
2: $\mathbf{stplhs}$Real (Kind=nag_wp) Output
On exit: the current value of the left-hand side of the termination criterion used by f11bsf.
3: $\mathbf{stprhs}$Real (Kind=nag_wp) Output
On exit: the current value of the right-hand side of the termination criterion used by f11bsf.
4: $\mathbf{anorm}$Real (Kind=nag_wp) Output
On exit: if ${\mathbf{iterm}}=1$ in the previous call to f11brf, then anorm contains ${‖A‖}_{p}$, where $p=1$, $2$ or $\infty$, either supplied or, in the case of $1$ or $\infty$, estimated by f11bsf; otherwise ${\mathbf{anorm}}=0.0$.
5: $\mathbf{sigmax}$Real (Kind=nag_wp) Output
On exit: if ${\mathbf{iterm}}=2$ in the previous call to f11brf, 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 f11bsf, either when it has been supplied to f11brf or it has been estimated by f11bsf (see also Sections 3 and 5 in f11brf); otherwise, ${\mathbf{sigmax}}=0.0$ is returned.
6: $\mathbf{work}\left({\mathbf{lwork}}\right)$Complex (Kind=nag_wp) array Communication Array
On entry: the array work as returned by f11bsf (see also Sections 3 and 5 in f11bsf).
7: $\mathbf{lwork}$Integer Input
On entry: the dimension of the array work as declared in the (sub)program from which f11btf is called (see also f11brf).
Constraint: ${\mathbf{lwork}}\ge 120$.
Note:  although the minimum value of lwork ensures the correct functioning of f11btf, a larger value is required by the iterative solver f11bsf (see also f11brf).
8: $\mathbf{ifail}$Integer Input/Output
On entry: ifail must be set to $0$, $-1$ or $1$ to set behaviour on detection of an error; these values have no effect when no error is detected.
A value of $0$ causes the printing of an error message and program execution will be halted; otherwise program execution continues. A value of $-1$ means that an error message is printed while a value of $1$ means that it is not.
If halting is not appropriate, the value $-1$ or $1$ is recommended. If message printing is undesirable, then the value $1$ is recommended. Otherwise, the value $0$ is recommended. When the value $-\mathbf{1}$ or $\mathbf{1}$ is used it is essential to test the value of ifail on exit.
On exit: ${\mathbf{ifail}}={\mathbf{0}}$ unless the routine detects an error or a warning has been flagged (see Section 6).

## 6Error Indicators and Warnings

If on entry ${\mathbf{ifail}}=0$ or $-1$, explanatory error messages are output on the current error message unit (as defined by x04aaf).
Errors or warnings detected by the routine:
${\mathbf{ifail}}=1$
f11btf has been called out of sequence.
${\mathbf{ifail}}=-7$
On entry, ${\mathbf{lwork}}=⟨\mathit{\text{value}}⟩$.
Constraint: ${\mathbf{lwork}}\ge 120$.
${\mathbf{ifail}}=-99$
See Section 7 in the Introduction to the NAG Library FL Interface for further information.
${\mathbf{ifail}}=-399$
Your licence key may have expired or may not have been installed correctly.
See Section 8 in the Introduction to the NAG Library FL Interface for further information.
${\mathbf{ifail}}=-999$
Dynamic memory allocation failed.
See Section 9 in the Introduction to the NAG Library FL Interface for further information.

Not applicable.

## 8Parallelism and Performance

f11btf is not threaded in any implementation.