|
|
◆ Dneupd()
| Sub Dneupd |
( |
Rvec As |
Long, |
|
|
Howmny As |
String, |
|
|
Selct() As |
Long, |
|
|
Dr() As |
Double, |
|
|
Di() As |
Double, |
|
|
Z() As |
Double, |
|
|
Sigmar As |
Double, |
|
|
Sigmai As |
Double, |
|
|
Workev() 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 general sparse matrix from Arnoldi factorization (Arpack)
- Purpose
- This routine computes the approximations to the eigenvalues of eigenproblem A*z = λ*B*z and (optionally) the corresponding approximate eigenvectors.
These values are computed from the Arnoldi factorization returned by Dnaupd for a linear operator OP with respect to a matrix B (see Purpose paragraph of Dnaupd manual for more details). Dnaupd 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 Dnaupd without change. Three of these parameters, V, Ipntr and Workl, are changed by this routine.
- Parameters
-
| [in] | Rvec | Specifies whether a basis for the invariant subspace corresponding to the converged Ritz value approximations for the eigenproblem A*z = lambda*B*z is computed.
= 0 (false): Compute Ritz values only.
= 1 (true): Compute Ritz vectors or Schur vectors. |
| [in] | Howmny | Specifies the form of the basis for the invariant subspace corresponding to the converged Ritz values that is to be computed.
= "A": Compute Nev Ritz vectors.
= "P": Compute Nev Schur vectors.
= "S": Compute some of the Ritz vectors, specified by the logical array Select(). |
| [out] | Selct() | Array Selct(LSelct - 1) (LSelct >= Ncv)
If Howmny = "S", Selct() specifies the Ritz vectors to be computed. To select the Ritz vector corresponding to a Ritz value (Dr(j), Di(j)), Selct(j) must be set to 1 (True). If Howmny = "A" or "P", Selct() is used as internal workspace. |
| [out] | Dr() | Array Dr(LDr - 1) (LDr >= Nev + 1)
If mode = 1 or 2, or mode = 3 and Sigmai = 0.0 then Dr() contains the real part of the Ritz value approximations to the eigenvalues of A*z = λ*B*z.
If mode = 3 or 4 and sigmai <> 0.0, then Dr() contains the real part of the Ritz values of OP computed by Dnaupd. A further computation must be performed by the user to transform the Ritz values computed for OP by Dnaupd to those of the original system A*z = λ*B*z. |
| [out] | Di() | Array Di(LDi - 1) (LDi >= Nev + 1)
Di() contains the imaginary part of the Ritz value approximations to the eigenvalues of A*z = λ*B*z associated with Dr(). |
| [out] | Z() | Array Z(Ldz - 1, LZ - 1) (Ldz >= N, LZ >= Nev + 1)
If Rvec = 1 (True) and Howmny = "A", then the columns of Z() represent approximate eigenvectors (Ritz vectors) corresponding to the nconv (Iparam(4)) Ritz values for eigensystem A*z = λ*B*z.
The complex Ritz vector associated with the Ritz value with positive imaginary part is stored in two consecutive columns. The first column holds the real part of the Ritz vector and the second column holds the imaginary part. The Ritz vector associated with the Ritz value with negative imaginary part is simply the complex conjugate of the Ritz vector associated with the positive imaginary part.
If Rvec = 0 (False) or Howmny = "P" then Z() is not referenced. |
| [in] | Sigmar | If mode = 3 or 4, represents the real part of the shift. Not referenced if mode = 1 or 2. |
| [in] | Sigmai | If mode = 3 or 4, represents the imaginary part of the shift. Not referenced if mode = 1 or 2. |
| [out] | Workev() | Array Workev[LWorkev] (LWorkev >= 3*Ncv)
Workspace. |
| [in] | Bmat | Same as for Dnaupd. Must be passed without modification following the last call to Dnaupd. |
| [in] | N | Same as for Dnaupd. Must be passed without modification following the last call to Dnaupd. |
| [in] | Which | Same as for Dnaupd. Must be passed without modification following the last call to Dnaupd. |
| [in] | Nev | Same as for Dnaupd. Must be passed without modification following the last call to Dnaupd. |
| [in] | Tol | Same as for Dnaupd. Must be passed without modification following the last call to Dnaupd. |
| [in] | Resid() | Array Resid(LResid - 1) (LResid >= N)
Same as for Dnaupd. Must be passed without modification following the last call to Dnaupd. |
| [in] | Ncv | Same as for Dnaupd. Must be passed without modification following the last call to Dnaupd. |
| [in,out] | V() | Array V(Ldv - 1, LV - 1) (Ldv >= N, LV >= Ncv)
[in] Same as for Dnaupd. Must be passed without modification following the last call to Dnaupd. [out] If Rvec = 1 (True), the first nconv columns contain approximate Schur vectors that span the desired invariant subspace. |
| [in] | Iparam() | Array Iparam(LIparam - 1) (LIparam >= 11)
Same as for Dnaupd. Must be passed without modification following the last call to Dnaupd. |
| [in,out] | Ipntr() | Array Ipntr(LIpntr - 1) (LIpntr >= 14)
[in] Same as for Dnaupd. Must be passed without modification following the last call to Dnaupd. [out] Ipntr(8) to Ipntr(12) contain the pointer into Workl.
Ipntr(8): Pointer to the real part of the Ncv Ritz values of the original system.
Ipntr(9): Pointer to the imaginary part of the Ncv Ritz values of the original system.
Ipntr(10): Pointer to the Ncv corresponding error bounds.
Ipntr(11): Pointer to the Ncv by Ncv upper quasi-triangular Schur matrix for H.
Ipntr(12): Pointer to the Ncv by Ncv matrix of eigenvectors of the upper Hessenberg matrix H. Only referenced if Rvec = 1 (True). |
| [in] | Workd() | Array Workd(LWorkd - 1) (LWorkd >= 3*N)
Same as for Dnaupd. Must be passed without modification following the last call to Dnaupd. |
| [in,out] | Workl() | Array Workl(LWorkl - 1) (LWorkl >= Ncv*(Ncv + 8))
[in] Same as for Dnaupd. Must be passed without modification following the last call to Dnaupd. Workl(0) to Workl(ncv^2 + 3*ncv - 1) contains information obtained in Dnaupd. They are not changed by this routine.
[out] Workl(Ncv^2 + 3*ncv) to Workl(3*ncv^2 + 6*ncv - 1) holds the real and imaginary part of the untransformed Ritz values, the upper quasi-triangular matrix for H, and the associated matrix representation of the invariant subspace for H. |
| [out] | Info | Return code.
= 0: Successful exit.
< 0: The (-Info)-th argument is invalid.
= 11: Initial residual vector is zero.
= 12: Dnaupd did not find any eigenvalues to sufficient accuracy.
= 13: Dneupd got a different count of the number of converged Ritz values than Dnaupd got.
= 14: Error return from real Schur form calculation (LAPACK routine DLAHQR).
= 15: Error return from eigenvector calculation (LAPACK routine DTREVC). |
- Reference
- ARPACK-NG (https://github.com/opencollab/arpack-ng)
- Example Program
- See example of Dnaupd.
|