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 >:

Anasazi::Eigenproblem< ScalarType, MV, OP > 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 setAuxVecs (const Teuchos::RefCountPtr< MV > &AuxVecs)
 Set auxiliary vectors.
void setNEV (const int nev)
 Specify the number of eigenvalues (NEV) that are requested.
void setHermitian (const bool isSym)
 Specify the symmetry of this eigenproblem.
bool setProblem ()
 Specify that this eigenproblem is fully defined.
void setSolution (const Eigensolution< ScalarType, MV > &sol)
 Set the solution to the eigenproblem.
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< const
MV > 
getInitVec () const
 Get a pointer to the initial vector.
Teuchos::RefCountPtr< const
MV > 
getAuxVecs () const
 Get a pointer to the auxiliary vector.
int getNEV () const
 Get the number of eigenvalues (NEV) that are required by this eigenproblem.
bool isHermitian () const
 Get the symmetry information for this eigenproblem.
bool isProblemSet () const
 If the problem has been set, this method will return true.
const Eigensolution< ScalarType,
MV > & 
getSolution () const
 Get the solution to the eigenproblem.

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 > _AuxVecs
 Reference-counted pointer for the auxiliary vector of the eigenproblem $Ax=\lambda Mx$.
int _nev
 Number of eigenvalues requested.
bool _isSym
 Symmetry of the eigenvalue problem.
bool _isSet
 Sanity Check Flag.
Eigensolution< ScalarType,
MV > 
_sol
 Solution to problem.

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.
Examples:

BlockDavidson/BlockDavidsonEpetraEx.cpp, BlockDavidson/BlockDavidsonEpetraExGen.cpp, and BlockKrylovSchur/BlockKrylovSchurEpetraEx.cpp.

Definition at line 48 of file AnasaziBasicEigenproblem.hpp.


Member Typedef Documentation

template<class ScalarType, class MV, class OP>
typedef MultiVecTraits<ScalarType,MV> Anasazi::BasicEigenproblem< ScalarType, MV, OP >::MVT [protected]
 

Type-definition for the MultiVecTraits class corresponding to the MV type.

Definition at line 218 of file AnasaziBasicEigenproblem.hpp.

template<class ScalarType, class MV, class OP>
typedef OperatorTraits<ScalarType,MV,OP> Anasazi::BasicEigenproblem< ScalarType, MV, OP >::OPT [protected]
 

Type-definition for the OperatorTraits class corresponding to the OP type.

Definition at line 220 of file AnasaziBasicEigenproblem.hpp.


Constructor & Destructor Documentation

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

Empty constructor - allows Anasazi::BasicEigenproblem to be described at a later time through "Set Methods".

Definition at line 231 of file AnasaziBasicEigenproblem.hpp.

template<class ScalarType, class MV, class OP>
Anasazi::BasicEigenproblem< ScalarType, MV, OP >::BasicEigenproblem const Teuchos::RefCountPtr< OP > &  Op,
const Teuchos::RefCountPtr< MV > &  InitVec
 

Standard Eigenvalue Problem Constructor.

Definition at line 241 of file AnasaziBasicEigenproblem.hpp.

template<class ScalarType, class MV, class OP>
Anasazi::BasicEigenproblem< ScalarType, MV, OP >::BasicEigenproblem const Teuchos::RefCountPtr< OP > &  Op,
const Teuchos::RefCountPtr< OP > &  B,
const Teuchos::RefCountPtr< MV > &  InitVec
 

Generalized Eigenvalue Problem Constructor.

Definition at line 253 of file AnasaziBasicEigenproblem.hpp.

template<class ScalarType, class MV, class OP>
Anasazi::BasicEigenproblem< ScalarType, MV, OP >::BasicEigenproblem const BasicEigenproblem< ScalarType, MV, OP > &  Problem  ) 
 

Copy Constructor.

Definition at line 267 of file AnasaziBasicEigenproblem.hpp.

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

Destructor.

Definition at line 68 of file AnasaziBasicEigenproblem.hpp.


Member Function Documentation

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

Definition at line 80 of file AnasaziBasicEigenproblem.hpp.

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

Set the operator A of the eigenvalue problem $Ax=Mx\lambda$.

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

Definition at line 84 of file AnasaziBasicEigenproblem.hpp.

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

Set the operator M of the eigenvalue problem $Ax = Mx\lambda$.

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

Definition at line 88 of file AnasaziBasicEigenproblem.hpp.

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

Set the preconditioner for this eigenvalue problem $Ax = Mx\lambda$.

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

Definition at line 92 of file AnasaziBasicEigenproblem.hpp.

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

Definition at line 101 of file AnasaziBasicEigenproblem.hpp.

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

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.

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

Definition at line 108 of file AnasaziBasicEigenproblem.hpp.

template<class ScalarType, class MV, class OP>
void Anasazi::BasicEigenproblem< ScalarType, MV, OP >::setNEV const int  nev  )  [inline, virtual]
 

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

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

Definition at line 111 of file AnasaziBasicEigenproblem.hpp.

template<class ScalarType, class MV, class OP>
void Anasazi::BasicEigenproblem< ScalarType, MV, OP >::setHermitian 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 >.

Definition at line 117 of file AnasaziBasicEigenproblem.hpp.

template<class ScalarType, class MV, class OP>
bool Anasazi::BasicEigenproblem< ScalarType, MV, OP >::setProblem  )  [virtual]
 

Specify that this eigenproblem is fully defined.

This routine serves multiple purpose:

  • sanity check that the eigenproblem has been fully and constently 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.

Note:
The user MUST call this routine before they send the eigenproblem to any solver or solver manager.
Returns:
true signifies success, false signifies error.

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

Definition at line 285 of file AnasaziBasicEigenproblem.hpp.

template<class ScalarType, class MV, class OP>
void Anasazi::BasicEigenproblem< ScalarType, MV, OP >::setSolution const Eigensolution< ScalarType, MV > &  sol  )  [inline, virtual]
 

Set the solution to the eigenproblem.

This mechanism allows an Eigensolution struct to be associated with an Eigenproblem object. setSolution() is usually called by a solver manager at the end of its SolverManager::solve() routine.

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

Definition at line 142 of file AnasaziBasicEigenproblem.hpp.

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

Get a pointer to the operator for which eigenvalues will be computed.

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

Definition at line 150 of file AnasaziBasicEigenproblem.hpp.

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

Get a pointer to the operator A of the eigenproblem $Ax=\lambda Mx$.

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

Definition at line 153 of file AnasaziBasicEigenproblem.hpp.

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

Get a pointer to the operator M of the eigenproblem $Ax=\lambda Mx$.

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

Definition at line 156 of file AnasaziBasicEigenproblem.hpp.

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

Get a pointer to the preconditioner of the eigenproblem $Ax=\lambda Mx$.

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

Definition at line 159 of file AnasaziBasicEigenproblem.hpp.

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

Get a pointer to the initial vector.

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

Definition at line 162 of file AnasaziBasicEigenproblem.hpp.

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

Get a pointer to the auxiliary vector.

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

Definition at line 165 of file AnasaziBasicEigenproblem.hpp.

template<class ScalarType, class MV, class OP>
int Anasazi::BasicEigenproblem< ScalarType, MV, OP >::getNEV  )  const [inline, virtual]
 

Get the number of eigenvalues (NEV) that are required by this eigenproblem.

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

Definition at line 168 of file AnasaziBasicEigenproblem.hpp.

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

Get the symmetry information for this eigenproblem.

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

Definition at line 171 of file AnasaziBasicEigenproblem.hpp.

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

If the problem has been set, this method will return true.

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

Definition at line 174 of file AnasaziBasicEigenproblem.hpp.

template<class ScalarType, class MV, class OP>
const Eigensolution<ScalarType,MV>& Anasazi::BasicEigenproblem< ScalarType, MV, OP >::getSolution  )  const [inline, virtual]
 

Get the solution to the eigenproblem.

There is no computation associated with this method. It only provides a mechanism for associating an Eigensolution with a Eigenproblem.

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

Definition at line 181 of file AnasaziBasicEigenproblem.hpp.


Member Data Documentation

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

Reference-counted pointer for A of the eigenproblem $Ax=\lambda Mx$.

Definition at line 188 of file AnasaziBasicEigenproblem.hpp.

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

Reference-counted pointer for M of the eigenproblem $Ax=\lambda Mx$.

Definition at line 191 of file AnasaziBasicEigenproblem.hpp.

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

Reference-counted pointer for the operator of the eigenproblem $Ax=\lambda Mx$.

Definition at line 194 of file AnasaziBasicEigenproblem.hpp.

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

Reference-counted pointer for the preconditioner of the eigenproblem $Ax=\lambda Mx$.

Definition at line 197 of file AnasaziBasicEigenproblem.hpp.

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

Reference-counted pointer for the initial vector of the eigenproblem $Ax=\lambda Mx$.

Definition at line 200 of file AnasaziBasicEigenproblem.hpp.

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

Reference-counted pointer for the auxiliary vector of the eigenproblem $Ax=\lambda Mx$.

Definition at line 203 of file AnasaziBasicEigenproblem.hpp.

template<class ScalarType, class MV, class OP>
int Anasazi::BasicEigenproblem< ScalarType, MV, OP >::_nev [protected]
 

Number of eigenvalues requested.

Definition at line 206 of file AnasaziBasicEigenproblem.hpp.

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.

Definition at line 212 of file AnasaziBasicEigenproblem.hpp.

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

Sanity Check Flag.

Definition at line 215 of file AnasaziBasicEigenproblem.hpp.

template<class ScalarType, class MV, class OP>
Eigensolution<ScalarType,MV> Anasazi::BasicEigenproblem< ScalarType, MV, OP >::_sol [protected]
 

Solution to problem.

Definition at line 223 of file AnasaziBasicEigenproblem.hpp.


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