Class xlifepp::EigenProblem#
-
template<class ScalarType, class MV, class OP>
class EigenProblem#
-
Collaboration diagram for xlifepp::EigenProblem:
This provides a basic implementation for defining standard or generalized eigenvalue problems.
Accessor Methods
-
inline SmartPtr<const OP> getOperator() const#
-
Get a pointer to the operator for which eigenvalues will be computed.
-
inline SmartPtr<const OP> getA() const#
-
Get a pointer to the operator
A
of the eigenproblem \(Ax=\lambda Mx\).
-
inline SmartPtr<const OP> getM() const#
-
Get a pointer to the operator
M
of the eigenproblem \(Ax=\lambda Mx\).
-
inline SmartPtr<const OP> getPrec() const#
-
Get a pointer to the preconditioner of the eigenproblem \(Ax=\lambda Mx\).
-
inline int_t getNEV() const#
-
Get the number of eigenvalues (NEV) that are required by this eigenproblem.
-
inline bool isHermitian() const#
-
Get the symmetry information for this eigenproblem.
-
inline bool isProblemSet() const#
-
If the problem has been set, this method will return true.
-
inline const EigenSolverSolution<ScalarType, MV> &getSolution() const#
-
Get the solution to the eigenproblem.
There is no computation associated with this method. It only provides a mechanism for associating an EigenSolverSolution with a EigenProblem.
Constructors/Destructor
-
EigenProblem()#
-
Empty constructor - allows xlifepp::EigenProblem to be described at a later time through “Set Methods”.
-
EigenProblem(const SmartPtr<const OP> &Op, const SmartPtr<MV> &initVec)#
-
Standard Eigenvalue Problem Constructor.
-
EigenProblem(const SmartPtr<const OP> &Op, const SmartPtr<const OP> &B, const SmartPtr<MV> &initVec)#
-
Generalized Eigenvalue Problem Constructor.
-
EigenProblem(const EigenProblem<ScalarType, MV, OP> &Problem)#
-
Copy Constructor.
-
inline ~EigenProblem()#
-
Destructor.
Set Methods
-
inline void setOperator(const SmartPtr<const OP> &Op)#
-
Set the operator for which eigenvalues will be computed.
Note
This may be different from the
A
if a spectral transformation is employed. For example, this operator may apply the operation \((A-\sigma I)^{-1}\) if you are looking for eigenvalues ofA
around \(\sigma\).
-
inline void setA(const SmartPtr<const OP> &A)#
-
Set the operator
A
of the eigenvalue problem \(Ax=Mx\lambda\).
-
inline void setM(const SmartPtr<const OP> &M)#
-
Set the operator
M
of the eigenvalue problem \(Ax = Mx\lambda\).
-
inline void setPrec(const SmartPtr<const OP> &prec)#
-
Set the preconditioner for this eigenvalue problem \(Ax = Mx\lambda\).
-
inline void setInitVec(const SmartPtr<MV> &initVec)#
-
Set the initial guess.
This vector is required to create all the space needed by xlifepp to solve the eigenvalue problem.
Note
Even if an initial guess is not known by the user, an initial vector must be passed in.
-
inline void setAuxVecs(const SmartPtr<const MV> &auxVecs)#
-
Set auxiliary vectors.
Note
This multivector can have any number of columns, and most likely will contain vectors that will be used by the eigensolver to orthogonalize against.
-
inline void setHermitian(bool isSym)#
-
Specify the symmetry of this eigenproblem.
This knowledge may allow the solver to take advantage of the eigenproblems’ symmetry. Some computational work can be avoided by setting this properly.
-
bool setProblem()#
-
Specify that this eigenproblem is fully defined.
This routine serves multiple purpose:
sanity check that the eigenproblem has been fully and consistently defined
opportunity for the eigenproblem to allocate internal storage for eigenvalues and eigenvectors (to be used by eigensolvers and solver managers)
This method reallocates internal storage, so that any previously retrieved references to internal storage (eigenvectors or eigenvalues) are invalidated.
- Returns:
-
true
signifies success,false
signifies error.
Note
The user MUST call this routine before they send the eigenproblem to any solver or solver manager.
-
inline void setSolution(const EigenSolverSolution<ScalarType, MV> &sol)#
-
Set the solution to the eigenproblem.
This mechanism allows an EigenSolverSolution struct to be associated with an EigenProblem object. setSolution() is usually called by a solver manager at the end of its SolverManager::solve() routine.
-
inline SmartPtr<const OP> getOperator() const#