# FreeBSD Manual Pages

```elpa_generalized_eigenvalueLibrary Functions Maelpa_generalized_eigenvalues(3)

NAME
elpa_generalized_eigenvalues - computes the eigenvalues of a
generalized eigenvalue problem for real symmetric or complex hermitian
matrices

SYNOPSIS
FORTRAN INTERFACE
use elpa
class(elpa_t), pointer :: elpa

call elpa%generalized_eigenvalues (a, b,	ev, is_already_decomopsed,
error)

With the	definitions of the input and output variables:

class(elpa_t) ::	elpa  !	returns	an instance of the ELPA	object

datatype	:: a
The matrix a for which the eigenvalues should be computed. The
dimensions of matrix a must be set BEFORE	with the methods
elpa_set(3) and elpa_setup(3). The datatype of the matrix	can be
one of "real(kind=c_double)", "real(kind=c_float)",
"complex(kind=c_double)",	or "complex(kind=c_float)"

datatype	:: b
The matrix b defining the	generalized eigenvalue problem.	The
dimensions and datatype of the matrix b has to be	the same as
for matrix a.

datatype	:: ev
The vector ev where the eigenvalues will be stored in ascending
order. The datatype of the vector	ev can be either
"real(kind=c_double)", or	"real(kind=c_float)", depending	of the
datatype of the matrix. Note that	complex	hermitian matrices
also have	real valued eigenvalues.

Has to be	set to .false. for the first call with a given b and
.true. for each subsequent call with the same b, since b then
already contains decomposition and thus the decomposing step is
skipped.

integer,	optional :: error
The return error code of the function. Should be "ELPA_OK". The
error code can be	querried with the function elpa_strerr(3)

C INTERFACE
#include	<elpa/elpa.h>
elpa_t handle;

void elpa_generalized_eigenvalues(elpa_t	handle,	datatype *a, datatype
*b, datatype *ev, int is_already_decomposed, int	*error);

With the	definitions of the input and output variables:

elpa_t handle;
The handle to the	ELPA object

datatype	*a;
The matrix a for which the eigenvalues should be computed. The
dimensions of the	matrix must be set BEFORE with the methods
elpa_set(3) and elpa_setup(3). The datatype can be one of
"double",	"float", "double complex", or "float complex".

datatype	*b;
The matrix b defining the	generalized eigenvalue problem.	The
dimensions and the datatype of the matrix	b must be the same as
matrix a.

datatype	*ev;
The storage for the computed eigenvalues.	Eigenvalues will be
stored in	ascendig order.	The datatype can be either "double" or
"float". Note that the eigenvalues of complex hermitian matrices
are also real.

Has to be	set to 0 for the first call with a given b and 1 for
each subsequent call with	the same b, since b then already
contains decomposition and thus the decomposing step is skipped.

int *error;
The error	code of	the function. Should be	"ELPA_OK". The error
codes can	be querried with elpa_strerr(3)

DESCRIPTION
Compute the generalized eigenvalues and (parts of) the eigenvector
spectrum	of a real symmtric or complex hermitian	matrix.The functions
elpa_init(3), elpa_allocate(3), elpa_set(3), and	elpa_setup(3) must be
called BEFORE elpa_generalized_eigenvalues can be called. Especially
the number of eigenvectors to be	computed can be	set with elpa_set(3).
Unlike in the case of ordinary eigenvalue problem, the generalized
problem calls some external scalapack routines. The user	is responsible
for initialization of the blacs context,	which then has to be passed to
elpa by elpa_set(3) BEFORE elpa_generalized_eigenvalues can be called.