NAG C Library Function Document

nag_sparse_nherm_basic_diagnostic (f11btc)

1
Purpose

nag_sparse_nherm_basic_diagnostic (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)). nag_sparse_nherm_basic_diagnostic (f11btc) returns information about the computations during an iteration and/or after this has been completed. The first function of the suite, nag_sparse_nherm_basic_setup (f11brc), is a setup function; the second function, nag_sparse_nherm_basic_solver (f11bsc), is the iterative solver itself.
These three functions are suitable for the solution of large sparse general (non-Hermitian) systems of equations.

2
Specification

#include <nag.h>
#include <nagf11.h>
void  nag_sparse_nherm_basic_diagnostic (Integer *itn, double *stplhs, double *stprhs, double *anorm, double *sigmax, Complex work[], Integer lwork, NagError *fail)

3
Description

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

4
References

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

5
Arguments

1:     itn Integer *Output
On exit: the number of iterations carried out by nag_sparse_nherm_basic_solver (f11bsc).
2:     stplhs double *Output
On exit: the current value of the left-hand side of the termination criterion used by nag_sparse_nherm_basic_solver (f11bsc).
3:     stprhs double *Output
On exit: the current value of the right-hand side of the termination criterion used by nag_sparse_nherm_basic_solver (f11bsc).
4:     anorm double *Output
On exit: if iterm=1 in the previous call to nag_sparse_nherm_basic_setup (f11brc), then anorm contains Ap, where p=1, 2 or , either supplied or, in the case of 1 or , estimated by nag_sparse_nherm_basic_solver (f11bsc); otherwise anorm=0.0.
5:     sigmax double *Output
On exit: if iterm=2 in the previous call to nag_sparse_nherm_basic_setup (f11brc), the current estimate of the largest singular value σ1A- of the preconditioned iteration matrix when it is used by the termination criterion in nag_sparse_nherm_basic_solver (f11bsc), either when it has been supplied to nag_sparse_nherm_basic_setup (f11brc) or it has been estimated by nag_sparse_nherm_basic_solver (f11bsc) (see also Sections 3 and 5 in nag_sparse_nherm_basic_setup (f11brc)); otherwise, sigmax=0.0 is returned.
6:     work[lwork] ComplexCommunication Array
On entry: the array work as returned by nag_sparse_nherm_basic_solver (f11bsc) (see also Sections 3 and 5 in nag_sparse_nherm_basic_solver (f11bsc)).
7:     lwork IntegerInput
On entry: the dimension of the array work (see also nag_sparse_nherm_basic_setup (f11brc)).
Constraint: lwork120.
Note:  although the minimum value of lwork ensures the correct functioning of nag_sparse_nherm_basic_diagnostic (f11btc), a larger value is required by the iterative solver nag_sparse_nherm_basic_solver (f11bsc) (see also nag_sparse_nherm_basic_setup (f11brc)).
8:     fail NagError *Input/Output
The NAG error argument (see Section 3.7 in How to Use the NAG Library and its Documentation).

6
Error Indicators and Warnings

NE_ALLOC_FAIL
Dynamic memory allocation failed.
See Section 2.3.1.2 in How to Use the NAG Library and its Documentation for further information.
NE_BAD_PARAM
On entry, argument value had an illegal value.
NE_INT
On entry, lwork=value.
Constraint: lwork120.
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 2.7.6 in How to Use the NAG Library and its Documentation for further information.
NE_NO_LICENCE
Your licence key may have expired or may not have been installed correctly.
See Section 2.7.5 in How to Use the NAG Library and its Documentation for further information.
NE_OUT_OF_SEQUENCE
nag_sparse_nherm_basic_diagnostic (f11btc) has been called out of sequence.

7
Accuracy

Not applicable.

8
Parallelism and Performance

nag_sparse_nherm_basic_diagnostic (f11btc) is not threaded in any implementation.

9
Further Comments

None.

10
Example

See Section 10 in nag_sparse_nherm_basic_setup (f11brc).