Computes the eigenvectors of a tridiagonal matrix using inverse iteration.
functioncomputes the eigenvectors of a symmetric tridiagonal matrix
Tcorresponding to specified eigenvalues, by inverse iteration.
p?steindoes not orthogonalize vectors that are on different processes. The extent of orthogonalization is controlled by the input parameter
lwork. Eigenvectors that are to be orthogonalized are computed by the same process.
p?steindecides on the allocation of work among the processes and then calls
function) on each individual process. If insufficient workspace is allocated, the expected orthogonalization may not be done.
If the eigenvectors obtained are not orthogonal, increase
lworkand run the code again.
NPCOLis the total number of processes.
- (global) The order of the matrixT(.n≥0)
- (global) The number of eigenvectors to be returned.
- (global)Arrays:of sizedncontains the diagonal elements ofT.of sizeecontains the off-diagonal elements ofn-1T.of sizewmcontains all the eigenvalues grouped by split-off block. The eigenvalues are supplied from smallest to largest within the block. (Here the output arraywfromp?stebzwith order=is expected. The array should be replicated in all processes.)'B'
- (global)Array of sizen. The submatrix indices associated with the corresponding eigenvalues infor eigenvalues belonging to the first submatrix from the top, 2 for those belonging to the second submatrix, etc. (The output arrayw: 1iblockfromp?stebzis expected here).
- (global)Array of sizen. The splitting points at whichTbreaks up into submatrices. The first submatrix consists of rows/columns 1 toisplit, the second of rows/columnsthroughisplit+1, and so on, and theisplitnsplit-th submatrix consists of rows/columnsthroughisplit[+1nsplit-2]. (The output arrayisplit[=nsplit-1]nisplitfromp?stebzis expected here.)
- (global)orfacspecifies which eigenvectors should be orthogonalized. Eigenvectors that correspond to eigenvalues withinof each other are to be orthogonalized. However, if the workspace is insufficient (seeorfac*||T||lwork), this tolerance may be decreased until all eigenvectors can be stored in one process. No orthogonalization is done iforfacis equal to zero. A default value of 1000 is used iforfacis negative.orfacshould be identical on all processes
- (global) The row and column indices in the global matrixZindicating the first row and the first column of the submatrixZ, respectively.
- (global and local) array of sizedlen_. The array descriptor for the distributed matrixZ.
- (local).Workspace array of sizelwork.
- (local)lworkcontrols the extent of orthogonalization which can be done. The number of eigenvectors for which storage is allocated on each process is. Eigenvectors corresponding to eigenvalue clusters of size (nvec=floor((lwork-max(5*n,np00*mq00))/n)are guaranteed to be orthogonal (the orthogonality is similar to that obtained fromnvec-ceil(m/p) + 1)?stein2).lworkmust be no smaller thanmax(5*and should have the same input value on all processes.n,np00*mq00) +ceil(m/p)*nIt is the minimum value oflworkinput on different processes that is significant.If, thenlwork= -1lworkis global input and a workspace query is assumed; thefunctiononly calculates the minimum and optimal size for all work arrays. Each of these values is returned in the first entry of the corresponding work array, and no error message is issued bypxerbla.
- (local)Workspace array of size3.n+p+1
- (local) The size of the arrayiwork. It must be greater than3*.n+p+1If, thenliwork= -1liworkis global input and a workspace query is assumed; thefunctiononly calculates the minimum and optimal size for all work arrays. Each of these values is returned in the first entry of the corresponding work array, and no error message is issued bypxerbla.
- (local)Array of size.descz[,dlen_-1]n/NPCOL+NB)zcontains the computed eigenvectors associated with the specified eigenvalues. Any vector which fails to converge is set to its current iterate after MAXIT iterations (See?stein2). On output,zis distributed across thepprocesses in block cyclic format.
- On exit,workgives a lower bound on the workspace (lwork) that guarantees the user desired orthogonalization (seeorfac). Note that this may overestimate the minimum workspace needed.
- On exit,contains the amount of integer workspace required.iworkOn exit, thethroughiworkindicate the eigenvectors computed by each process. Processiwork[p+1]icomputes eigenvectors indexedthroughiwork[i+1]+1.iwork[i+2]
- (global) Array of sizem. On normal exit, all elements ofifailare zero. If one or more eigenvectors fail to converge after MAXIT iterations (as in?stein), thenis returned. Ifinfo> 0mod(,info, then form+1)>0toi=1, the eigenvector corresponding to the eigenvaluemod(info,m+1)failed to converge (w[ifail[i-1]-1]wrefers to the array of eigenvalues on output).mod(is the integer remainder ofx,y).x/y
- (global) Array of size2*p.This output array contains indices of eigenvectors corresponding to a cluster of eigenvalues that could not be orthogonalized due to insufficient workspace (seelwork,orfacandinfo). Eigenvectors corresponding to clusters of eigenvalues indexedtoiclustr(2*I-1),iclustr(2*I)toi= 1, could not be orthogonalized due to lack of workspace. Hence the eigenvectors corresponding to these clusters may not be orthogonal.info/(m+1)iclustris a zero terminated array:iclustr[2*k-1]≠0 and= 0 if and only ificlustr[2*k]kis the number of clusters.
- This output array contains the gap between eigenvalues whose eigenvectors could not be orthogonalized. The(global)info/moutput values in this array correspond to theclusters indicated by the arrayinfo/(m+1)iclustr. As a result, the dot product between eigenvectors corresponding to thei-thcluster may be as high as(O(n)*macheps)/gap[.i-1]
- (global)If, the execution is successful.info= 0If: If theinfo< 0i-th argument is an array and thej-th entry, indexedhad an illegal value, thenj-1,-(info=i*100+j),If thei-th argument is a scalar and had an illegal value, then-info=i.If: ifinfo< 0-info=i, thei-th argument had an illegal value.If: ifinfo> 0=mod(info,m+1)i, thenieigenvectors failed to converge in MAXIT iterations. Their indices are stored in the arrayifail. If=info/(m+1)i, then eigenvectors corresponding toiclusters of eigenvalues could not be orthogonalized due to insufficient workspace. The indices of the clusters are stored in the arrayiclustr.