class HCL_IRArnoldi_d : public HCL_ItEigSolver_d

HCL_IRArnoldi_d implements the implicitly restarted Arnoldi algorithm for solving the (generalized) eigenvalue problem

Inheritance:


Public Methods

virtual ostream& Write (ostream &) const
Prints description of the object

Public

Methods
virtual Table& Parameters () const
Access to parameter table
int Solve ( int &nev, HCL_LinearOp_d &A, HCL_Vector_d &x )
Solve A*x = lambda*x
int Solve ( int &nev, HCL_LinearOp_d &OP, double sigmar, HCL_Vector_d &resid )
Solve A*x = lambda*x using shift-and-invert mode
int Solve ( int &nev, HCL_LinearOp_d &OP, HCL_LinearOp_d &M, HCL_Vector_d &x )
Solve A*x = lambda*M*x, with M symmetric positive semi-definite
virtual int Eigenvalue ( int i, double &eigr, double &eigi )
Access to eigenvalues computed by Solve()
virtual int Eigenvalue ( int i, double &eigr )
Access to (real part of) eigenvalues computed by Solve()
int EigPair (int i, double &eigr, double &eigi, HCL_Vector_d *vr, HCL_Vector_d *vi)
Access to eigenvalues and eigenvectors computed by Solve()
int EigPair (int i, double &eigr, HCL_Vector_d *vr )
Access to real part of eigenpairs computed by Solve()
Input Parameters
int SubspaceDim
Dimension of Krylov subspace
char Which [2]
Eigenvalue selection criteria
double Tol
Stopping criterion
int MaxItn
Maximum number of Arnoldi restarts
int EigVectors
Flag to compute eigenvectors
int SchurVectors
Flag to compute Schur vectors
int DispFlag
Display level
Output Parameters
int TermCode
Termination code

Inherited from HCL_ItEigSolver_d:


Inherited from HCL_Base:

Public Methods

void IncCount() const
void DecCount() const
int Count() const

Documentation

HCL_IRArnoldi_d implements the implicitly restarted Arnoldi algorithm for solving the (generalized) eigenvalue problem. The algorithm computes approximations to a few eigenpairs of of a linear operator. Optionally, this can be done with respect to the semi-inner product defined by a positive semi-definite linear operator B. This is an adaptation of the algorithm inplemented in ARPACK.
References:
R.B. Lehoucq, D.C. Sorensen \& C. Yang, "ARPACK Users Guide"
Methods

virtual Table& Parameters() const
Access to parameter table. Algorithmic parameters can be accessed with Parameters().GetValue("NAME",val) or changed with Parameters().PutValue("NAME",val).

int Solve( int &nev, HCL_LinearOp_d &A, HCL_Vector_d &x )
Solve A*x = lambda*x
Returns:
The value of TermCode (See the Parameters section of this document.)
Parameters:
nev - Number of eigenvalues wanted. On output this contains the number of eigenvalues actually computed.
A - Linear operator.
x - Vector to start Arnoldi iteration. This is changed by the function, and does not have a meaningful value on return.

int Solve( int &nev, HCL_LinearOp_d &OP, double sigmar, HCL_Vector_d &resid )
Solve A*x = lambda*x using shift-and-invert mode. Eigenvalues near the real shift 'sigmar' will be emphasized during the iteration. Note that the user must supply the linear operator 'OP', rather than 'A'.
Returns:
The value of TermCode (See the Parameters section of this document.)
Parameters:
nev - Number of eigenvalues wanted. On output this contains the number of eigenvalues actually computed.
OP - Linear operator Inv[A-sigmar*I].
sigmar - Real shift to apply.
x - Vector to start Arnoldi iteration. This is changed by the function, and does not have a meaningful value on return.

int Solve( int &nev, HCL_LinearOp_d &OP, HCL_LinearOp_d &M, HCL_Vector_d &x )
Solve A*x = lambda*M*x, with M symmetric positive semi-definite. Note that the user must supply the linear operator 'OP', rather than 'A'.
Returns:
The value of TermCode (See the Parameters section of this document.)
Parameters:
nev - Number of eigenvalues wanted. On output this contains the number of eigenvalues actually computed.
OP - Linear operator Inv[M]*A.
x - Vector to start Arnoldi iteration. This is changed by the function, and does not have a meaningful value on return.

virtual int Eigenvalue( int i, double &eigr, double &eigi )
Access to eigenvalues computed by Solve()
Returns:
Nonzero if 'i' is not valid or if Solve() has not been called.
Parameters:
i - Which eigenvalue to return. (Must be between 1 and the number of eigenvalues computed in Solve())
eigr - Returns the real part of the ith eigenvalue.
eigi - Returns the imaginary part of the ith eigenvalue.

virtual int Eigenvalue( int i, double &eigr )
Access to (real part of) eigenvalues computed by Solve()
Returns:
Nonzero if 'i' is not valid or if Solve() has not been called.
Parameters:
i - Which eigenvalue to return. (Must be between 1 and the number of eigenvalues computed in Solve())
eigr - Returns the real part of the ith eigenvalue.

int EigPair(int i, double &eigr, double &eigi, HCL_Vector_d *vr, HCL_Vector_d *vi)
Access to eigenvalues and eigenvectors computed by Solve()
Returns:
Nonzero if 'i' is not valid or if Solve() has not been called.
Parameters:
i - Which eigenpair to return. (Must be between 1 and the number of eigenvalues computed in Solve())
eigr - Returns the real part of the ith eigenvalue.
eigi - Returns the imaginary part of the ith eigenvalue.
vr - Returns the real part of the ith eigenvector.
vi - Returns the imaginary part of the ith eigenvector.

int EigPair(int i, double &eigr, HCL_Vector_d *vr )
Access to real part of eigenpairs computed by Solve()
Returns:
Nonzero if 'i' is not valid or if Solve() has not been called.
Parameters:
i - Which eigenpair to return. (Must be between 1 and the number of eigenvalues computed in Solve())
eigr - Returns the real part of the ith eigenvalue.
vr - Returns the real part of the ith eigenvector.

virtual ostream& Write(ostream &) const
Prints description of the object

Input Parameters
In a parameter file, these names may be prepended by "ItEigSolver::" or "IRArnoldi::"

int SubspaceDim
Dimension of Krylov subspace. The algorithm will allocate roughly this many vectors in the domain of the problem. Increasing this value will generally improve convergence. SubspaceDim must satisfy 2*nev < SubspaceDim < Dim(A).
Default = 2*nev + 2

char Which[2]
Eigenvalue selection criteria. This determines which part of the spectrum the algorithm will attempt to locate. Valid values are:
"SM" - Smallest magnitude
"LM" - Largest magnitude
"SR" - Smallest real part
"LR" - Largest real part
"SI" - Smallest imaginary part
"LI" - Largest imaginary part

Default = "LM"

double Tol
Stopping criterion. A ritz value is considered converged if the relative accuracy is less than Tol.
Default = machine-epsilon

int MaxItn
Maximum number of Arnoldi restarts.
Default = 100

int EigVectors
Flag to compute eigenvectors. (0 - Don't compute; 1 - Compute)
Default = 1

int SchurVectors
Flag to compute Schur vectors. (0 - Don't compute; 1 - Compute) Note that setting this to 0 is a useful optimization in the case of symmetric operators, where Schur vectors are actually eigenvectors.
Default = 1

int DispFlag
Display level. This determines how much information should be displayed during the execution of the algorithm. Common values are:
0 - No output
1 - One-line summary output
2 - Detailed header and footer with timing information
3 - Per-iteration statistics

Default = 0

Output Parameters

int TermCode
Termination code. Value is one of:

0 - Success
1 - Too many restart iterations taken
2 - Initial vector is zero
3 - LAPACK Eig failed (shouldn't happen)
4 - Algorithm stalled-out with an invariant subspace
6 - No shifts available for shifted QR algorithm (shouldn't happen)
7 - Computing the Schur vectors failed
8 - Computing the eigenvectors failed


This class has no child classes.

alphabetic index hierarchy of classes


this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de