# NAG CL Interfacef11gtc (complex_​herm_​basic_​diag)

Settings help

CL Name Style:

## 1Purpose

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

## 2Specification

 #include
 void f11gtc (Integer *itn, double *stplhs, double *stprhs, double *anorm, double *sigmax, Integer *its, double *sigerr, const Complex work[], Integer lwork, NagError *fail)
The function may be called by the names: f11gtc, nag_sparse_complex_herm_basic_diag or nag_sparse_herm_basic_diagnostic.

## 3Description

f11gtc returns information about the solution process. It can be called both during a monitoring step of the solver f11gsc or after this solver has completed its tasks. Calling f11gtc at any other time will result in an error condition being raised.
For further information you should read the documentation for f11grc and f11gsc.
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 f11gsc.
2: $\mathbf{stplhs}$double * Output
On exit: the current value of the left-hand side of the termination criterion used by f11gsc.
3: $\mathbf{stprhs}$double * Output
On exit: the current value of the right-hand side of the termination criterion used by f11gsc.
4: $\mathbf{anorm}$double * Output
On exit: the norm ${‖A‖}_{1}={‖A‖}_{\infty }$ when either it has been supplied to f11grc or it has been estimated by f11gsc (see also Sections 3 and 5 in f11grc).
Otherwise, ${\mathbf{anorm}}=0.0$ is returned.
5: $\mathbf{sigmax}$double * Output
On exit: the current estimate of the largest singular value ${\sigma }_{1}\left(\overline{A}\right)$ of the preconditioned iteration matrix $\overline{A}={E}^{-1}A{E}^{-\mathrm{H}}$, when either it has been supplied to f11grc or it has been estimated by f11gsc (see also Sections 3 and 5 in f11grc). Note that if ${\mathbf{its}}<{\mathbf{itn}}$ then sigmax contains the final estimate. If, on final exit from f11gsc, ${\mathbf{its}}={\mathbf{itn}}$, the estimation of ${\sigma }_{1}\left(\overline{A}\right)$ may have not converged: in this case you should look at the value returned in sigerr. Otherwise, ${\mathbf{sigmax}}=0.0$ is returned.
6: $\mathbf{its}$Integer * Output
On exit: the number of iterations employed so far in the computation of the estimate of ${\sigma }_{1}\left(\overline{A}\right)$, the largest singular value of the preconditioned matrix $\overline{A}={E}^{-1}A{E}^{-\mathrm{H}}$, when ${\sigma }_{1}\left(\overline{A}\right)$ has been estimated by f11gsc using the bisection method (see also Sections 3, 5 and 9 in f11grc). Otherwise, ${\mathbf{its}}=0$ is returned.
7: $\mathbf{sigerr}$double * Output
On exit: if ${\sigma }_{1}\left(\overline{A}\right)$ has been estimated by f11gsc using bisection,
 $sigerr=max(|σ1(k)-σ1(k-1)|σ1(k),|σ1(k)-σ1(k-2)|σ1(k)) ,$
where $k={\mathbf{its}}$ denotes the iteration number. The estimation has converged if ${\mathbf{sigerr}}\le {\mathbf{sigtol}}$ where sigtol is an input argument to f11grc.
Otherwise, ${\mathbf{sigerr}}=0.0$ is returned.
8: $\mathbf{work}\left[{\mathbf{lwork}}\right]$const Complex Communication Array
On entry: the array work as returned by f11gsc (see also Section 3 in f11gsc).
9: $\mathbf{lwork}$Integer Input
On entry: the dimension of the array work (see also Section 5 in f11grc).
Constraint: ${\mathbf{lwork}}\ge 120$.
Note:  although the minimum value of lwork ensures the correct functioning of f11gtc, a larger value is required by the iterative solver f11gsc (see also Section 5 in f11grc).
10: $\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
f11gtc has been called out of sequence.

Not applicable.