# NAG CL Interfacef12jac (feast_​init)

Settings help

CL Name Style:

## 1Purpose

f12jac initializes a data structure for the NAG FEAST suite of functions consisting of f12jac, f12jbc, f12jec, f12jfc, f12jgc, f12jjc, f12jkc, f12jrc, f12jsc, f12jtc, f12juc, f12jvc and f12jzc. It is used to find some of the eigenvalues, and the corresponding eigenvectors, of a standard, generalized or polynomial eigenvalue problem.
The suite of functions is suitable for the solution of large, sparse eigenproblems where only those eigenvalues within a selected region of the complex plane are required.

## 2Specification

 #include
 void f12jac (void **handle, NagError *fail)
The function may be called by the names: f12jac or nag_sparseig_feast_init.

## 3Description

The NAG FEAST suite of functions is designed to calculate some of the eigenvalues, $\lambda$, and the corresponding eigenvectors, $x$, of a standard eigenvalue problem $Ax=\lambda x$, a generalized eigenvalue problem $Ax=\lambda Bx$, where $A$ and $B$ are large and sparse, or a polynomial eigenvalue problem ${\sum }_{i}{\lambda }^{i}{A}_{i}x=0$. It can also be used to find eigenvalues/eigenvectors of smaller scale dense problems. The NAG FEAST suite is based on the FEAST library, using contour integration to find the eigenvalues within a contour in the complex plane.
f12jac is a setup function which must be called before the option setting function f12jbc, before the contour definition functions f12jec, f12jfc or f12jgc, and before the reverse communication solvers f12jjc, f12jkc, f12jrc, f12jsc, f12jtc, f12juc or f12jvc.
This setup function initializes the handle to a data structure used internally by the NAG FEAST suite and sets (to their default values) all options that can be set by you via the option setting function f12jbc. For details of the options available and how to set them see Section 11.1 in f12jbc. When the handle is no longer needed, f12jzc must be called to destroy it and deallocate all the allocated memory and data within.

## 4References

Polizzi E (2009) Density-Matrix-Based Algorithms for Solving Eigenvalue Problems Phys. Rev. B. 79 115112

## 5Arguments

1: $\mathbf{handle}$void ** Output
Note: handle does not need to be set on input.
On exit: holds a handle to the internal data structure used by the NAG FEAST suite.
2: $\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.
NE_BAD_PARAM
On entry, argument $⟨\mathit{\text{value}}⟩$ had an illegal value.
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.

Not applicable.

## 8Parallelism and Performance

Background information to multithreading can be found in the Multithreading documentation.
f12jac is not threaded in any implementation.

## 9Further Comments

### 9.1Additional Licensor

Parts of the code for f12jac are distributed under the BSD software License. Please refer to Library Licensors for further details.

## 10Example

See the example for f12jjc.