SSTEIN2(l)
π SSTEIN2(l) β bestie, it's eigenvector o'clock π
okay so welcome to SSTEIN2, a LAPACK routine (we're on version 1.5, vintage but iconic) and she's here to do exactly one thing and do it gorgeously: compute the eigenvectors of a real symmetric tridiagonal matrix T corresponding to specified eigenvalues, using inverse iteration. that's the whole personality. no notes. π
β¨ NAME β¨
SSTEIN2 β she computes the eigenvectors of a real symmetric tridiagonal matrix T corresponding to specified eigenvalues, using inverse iteration. π¦
πΈ SYNOPSIS πΈ
SUBROUTINE SSTEIN2( N, D, E, M, W, IBLOCK, ISPLIT, ORFAC, Z, LDZ, WORK,
IWORK, IFAIL, INFO )
INTEGER INFO, LDZ, M, N
REAL ORFAC
INTEGER IBLOCK( * ), IFAIL( * ), ISPLIT( * ), IWORK( * )
REAL D( * ), E( * ), W( * ), WORK( * ), Z( LDZ, * )
likeβ¦ look at her. fourteen arguments. she's serving main character energy and she knows it. π
π PURPOSE π
SSTEIN2 computes the eigenvectors of a real symmetric tridiagonal matrix T corresponding to specified eigenvalues, using inverse iteration. periodt. that's the gig.
the maximum number of iterations allowed for each eigenvector is specified by an internal parameter MAXITS (currently set to 5). so like, five tries per eigenvector, bestie. that's the budget. π«Ά
π ARGUMENTS π
N(input)INTEGERβ the order of the matrix.N >= 0. can't be negative, that's not a vibe. π«D(input)REALarray, dimension(N)β the n diagonal elements of the tridiagonal matrixT. the main slay line. π«E(input)REALarray, dimension(N)β the (n-1) subdiagonal elements of the tridiagonal matrixT, in elements1toN-1.E(N)need not be set. so like, bestie, the last one can justβ¦ not. she's off duty. πM(input)INTEGERβ the number of eigenvectors to be found.0 <= M <= N. keep it in range or we're gonna have a moment. πW(input)REALarray, dimension(N)β the firstMelements ofWcontain the eigenvalues for which eigenvectors are to be computed. the eigenvalues should be grouped by split-off block and ordered from smallest to largest within the block. (the output arrayWfromSSTEBZwithORDER = 'B'is expected here.) so like, do the sorting first, we're not doing it for you. πIBLOCK(input)INTEGERarray, dimension(N)β the submatrix indices associated with the corresponding eigenvalues inW;IBLOCK(i)=1if eigenvalueW(i)belongs to the first submatrix from the top,=2ifW(i)belongs to the second submatrix, etc. (the output arrayIBLOCKfromSSTEBZis expected here.) it's giving "which block do you belong to, babe". π·οΈISPLIT(input)INTEGERarray, dimension(N)β the splitting points, at whichTbreaks up into submatrices. the first submatrix consists of rows/columns1toISPLIT( 1 ), the second of rows/columnsISPLIT( 1 )+1throughISPLIT( 2 ), etc. (the output arrayISPLITfromSSTEBZis expected here.) the way she just divides β iconic. βοΈORFAC(input)REALβORFACspecifies which eigenvectors should be orthogonalized. eigenvectors that correspond to eigenvalues which are withinORFAC*||T||of each other are to be orthogonalized. basically: too close together? we're making them perpendicular. no cap. πZ(output)REALarray, dimension(LDZ, M)β the computed eigenvectors. the eigenvector associated with the eigenvalueW(i)is stored in the i-th column ofZ. any vector which fails to converge is set to its current iterate afterMAXITSiterations. so like, if she gives up, she leaves what she had. it's giving "good enough, babe". πLDZ(input)INTEGERβ the leading dimension of the arrayZ.LDZ >= max(1,N). respect the dimension, bestie. β¨WORK(workspace)REALarray, dimension(5*N). her little scratch pad. πIWORK(workspace)INTEGERarray, dimension(N). more scratch pad, but integers this time. πIFAIL(output)INTEGERarray, dimension(M)β on normal exit, all elements ofIFAILare zero. if one or more eigenvectors fail to converge afterMAXITSiterations, then their indices are stored in arrayIFAIL. the naughty list. you do NOT want your index here. πINFO(output)INTEGERβ the receipts:= 0: successful exit. slay. β< 0: ifINFO = -i, thei-th argument had an illegal value. bestie what did you DO. π> 0: ifINFO = i, thenieigenvectors failed to converge inMAXITSiterations. their indices are stored in arrayIFAIL. she tried. she really did. π₯²
π PARAMETERS π
MAXITSINTEGER, default =5β the maximum number of iterations performed. five. that's the limit. manifest convergence. π―οΈEXTRAINTEGER, default =2β the number of iterations performed after norm growth criterion is satisfied, should be at least1. so like, a little victory lap after the norm growth criterion is satisfied. but minimum1, okay? don't be skipping the lap. πββοΈ
β οΈ heads up bestie:W,IBLOCK, andISPLITall wanna come fromSSTEBZ(withORDER = 'B'forW). don't show up with random arrays and expect magic. π
π that's the whole page, bestie π this was LAPACK version 1.5, dated 12 May 1997 β yes she's a 90s baby and she's still eating. π go orthogonalize something. π¦β¨
π¦ where this page comes from
- ubuntu jammy: scalapack-doc 1.5-11
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms