On the final return from dnaupd (indicated by ido = 99), the error flag info must be checked. If info = 0, then no fatal errors have occurred and it is time to post-process using dneupd to get eigenvalues of the original problem and the corresponding eigenvectors if desired. In the case shown here (shift-invert and generalized), there are some subtleties to recovering eigenvectors when is ill-conditioned. This process is called eigenvector purification. It prevents eigenvectors from being corrupted with noise due to the presence of eigenvectors corresponding to near infinite eigenvalues (See Chapter 4). These operations are completely transparent to the user. The general calling sequence for dseupd is shown in Figure 3.7.
c c %-----------------------------------------------% c | No fatal errors occurred. | c | Postprocess using DNEUPD. | c | | c | Computed eigenvalues may be extracted. | c | | c | Eigenvectors may also be computed now if | c | desired. (indicated by rvec = .true.) | c | | c | The real part of the eigenvalue is returned | c | in the first column of the two-dimensional | c | array D, and the IMAGINARY part is returned | c | in the second column of D. The corresponding | c | eigenvectors are returned in the first NEV | c | columns of the two-dimensional array V if | c | requested. Otherwise, an orthogonal basis | c | for the invariant subspace corresponding to | c | the eigenvalues in D is returned in V. | c %-----------------------------------------------% c rvec = .true. call dneupd ( rvec, 'A', select, d, d(1,2), v, ldv, & sigmar, sigmai, workev, bmat, n, which, nev, tol, & resid, ncv, v, ldv, iparam, ipntr, workd, & workl, lworkl, ierr ) c |
The approximate eigenvalues of the original problem are returned with real part array dr and imaginary part in the array di. Since the problem is real, complex eigenvalues must come in complex conjugate pairs. There is negligible additional cost to obtain eigenvectors. An orthonormal (Schur) basis for the invariant subspace corresponding to the converged approximate eigenvalues is always computed. In the above example, this basis is overwritten with the eigenvectors in the array v. When the eigenvectors corresponding to a complex conjugate pair of eigenvaues are computed, the vector corresponding to the eigenvalue with positive imaginary part is stored with real and imaginary parts in consecutive columns of v. The eigenvector corresponding to the conjugate eigenvalue is, of course, the conjugate of this vector. Both basis sets may be obtained if desired but there is an additional storage cost of if both are requested (in this case a separate n by nev array z must be supplied). In some cases it may be desirable to have both basis sets.
In the non-Hermitian case, the eigenvector basis is potentially ill-conditioned and may not even exist. While, eigenvectors may have physical meaning, they are generally not the best basis to use. If a basis for a selected invariant subspace is required, then it is generally better to compute a Schur basis. This will provide an orthogonal, hence well conditioned, basis for the subspace. The sensitivity of a given subspace to perturbations (such as roundoff error) is another question. See § 4.6 for a brief discussion.
If it is desirable to retain the Schur basis in v and storage is an issue, the user may elect to call this routine once for each desired eigenvector and store it peripherally. There is also the option of computing a selected set of these vectors with a single call.
The input parameters that must be specified are