ELPA_GENERALIZED_EIGENVECTORS(3)
π NAME
Okay so bestie, this is the elpa_gener...igenvectors(3) page from the Library Functions Manual, and the main character is elpa_generalized_eigenvectors β it computes all eigenvalues and (part of) eigenvectors of a generalized eigenvalue problem, A*Q = Ξ»*B*Q, for real symmetric or complex hermitian matrices A, B. No cap. π
There are also variations of this routine that can accept not only host but also device pointers as input/output. Names of these routines explicitly contain the corresponding datatypes, so it's giving very βsay my type out loudβ energy: elpa_generalized_eigenvectors_double, elpa_generalized_eigenvectors_float, elpa_generalized_eigenvectors_double_complex, elpa_generalized_eigenvectors_float_complex. β¨
π SYNOPSIS π
FORTRAN INTERFACE
use elpa
class(elpa_t), pointer :: elpa_handle
call elpa_handle%generalized_eigenvectors (a, b, ev, q,
is_already_decomposed, error)
With the definitions of the input and output variables:
class(elpa_t) :: elpa_handleβ An instance of the ELPA object.datatype :: aβ The local matrixafor which the eigenvalues and eigenvalues should be computed. The dimensions of matrixamust be set BEFORE with the methodselpa_set(3)andelpa_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 local matrixbdefining the generalized eigenvalue problem. The dimensions and datatype of the matrixbhas to be the same as for matrixa.datatype :: evβ The array where the eigenvaluesΞ»will be stored in ascending order. Thedatatype_realofevcan 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 eigenvalues.datatype :: qβ The storage space for the computed eigenvectorsQ. The number of requested eigenvectors,nev, must be set BEFORE with the methodselpa_set(3)andelpa_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)".logical :: is_already_decomposedβ Has to be set to.false.for the first call with a givenband to.true.for each subsequent call with the sameb, sincebthen 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 queried with the functionelpa_strerr(3).
C/C++ INTERFACE
#include <elpa/elpa.h>
elpa_t elpa_handle;
void elpa_generalized_eigenvectors(elpa_t elpa_handle, datatype *a,
datatype *b, datatype *ev, datatype *q, int is_already_decomposed, int
*error);
With the definitions of the input and output variables:
elpa_t elpa_handle;β The handle to the ELPA object.datatype *a;β The local matrixafor which all eigenvalues and (part of) eigenvectors should be computed. The dimensions of the matrix must be set BEFORE with the methodselpa_set(3)andelpa_setup(3). The global matrix has to be symmetric or hermitian, this is not checked by the routine. The datatype can be one of"double","float","double complex"/"std::complex<double>","float complex"/"std::complex<float>"for C/C++.datatype *b;β The local matrixbdefining the generalized eigenvalue problem. The dimensions and the datatype of the matrixbmust be the same as matrixa. The global matrix has to be symmetric or hermitian, this is not checked by the routine. The datatype can be one of"double","float","double complex"/"std::complex<double>","float complex"/"std::complex<float>"for C/C++.datatype_real *ev;β The array where the eigenvaluesΞ»will be stored in ascending order. Eigenvalues will be stored in ascending order. Thedatatype_realcan be either"double"or"float". Note that the eigenvalues of complex hermitian matrices are also real.datatype *q;β The storage space for the computed eigenvectorsQ. The number of requested eigenvectors must be set BEFORE with the methodselpa_set(3)andelpa_setup(3). The datatype can be one of"double","float","double complex"/"std::complex<double>","float complex"/"std::complex<float>"for C/C++.int is_already_decomposed;β Has to be set to0for the first call with a givenband1for each subsequent call with the sameb, sincebthen 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 queried withelpa_strerr(3).
π DESCRIPTION
Computes the generalized eigenvalues and (part of) the generalized eigenvectors for a real symmetric or complex hermitian generalized eigenproblem. 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. In particular, the number of eigenvectors to be computed, nev, 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. That part is very βyou handle the setup, bestie, I handle the mathβ energy. π«Ά
π SEE ALSO
elpa_init(3)elpa_allocate(3)elpa_set(3)elpa_setup(3)elpa_strerr(3)elpa_eigenvalues(3)elpa_eigenvectors(3)elpa_cholesky(3)elpa_invert_triangular(3)elpa_solve_tridiagonal(3)elpa_hermitian_multiply(3)elpa_uninit(3)elpa_deallocate(3)
Okay that's the whole page, bestie π«Ά β source/version ELPA, date Thu Nov 28 2024, and the footer name elpa_gener...igenvectors(3). Periodt. π
β¨
π¦ where this page comes from
- nixpkgs unstable: elpa 2026.02.002
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms