Class xlifepp::EigenProblem#

template<class ScalarType, class MV, class OP>
class EigenProblem#

Collaboration diagram for xlifepp::EigenProblem:

digraph { graph [bgcolor="#00000000"] node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2] edge [color="#1414CE"] "14" [label="CheckingPolicy< StoragePolicy< MV >::StoredType >" tooltip="CheckingPolicy< StoragePolicy< MV >::StoredType >"] "10" [label="CheckingPolicy< StoragePolicy< T >::StoredType >" tooltip="CheckingPolicy< StoragePolicy< T >::StoredType >"] "18" [label="CheckingPolicy< StoragePolicy< const MV >::StoredType >" tooltip="CheckingPolicy< StoragePolicy< const MV >::StoredType >"] "5" [label="CheckingPolicy< StoragePolicy< const OP >::StoredType >" tooltip="CheckingPolicy< StoragePolicy< const OP >::StoredType >"] "6" [label="ConversionPolicy" tooltip="ConversionPolicy"] "13" [label="OwnershipPolicy< StoragePolicy< MV >::InitPointerType >" tooltip="OwnershipPolicy< StoragePolicy< MV >::InitPointerType >"] "9" [label="OwnershipPolicy< StoragePolicy< T >::InitPointerType >" tooltip="OwnershipPolicy< StoragePolicy< T >::InitPointerType >"] "17" [label="OwnershipPolicy< StoragePolicy< const MV >::InitPointerType >" tooltip="OwnershipPolicy< StoragePolicy< const MV >::InitPointerType >"] "4" [label="OwnershipPolicy< StoragePolicy< const OP >::InitPointerType >" tooltip="OwnershipPolicy< StoragePolicy< const OP >::InitPointerType >"] "11" [label="xlifepp::SmartPtr< MV >" tooltip="xlifepp::SmartPtr< MV >"] "15" [label="xlifepp::SmartPtr< const MV >" tooltip="xlifepp::SmartPtr< const MV >"] "2" [label="xlifepp::SmartPtr< const OP >" tooltip="xlifepp::SmartPtr< const OP >"] "12" [label="StoragePolicy< MV >" tooltip="StoragePolicy< MV >"] "8" [label="StoragePolicy< T >" tooltip="StoragePolicy< T >"] "16" [label="StoragePolicy< const MV >" tooltip="StoragePolicy< const MV >"] "3" [label="StoragePolicy< const OP >" tooltip="StoragePolicy< const OP >"] "1" [label="xlifepp::EigenProblem< ScalarType, MV, OP >" tooltip="xlifepp::EigenProblem< ScalarType, MV, OP >" fillcolor="#BFBFBF"] "7" [label="xlifepp::SmartPtr< T, OwnershipPolicy, ConversionPolicy, CheckingPolicy, StoragePolicy, ConstnessPolicy >" tooltip="xlifepp::SmartPtr< T, OwnershipPolicy, ConversionPolicy, CheckingPolicy, StoragePolicy, ConstnessPolicy >"] "11" -> "12" [dir=forward tooltip="public-inheritance"] "11" -> "13" [dir=forward tooltip="public-inheritance"] "11" -> "14" [dir=forward tooltip="public-inheritance"] "11" -> "6" [dir=forward tooltip="public-inheritance"] "11" -> "7" [dir=forward tooltip="template-instance"] "15" -> "16" [dir=forward tooltip="public-inheritance"] "15" -> "17" [dir=forward tooltip="public-inheritance"] "15" -> "18" [dir=forward tooltip="public-inheritance"] "15" -> "6" [dir=forward tooltip="public-inheritance"] "15" -> "7" [dir=forward tooltip="template-instance"] "2" -> "3" [dir=forward tooltip="public-inheritance"] "2" -> "4" [dir=forward tooltip="public-inheritance"] "2" -> "5" [dir=forward tooltip="public-inheritance"] "2" -> "6" [dir=forward tooltip="public-inheritance"] "2" -> "7" [dir=forward tooltip="template-instance"] "1" -> "2" [dir=forward tooltip="usage"] "1" -> "11" [dir=forward tooltip="usage"] "1" -> "15" [dir=forward tooltip="usage"] "7" -> "8" [dir=forward tooltip="public-inheritance"] "7" -> "9" [dir=forward tooltip="public-inheritance"] "7" -> "10" [dir=forward tooltip="public-inheritance"] "7" -> "6" [dir=forward tooltip="public-inheritance"] }

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 SmartPtr<const MV> getInitVec() const#

Get a pointer to the initial vector.

inline SmartPtr<const MV> getAuxVecs() const#

Get a pointer to the auxiliary vector.

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 of A 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 setNEV(int_t nev)#

Specify the number of eigenvalues (NEV) that are requested.

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.