# NAG FL Interfacef12jef (feast_​symm_​contour)

## ▸▿ Contents

Settings help

FL Name Style:

FL Specification Language:

## 1Purpose

f12jef is a setup routine in a suite of routines consisting of f12jaf, f12jbf, f12jef, f12jjf and f12jrf. It is used to find some of the eigenvalues, and the corresponding eigenvectors, of a standard or generalized eigenvalue problem defined by real symmetric or complex Hermitian matrices. The initialization routine f12jaf must have been called prior to calling f12jef. In addition calls to f12jbf can be made to supply individual optional parameters to f12jef.
The suite of routines is suitable for the solution of large sparse eigenproblems where only a few eigenvalues from a selected range of the spectrum are required.

## 2Specification

Fortran Interface
 Subroutine f12jef ( emin, emax,
 Integer, Intent (Inout) :: ifail Real (Kind=nag_wp), Intent (In) :: emin, emax Type (c_ptr), Intent (In) :: handle
#include <nag.h>
 void f12jef_ (void **handle, const double *emin, const double *emax, Integer *ifail)
The routine may be called by the names f12jef or nagf_sparseig_feast_symm_contour.

## 3Description

The suite of routines is designed to calculate some of the eigenvalues, $\lambda$, and the corresponding eigenvectors, $x$, of a standard eigenvalue problem $Ax=\lambda x$, or a generalized eigenvalue problem $Ax=\lambda Bx$, where the coefficient matrices $A$ and $B$ are sparse, real symmetric or complex Hermitian. The suite can also be used to find selected eigenvalues/eigenvectors of smaller scale dense, real symmetric or complex Hermitian problems.
f12jef is used to specify a search interval on the real line, $\left[{E}_{\mathrm{min}},{E}_{\mathrm{max}}\right]$, within which eigenvalues will be sought (note that the eigenvalues of real symmetric and complex Hermitian eigenproblems are themselves real). f12jef uses this interval to define nodes and weights for an elliptical contour to be used by the solvers f12jjf or f12jrf. Since this contour is symmetric when reflected in the real line, the routine needs only to define the nodes and weights for the upper half-contour.
Polizzi E (2009) Density-Matrix-Based Algorithms for Solving Eigenvalue Problems Phys. Rev. B. 79 115112

## 5Arguments

1: $\mathbf{handle}$Type (c_ptr) Input
On entry: the handle to the internal data structure used by the NAG FEAST suite. It needs to be initialized by f12jaf. It must not be changed between calls to the NAG FEAST suite.
2: $\mathbf{emin}$Real (Kind=nag_wp) Input
On entry: the lower bound of the eigenvalue search interval.
Constraint: ${E}_{\mathrm{min}}<{E}_{\mathrm{max}}$.
3: $\mathbf{emax}$Real (Kind=nag_wp) Input
On entry: the upper bound of the eigenvalue search interval.
Constraint: ${E}_{\mathrm{min}}<{E}_{\mathrm{max}}$.
4: $\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$
The supplied handle does not define a valid handle to the data structure used by the NAG FEAST suite. It has not been properly initialized or it has been corrupted.
${\mathbf{ifail}}=2$
An invalid number of integration points was specified. For Gauss or Zolotarev integration, the values permitted are $1$$20$, $24$, $32$, $40$, $48$, $56$.
${\mathbf{ifail}}=3$
On entry, ${E}_{\mathrm{min}}=⟨\mathit{\text{value}}⟩$ and ${E}_{\mathrm{max}}=⟨\mathit{\text{value}}⟩$.
Constraint: ${E}_{\mathrm{min}}<{E}_{\mathrm{max}}$.
${\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.