# NAG FL Interfacef12aef (real_​monit)

Note: this routine uses optional parameters to define choices in the problem specification. If you wish to use default settings for all of the optional parameters, then the option setting routine f12adf need not be called. If, however, you wish to reset some or all of the settings please refer to Section 11 in f12adf for a detailed description of the specification of the optional parameters.

## ▸▿ Contents

Settings help

FL Name Style:

FL Specification Language:

## 1Purpose

f12aef can be used to return additional monitoring information during computation. It is in a suite of routines consisting of f12aaf, f12abf, f12acf, f12adf and f12aef.

## 2Specification

Fortran Interface
 Subroutine f12aef ( comm)
 Integer, Intent (In) :: icomm(*) Integer, Intent (Out) :: niter, nconv Real (Kind=nag_wp), Intent (In) :: comm(*) Real (Kind=nag_wp), Intent (Inout) :: ritzr(*), ritzi(*), rzest(*)
#include <nag.h>
 void f12aef_ (Integer *niter, Integer *nconv, double ritzr[], double ritzi[], double rzest[], const Integer icomm[], const double comm[])
The routine may be called by the names f12aef or nagf_sparseig_real_monit.

## 3Description

The suite of routines is designed to calculate some of the eigenvalues, $\lambda$, (and optionally the corresponding eigenvectors, $x$) of a standard eigenvalue problem $Ax=\lambda x$, or of a generalized eigenvalue problem $Ax=\lambda Bx$ of order $n$, where $n$ is large and the coefficient matrices $A$ and $B$ are sparse, real and nonsymmetric. The suite can also be used to find selected eigenvalues/eigenvectors of smaller scale dense, real and nonsymmetric problems.
On an intermediate exit from f12abf with ${\mathbf{irevcm}}=4$, f12aef may be called to return monitoring information on the progress of the Arnoldi iterative process. The information returned by f12aef is:
• the number of the current Arnoldi iteration;
• the number of converged eigenvalues at this point;
• the real and imaginary parts of the converged eigenvalues;
• the error bounds on the converged eigenvalues.
f12aef does not have an equivalent routine from the ARPACK package which prints various levels of detail of monitoring information through an output channel controlled via an argument value (see Lehoucq et al. (1998) for details of ARPACK routines). f12aef should not be called at any time other than immediately following an ${\mathbf{irevcm}}=4$ return from f12abf.

## 4References

Lehoucq R B (2001) Implicitly restarted Arnoldi methods and subspace iteration SIAM Journal on Matrix Analysis and Applications 23 551–562
Lehoucq R B and Scott J A (1996) An evaluation of software for computing eigenvalues of sparse nonsymmetric matrices Preprint MCS-P547-1195 Argonne National Laboratory
Lehoucq R B and Sorensen D C (1996) Deflation techniques for an implicitly restarted Arnoldi iteration SIAM Journal on Matrix Analysis and Applications 17 789–821
Lehoucq R B, Sorensen D C and Yang C (1998) ARPACK Users' Guide: Solution of Large-scale Eigenvalue Problems with Implicitly Restarted Arnoldi Methods SIAM, Philadelphia

## 5Arguments

1: $\mathbf{niter}$Integer Output
On exit: the number of the current Arnoldi iteration.
2: $\mathbf{nconv}$Integer Output
On exit: the number of converged eigenvalues so far.
3: $\mathbf{ritzr}\left(*\right)$Real (Kind=nag_wp) array Output
Note: the dimension of the array ritzr must be at least ${\mathbf{ncv}}$ (see f12aaf).
On exit: the first nconv locations of the array ritzr contain the real parts of the converged approximate eigenvalues.
4: $\mathbf{ritzi}\left(*\right)$Real (Kind=nag_wp) array Output
Note: the dimension of the array ritzi must be at least ${\mathbf{ncv}}$ (see f12aaf).
On exit: the first nconv locations of the array ritzi contain the imaginary parts of the converged approximate eigenvalues.
5: $\mathbf{rzest}\left(*\right)$Real (Kind=nag_wp) array Output
Note: the dimension of the array rzest must be at least ${\mathbf{ncv}}$ (see f12aaf).
On exit: the first nconv locations of the array rzest contain the Ritz estimates (error bounds) on the converged approximate eigenvalues.
6: $\mathbf{icomm}\left(*\right)$Integer array Communication Array
Note: the dimension of the array icomm must be at least $\mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,{\mathbf{licomm}}\right)$, where licomm is passed to the setup routine  (see f12aaf).
On entry: the array icomm output by the preceding call to f12abf.
7: $\mathbf{comm}\left(*\right)$Real (Kind=nag_wp) array Communication Array
Note: the dimension of the array comm must be at least $\mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,{\mathbf{lcomm}}\right)$, where lcomm is passed to the setup routine  (see f12aaf).
On entry: the array comm output by the preceding call to f12abf.

None.

## 7Accuracy

A Ritz value, $\lambda$, is deemed to have converged if its Ritz estimate $\le {\mathbf{Tolerance}}×|\lambda |$. The default Tolerance used is the machine precision given by x02ajf.

## 8Parallelism and Performance

f12aef is not threaded in any implementation.

None.

## 10Example

This example solves $Ax=\lambda Bx$ in shifted-real mode, where $A$ is the tridiagonal matrix with $2$ on the diagonal, $-2$ on the subdiagonal and $3$ on the superdiagonal. The matrix $B$ is the tridiagonal matrix with $4$ on the diagonal and $1$ on the off-diagonals. The shift sigma, $\sigma$, is a complex number, and the operator used in the shifted-real iterative process is $\mathrm{op}=\text{real}\left({\left(A-\sigma B\right)}_{-1}B\right)$.

### 10.1Program Text

Program Text (f12aefe.f90)

### 10.2Program Data

Program Data (f12aefe.d)

### 10.3Program Results

Program Results (f12aefe.r)