|
|
◆ Dseupd()
| Sub Dseupd |
( |
Rvec As |
Long, |
|
|
Howmny As |
String, |
|
|
Selct() As |
Long, |
|
|
D() As |
Double, |
|
|
Z() As |
Double, |
|
|
Sigma As |
Double, |
|
|
Bmat As |
String, |
|
|
N As |
Long, |
|
|
ByVal Which As |
String, |
|
|
Nev As |
Long, |
|
|
Resid() As |
Double, |
|
|
Ncv As |
Long, |
|
|
V() As |
Double, |
|
|
IParam() As |
Long, |
|
|
Ipntr() As |
Long, |
|
|
Workd() As |
Double, |
|
|
Workl() As |
Double, |
|
|
Info As |
Long, |
|
|
Optional Tol As |
Double = 0 |
|
) |
| |
Approximate eigenvalues and eigenvectors of a symmetric sparse matrix from Lanczos factorization (Arpack)
- Purpose
- This routine computes the approximations to the eigenvalues (Ritz values) of eigenproblem A*z = λ*B*z and (optionally) the corresponding approximate eigenvectors (Ritz vectors).
These values are computed from the Lanczos factorization returned by Dsaupd for a linear operator OP with respect to a matrix B (see Purpose paragraph of Dsaupd manual for more details). Dsaupd must be called before calling this routine.
The approximate eigenvalues are returned in ascending algebraic order.
The arguments Bmat, N, Which, Nev, Tol, Resid, Ncv, V, Iparam, Ipntr, Workd and Workl must be passed to this routine following the last call to Dsaupd without change. Two of these parameters, ipntr and workl, are changed by this routine.
- Parameters
-
| [in] | Rvec | Specifies whether Ritz vectors corresponding to the Ritz value approximations to the eigenproblem A*z = λ*B*z are computed.
= 0 (False): Compute Ritz values only.
= 1 (True): Compute Ritz vectors. |
| [in] | Howmny | Specifies how many Ritz vectors are wanted and the form of Z (the matrix of Ritz vectors).
= "A": Compute Nev Ritz vectors. |
| [out] | Selct() | Array Selct(LSelct - 1) (LSelct >= Ncv)
If Howmny = "A", Selct() is used as a workspace for reordering the Ritz values. |
| [out] | D() | Array D(LD - 1) (LD >= Nev)
Contains the Ritz value approximations to the eigenvalues of A*z = λ*B*z. The values are returned in ascending order. If mode = 3, 4 or 5 then D() represents the Ritz values of OP computed by Dsaupd transformed to those of the original eigensystem A*z = λ*B*z. If mode = 1 or 2 then the Ritz values of OP are the same as the those of A*z = λ*B*z. |
| [out] | Z() | Array Z(Ldz - 1, LZ - 1) (Ldz >= N, LZ >= Nev)
Contains the B-orthonormal Ritz vectors of the eigensystem A*z = λ*B*z corresponding to the Ritz value approximations.
If Rvec = 0 then Z() is not referenced. |
| [in] | Sigma | Sigma represents the shift, if mode = 3, 4 or 5. Not referenced if mode = 1 or 2. |
| [in] | Bmat | Same as for Dsaupd. Must be passed without modification following the last call to Dsaupd. |
| [in] | N | Same as for Dsaupd. Must be passed without modification following the last call to Dsaupd. |
| [in] | Which | Same as for Dsaupd. Must be passed without modification following the last call to Dsaupd. |
| [in] | Nev | Same as for Dsaupd. Must be passed without modification following the last call to Dsaupd. |
| [in] | Tol | Same as for Dsaupd. Must be passed without modification following the last call to Dsaupd. |
| [in] | Resid() | Array Resid(LResid - 1) (LResid >= N)
Same as for Dsaupd. Must be passed without modification following the last call to Dsaupd. |
| [in] | Ncv | Same as for Dsaupd. Must be passed without modification following the last call to Dsaupd. |
| [in] | V() | Array V(Ldv - 1, LV - 1) (Ldv >= N, LV >= Ncv)
Same as for Dsaupd. Must be passed without modification following the last call to Dsaupd. |
| [in] | Iparam() | Array Iparam(LIparam - 1) (LIparam >= 11)
Same as for Dsaupd. Must be passed without modification following the last call to Dsaupd. |
| [in,out] | Ipntr() | Array Ipntr(LIpntr - 1) (LIpntr >= 11)
Same as for Dsaupd. Must be passed without modification following the last call to Dsaupd. Ipntr(7): [out] Pointer to the Ncv Ritz values of the original system in Workl.
Ipntr(8): [out] Pointer to the Ncv corresponding error bounds in Workl.
Ipntr(9): [out] Pointer to the Ncv by Ncv matrix of eigenvectors of the tridiagonal matrix T in Workl (Only referenced if Rvec = 1).
|
| [in] | Workd() | Array Workd(LWorkd - 1) (LWorkd >= 3*N)
Same as for Dsaupd. Must be passed without modification following the last call to Dsaupd. |
| [in,out] | Workl() | Array Workl(LWorkl - 1) (LWorkl >= Ncv*(Ncv + 8))
[in] Same as for Dsaupd. Must be passed without modification following the last call to Dsaupd. Workl(0) to Workl(4*ncv - 1) contains information obtained in Dsaupd. They are not changed by this routine.
[out] Workl(4*ncv) to Workl(ncv^2 + 8*ncv - 1) holds the untransformed Ritz values, the computed error estimates, and the associated eigenvector matrix of H. |
| [out] | Info | Return code.
= 0: Successful exit.
< 0: The (-Info)-th argument is invalid.
= 11: Initial residual vector is zero.
= 12: Dsaupd did not find any eigenvalues to sufficient accuracy.
= 13: Dseupd got a different count of the number of converged Ritz values than Dsaupd got.
= 14: Error return from tridiagonal eigenvalue calculation (LAPACK routine DSTEQR). |
- Reference
- ARPACK-NG (https://github.com/opencollab/arpack-ng)
- Example Program
- See example of Dsaupd.
|