DSTEIN2(l)

πŸ“¦ version 1.5, in ubuntu jammy

πŸ’– DSTEIN2 β€” bestie's guide to the LAPACK routine πŸ’–

okay so welcome to DSTEIN2, a LAPACK routine (we're on version 1.5, she's vintage, she's iconic). This one is all about eigenvectors of a real symmetric tridiagonal matrix. No cap.


✨ NAME ✨

DSTEIN2 β€” compute the eigenvectors of a real symmetric tridiagonal matrix T corresponding to specified eigenvalues, using inverse iteration. πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

SUBROUTINE DSTEIN2( N, D, E, M, W, IBLOCK, ISPLIT, ORFAC, Z, LDZ, WORK,
                    IWORK, IFAIL, INFO )

    INTEGER         INFO, LDZ, M, N

    DOUBLE          PRECISION ORFAC

    INTEGER         IBLOCK( * ), IFAIL( * ), ISPLIT( * ), IWORK( * )

    DOUBLE          PRECISION D( * ), E( * ), W( * ), WORK( * ), Z( LDZ,
                    * )

🌸 PURPOSE 🌸

So basically, DSTEIN2 computes the eigenvectors of a real symmetric tridiagonal matrix T corresponding to specified eigenvalues, using inverse iteration. That's the whole vibe. πŸ¦‹

And listen β€” the maximum number of iterations allowed for each eigenvector is specified by an internal parameter MAXITS (currently set to 5). Five. That's the budget. Bestie gets five shots. πŸ‘‘


πŸ’œ ARGUMENTS πŸ’œ

  • N (input) INTEGER β€” the order of the matrix. Constraint: N >= 0. 🫢
  • D (input) DOUBLE PRECISION array, dimension (N) β€” the n diagonal elements of the tridiagonal matrix T. πŸ“
  • E (input) DOUBLE PRECISION array, dimension (N) β€” the (n-1) subdiagonal elements of the tridiagonal matrix T, sitting in elements 1 to N-1. E(N) need not be set. She's off the clock, leave her alone. πŸ’€
  • M (input) INTEGER β€” the number of eigenvectors to be found. Constraint: 0 <= M <= N. 🌈
  • W (input) DOUBLE PRECISION array, dimension (N) β€” the first M elements of W contain the eigenvalues for which eigenvectors are to be computed. These eigenvalues should be grouped by split-off block and ordered from smallest to largest within the block. (The output array W from DSTEBZ with ORDER = 'B' is expected here.) It's giving very specific requirements, and honestly? Respect. ⭐
  • IBLOCK (input) INTEGER array, dimension (N) β€” the submatrix indices associated with the corresponding eigenvalues in W. So IBLOCK(i)=1 if eigenvalue W(i) belongs to the first submatrix from the top, =2 if W(i) belongs to the second submatrix, etc. (The output array IBLOCK from DSTEBZ is expected here.) 🧚
  • ISPLIT (input) INTEGER array, dimension (N) β€” the splitting points, at which T breaks up into submatrices. The first submatrix consists of rows/columns 1 to ISPLIT( 1 ), the second of rows/columns ISPLIT( 1 )+1 through ISPLIT( 2 ), etc. (The output array ISPLIT from DSTEBZ is expected here.) The way she just... divides the matrix. Main character energy. πŸ’…
  • ORFAC (input) DOUBLE PRECISION β€” ORFAC specifies which eigenvectors should be orthogonalized. Eigenvectors that correspond to eigenvalues which are within ORFAC*||T|| of each other are to be orthogonalized. Close eigenvalues get the ortho treatment, periodt. ✨
  • Z (output) DOUBLE PRECISION array, dimension (LDZ, M) β€” the computed eigenvectors. The eigenvector associated with the eigenvalue W(i) is stored in the i-th column of Z. Any vector which fails to converge is set to its current iterate after MAXITS iterations. Not ideal, not a slay, but that's the deal. 😭
  • LDZ (input) INTEGER β€” the leading dimension of the array Z. Constraint: LDZ >= max(1,N). πŸ”₯
  • WORK (workspace) DOUBLE PRECISION array, dimension (5*N). It's doing the work, hence the name, iykyk. 🫢
  • IWORK (workspace) INTEGER array, dimension (N). πŸŽ€
  • IFAIL (output) INTEGER array, dimension (M) β€” on normal exit, all elements of IFAIL are zero. If one or more eigenvectors fail to converge after MAXITS iterations, then their indices are stored in array IFAIL. So if IFAIL has entries, that's the group chat telling you who didn't show up. πŸ™ˆ
  • INFO (output) INTEGER β€” the status report, and she has three moods:
    • = 0: successful exit. πŸŽ‰
    • < 0: if INFO = -i, the i-th argument had an illegal value. 🚨
    • > 0: if INFO = i, then i eigenvectors failed to converge in MAXITS iterations. Their indices are stored in array IFAIL. πŸ’€

πŸ‘‘ PARAMETERS πŸ‘‘

  • MAXITS INTEGER, default = 5 β€” the maximum number of iterations performed. Five. That's it. That's the number. ⭐
  • EXTRA INTEGER, default = 2 β€” the number of iterations performed after the norm growth criterion is satisfied, and it should be at least 1. So the floor is 1, bestie, do not go below. 🌸

Heads up: this routine is from LAPACK version 1.5, so check your version and constraints before you ship anything to prod. She's an elder, treat her with respect. πŸ’–

That's the whole page, no crumbs left. Sending you love from LAPACK routine version 1.5, dated 12 May 1997 β€” she's been serving eigenvectors since the 90s and she's still booked and busy. πŸ’…βœ¨πŸ¦‹

πŸ“¦ where this page comes from