elpa_solve_tridiagonal(3)

πŸ“¦ version 2026.02.002, in nixpkgs unstable

🌈 elpa_solve_tridiagonal 🌈

okay so bestie, this page lives in the Library Functions Manual, and the main character is elpa_solve_tridiagonal. it's giving β€œtiny tridiagonal matrix, huge eigenvalue energy” πŸ’…βœ¨

✨ NAME ✨

elpa_solve_tridiagonal β€” computes the eigenvalue problem for real symmetric tridiagonal matrix. like, it computes all eigenvalues Ξ» and all eigenvectors for a real symmetric tridiagonal matrix: T*Q = Ξ»*Q. periodt. πŸ‘‘

πŸŽ€ SYNOPSIS πŸŽ€

πŸ’– FORTRAN INTERFACE πŸ’–

use elpa
class(elpa_t), pointer :: elpa_handle

call elpa_handle%solve_tridiagonal (d, e, q, error)

with the definitions of the input and output variables:

  • class(elpa_t) :: elpa_handle β€” an instance of the ELPA object. she's the handle, she's the moment.
  • datatype_real :: d β€” the diagonal elements of matrix T. d is a gloabal array of size elpa_handle%na, replicated on all MPI ranks. The dimensions of the matrix must be set BEFORE with elpa_setup(3). On exit the eigenvalues are stored in d. The datatype_real of the diagonal elements can either be "real(kind=c_double)" or "real(kind=c_float)".
  • datatype_real :: e β€” the offdiagonal elements of matrix T. e is a gloabal array of size elpa_handle%na-1, replicated on all MPI ranks. The datatype_real of the diagonal elements can either be "real(kind=c_double)" or "real(kind=c_float)". (yes, the page says β€œdiagonal elements” here too β€” not me fixing it, bestie πŸ’€)
  • datatype_real :: q β€” the storage space for the computed eigenvectors Q. The datatype_real of the matrix can be either "real(kind=c_double)" or "real(kind=c_float)".
  • integer, optional :: error β€” the return error code of the function. Should be "ELPA_OK". The error code can be queried with the function elpa_strerr(3).

πŸ¦‹ C/C++ INTERFACE πŸ¦‹

#include <elpa/elpa.h>
elpa_t elpa_handle;

void elpa_solve_tridiagonal(elpa_t elpa_handle, datatype_real *d,
datatype_real *e, datatype_real *q, int *error);

with the definitions of the input and output variables:

  • elpa_t elpa_handle; β€” the handle to the ELPA object.
  • datatype_real *d; β€” the diagonal elements of matrix T. d is a gloabal array of size na, replicated on all MPI ranks. The dimensions of the matrix must be set BEFORE with elpa_setup(3). On exit the eigenvalues are stored in d. The datatype_real can be one of "double" or "float".
  • datatype_real *e; β€” the offdiagonal elements of matrix T. ev is a gloabal array of size na-1, replicated on all MPI ranks. The datatype_real can be one of "double" or "float". (the page says ev here, not e; iconic, keeping it fr fr)
  • datatype_real *q; β€” the storage space for the computed eigenvectors Q. The datatype_real can be one of "double" or "float".
  • int *error; β€” the error code of the function. Should be "ELPA_OK". The error codes can be queried with elpa_strerr(3).

🌸 DESCRIPTION 🌸

computes the eigenvalue problem of a real symmetric tridiagonal matrix. The functions elpa_init(3), elpa_allocate(3), elpa_set(3), and elpa_setup(3) must be called BEFORE elpa_solve_tridiagonal can be called. that's the whole vibe check, no cap 🫢


πŸ¦‹ SEE ALSO πŸ¦‹

sign-off from the footer: source/version ELPA, date Thu Nov 28 2024, page elpa_solve_tridiagonal(3) β€” bye bestie, go get those eigenvalues πŸ’–βœ¨πŸ’…

πŸ“¦ where this page comes from