Anasazi::BasicEigenproblem< ScalarType, MV, OP > Class Template Reference

This provides a basic implementation for defining standard or generalized eigenvalue problems. More...

#include <AnasaziBasicEigenproblem.hpp>

Inheritance diagram for Anasazi::BasicEigenproblem< ScalarType, MV, OP >:

[legend]
Collaboration diagram for Anasazi::BasicEigenproblem< ScalarType, MV, OP >:
[legend]
List of all members.

Public Member Functions

Constructors/Destructor.
 BasicEigenproblem ()
 Empty constructor - allows Anasazi::BasicEigenproblem to be described at a later time through "Set Methods".
 BasicEigenproblem (const Teuchos::RefCountPtr< OP > &Op, const Teuchos::RefCountPtr< MV > &InitVec)
 Standard Eigenvalue Problem Constructor.
 BasicEigenproblem (const Teuchos::RefCountPtr< OP > &Op, const Teuchos::RefCountPtr< OP > &B, const Teuchos::RefCountPtr< MV > &InitVec)
 Generalized Eigenvalue Problem Constructor.
 BasicEigenproblem (const BasicEigenproblem< ScalarType, MV, OP > &Problem)
 Copy Constructor.
virtual ~BasicEigenproblem ()
 Destructor.
Set Methods.
void SetOperator (const Teuchos::RefCountPtr< OP > &Op)
 Set the operator for which eigenvalues will be computed.
void SetA (const Teuchos::RefCountPtr< OP > &A)
 Set the operator A of the eigenvalue problem $Ax=Mx\lambda$.
void SetM (const Teuchos::RefCountPtr< OP > &M)
 Set the operator M of the eigenvalue problem $Ax = Mx\lambda$.
void SetPrec (const Teuchos::RefCountPtr< OP > &Prec)
 Set the preconditioner for this eigenvalue problem $Ax = Mx\lambda$.
void SetInitVec (const Teuchos::RefCountPtr< MV > &InitVec)
 Set the initial guess.
void SetAuxVec (const Teuchos::RefCountPtr< MV > &AuxVec)
 Set auxilliary vectors.
void SetNEV (const int nev)
 Specify the number of eigenvalues (NEV) that are requested.
void SetSymmetric (const bool isSym)
 Specify the symmetry of this eigenproblem.
ReturnType SetProblem ()
 Specify that this eigenproblem is fully defined.
Accessor Methods.
Teuchos::RefCountPtr< OP > GetOperator () const
 Get a pointer to the operator for which eigenvalues will be computed.
Teuchos::RefCountPtr< OP > GetA () const
 Get a pointer to the operator A of the eigenproblem $Ax=\lambda Mx$.
Teuchos::RefCountPtr< OP > GetM () const
 Get a pointer to the operator M of the eigenproblem $Ax=\lambda Mx$.
Teuchos::RefCountPtr< OP > GetPrec () const
 Get a pointer to the preconditioner of the eigenproblem $Ax=\lambda Mx$.
Teuchos::RefCountPtr< MV > GetInitVec () const
 Get a pointer to the initial vector.
Teuchos::RefCountPtr< MV > GetAuxVec () const
 Get a pointer to the auxilliary vector.
Teuchos::RefCountPtr< std::vector<
ScalarType > > 
GetEvals ()
 Get a pointer to the eigenvalues of the operator.
Teuchos::RefCountPtr< MV > GetEvecs ()
 Get a pointer to the eigenvectors of the operator.
int GetNEV () const
 Get the number of eigenvalues (NEV) that are required by this eigenproblem.
bool IsSymmetric () const
 Get the symmetry information for this eigenproblem.
bool IsProblemSet () const
 If the problem has been set, this method will return true.
Inner Product Methods.
ReturnType InnerProd (const MV &X, const MV &Y, Teuchos::SerialDenseMatrix< int, ScalarType > &Z) const
 Computes the M inner product as needed by the eigensolver, for orthogonalization purposes.
Norm Methods.
ReturnType MvNorm (const MV &X, std::vector< ScalarType > *normvec) const
 Computes the multivector norm $||x_i||_M$ as needed by the eigensolver.

Protected Types

typedef MultiVecTraits< ScalarType,
MV > 
MVT
 Type-definition for the MultiVecTraits class corresponding to the MV type.
typedef OperatorTraits< ScalarType,
MV, OP > 
OPT
 Type-definition for the OperatorTraits class corresponding to the OP type.

Protected Attributes

Teuchos::RefCountPtr< OP > _AOp
 Reference-counted pointer for A of the eigenproblem $Ax=\lambda Mx$.
Teuchos::RefCountPtr< OP > _MOp
 Reference-counted pointer for M of the eigenproblem $Ax=\lambda Mx$.
Teuchos::RefCountPtr< OP > _Op
 Reference-counted pointer for the operator of the eigenproblem $Ax=\lambda Mx$.
Teuchos::RefCountPtr< OP > _Prec
 Reference-counted pointer for the preconditioner of the eigenproblem $Ax=\lambda Mx$.
Teuchos::RefCountPtr< MV > _InitVec
 Reference-counted pointer for the initial vector of the eigenproblem $Ax=\lambda Mx$.
Teuchos::RefCountPtr< MV > _AuxVec
 Reference-counted pointer for the auxilliary vector of the eigenproblem $Ax=\lambda Mx$.
Teuchos::RefCountPtr< MV > _Evecs
 Reference-counted pointer for the computed eigenvectors of $Ax=\lambda Mx$.
Teuchos::RefCountPtr< std::vector<
ScalarType > > 
_Evals
 Reference-counted pointer for the computed eigenvalues of $Ax=\lambda Mx$.
int _nev
 Number of eigenvalues requested.
bool _isSym
 Symmetry of the eigenvalue problem.
bool _isSet
 Sanity Check Flag.

Detailed Description

template<class ScalarType, class MV, class OP>
class Anasazi::BasicEigenproblem< ScalarType, MV, OP >

This provides a basic implementation for defining standard or generalized eigenvalue problems.


Member Function Documentation

template<class ScalarType, class MV, class OP>
Teuchos::RefCountPtr<std::vector<ScalarType> > Anasazi::BasicEigenproblem< ScalarType, MV, OP >::GetEvals  )  [inline, virtual]
 

Get a pointer to the eigenvalues of the operator.

Note:
If the operator is nonsymmetric, the length of this vector is 2*NEV where the real part of eigenvalue j is entry j and the imaginary part is entry j+NEV .

Implements Anasazi::Eigenproblem< ScalarType, MV, OP >.

template<class ScalarType, class MV, class OP>
Teuchos::RefCountPtr<MV> Anasazi::BasicEigenproblem< ScalarType, MV, OP >::GetEvecs  )  [inline, virtual]
 

Get a pointer to the eigenvectors of the operator.

Note:
If the operator is nonsymmetric, this multivector has 2*NEV columns where the real part of eigenvector j is column j and the imaginary part is column j+NEV .

Implements Anasazi::Eigenproblem< ScalarType, MV, OP >.

template<class ScalarType, class MV, class OP>
void Anasazi::BasicEigenproblem< ScalarType, MV, OP >::SetAuxVec const Teuchos::RefCountPtr< MV > &  AuxVec  )  [inline, virtual]
 

Set auxilliary 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.

Implements Anasazi::Eigenproblem< ScalarType, MV, OP >.

template<class ScalarType, class MV, class OP>
void Anasazi::BasicEigenproblem< ScalarType, MV, OP >::SetInitVec const Teuchos::RefCountPtr< MV > &  InitVec  )  [inline, virtual]
 

Set the initial guess.

This vector is required to create all the space needed by Anasazi to solve the eigenvalue problem.

Note:
Even if an initial guess is not known by the user, an initial vector must be passed in.

Implements Anasazi::Eigenproblem< ScalarType, MV, OP >.

template<class ScalarType, class MV, class OP>
void Anasazi::BasicEigenproblem< ScalarType, MV, OP >::SetOperator const Teuchos::RefCountPtr< OP > &  Op  )  [inline, virtual]
 

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$.

Implements Anasazi::Eigenproblem< ScalarType, MV, OP >.

template<class ScalarType, class MV, class OP>
ReturnType Anasazi::BasicEigenproblem< ScalarType, MV, OP >::SetProblem  )  [virtual]
 

Specify that this eigenproblem is fully defined.

Note:
The user MUST call this routine before they send the eigenproblem to any solver!

Implements Anasazi::Eigenproblem< ScalarType, MV, OP >.

template<class ScalarType, class MV, class OP>
void Anasazi::BasicEigenproblem< ScalarType, MV, OP >::SetSymmetric const bool  isSym  )  [inline, virtual]
 

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.

Implements Anasazi::Eigenproblem< ScalarType, MV, OP >.


Member Data Documentation

template<class ScalarType, class MV, class OP>
Teuchos::RefCountPtr<std::vector<ScalarType> > Anasazi::BasicEigenproblem< ScalarType, MV, OP >::_Evals [protected]
 

Reference-counted pointer for the computed eigenvalues of $Ax=\lambda Mx$.

Note:
If the operator is nonsymmetric, the length of this vector is 2*NEV where the real part of eigenvalue j is entry j and the imaginary part is entry j+NEV .

template<class ScalarType, class MV, class OP>
Teuchos::RefCountPtr<MV> Anasazi::BasicEigenproblem< ScalarType, MV, OP >::_Evecs [protected]
 

Reference-counted pointer for the computed eigenvectors of $Ax=\lambda Mx$.

Note:
If the operator is nonsymmetric, this multivector has 2*NEV columns where the real part of eigenvector j is column j and the imaginary part is column j+NEV .

template<class ScalarType, class MV, class OP>
bool Anasazi::BasicEigenproblem< ScalarType, MV, OP >::_isSym [protected]
 

Symmetry of the eigenvalue problem.

Note:
A generalized eigenvalue problem $Ax= \lambda Mx$ is considered symmetric if the operator \c M is positive (semi) definite.


The documentation for this class was generated from the following file:
Generated on Thu Sep 18 12:41:36 2008 for Anasazi by doxygen 1.3.9.1