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

Anasazi's templated virtual class for providing routines for orthogonalization and orthonormalization of multivectors using matrix-based inner products. More...

#include <AnasaziMatOrthoManager.hpp>

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

Anasazi::OrthoManager< ScalarType, MV > Anasazi::BasicOrthoManager< ScalarType, MV, OP > Anasazi::SVQBOrthoManager< ScalarType, MV, OP > List of all members.

Public Member Functions

Constructor/Destructor
 MatOrthoManager (Teuchos::RCP< const OP > Op=Teuchos::null)
 Default constructor.
virtual ~MatOrthoManager ()
 Destructor.
Accessor routines
void setOp (Teuchos::RCP< const OP > Op)
 Set operator used for inner product.
Teuchos::RCP< const OP > getOp () const
 Get operator used for inner product.
int getOpCounter () const
 Retrieve operator counter.
void resetOpCounter ()
 Reset the operator counter to zero.
Matrix-based Orthogonality Methods
void innerProdMat (const MV &X, const MV &Y, Teuchos::RCP< const MV > MY, Teuchos::SerialDenseMatrix< int, ScalarType > &Z) const
 Provides a matrix-based inner product.
void normMat (const MV &X, Teuchos::RCP< const MV > MX, std::vector< typename Teuchos::ScalarTraits< ScalarType >::magnitudeType > *normvec) const
 Provides the norm induced by the matrix-based inner product.
virtual void projectMat (MV &X, Teuchos::RCP< MV > MX=Teuchos::null, Teuchos::Array< Teuchos::RCP< Teuchos::SerialDenseMatrix< int, ScalarType > > > C=Teuchos::tuple(Teuchos::null), Teuchos::Array< Teuchos::RCP< const MV > > Q=Teuchos::tuple(Teuchos::null)) const =0
 Provides matrix-based projection method.
virtual int normalizeMat (MV &X, Teuchos::RCP< MV > MX=Teuchos::null, Teuchos::RCP< Teuchos::SerialDenseMatrix< int, ScalarType > > B=Teuchos::null) const =0
 Provides matrix-based orthonormalization method.
virtual int projectAndNormalizeMat (MV &X, Teuchos::RCP< MV > MX=Teuchos::null, Teuchos::Array< Teuchos::RCP< Teuchos::SerialDenseMatrix< int, ScalarType > > > C=Teuchos::tuple(Teuchos::null), Teuchos::RCP< Teuchos::SerialDenseMatrix< int, ScalarType > > B=Teuchos::null, Teuchos::Array< Teuchos::RCP< const MV > > Q=Teuchos::tuple(Teuchos::null)) const =0
 Provides matrix-based projection/orthonormalization method.
virtual Teuchos::ScalarTraits<
ScalarType >::magnitudeType 
orthonormErrorMat (const MV &X, Teuchos::RCP< const MV > MX=Teuchos::null) const =0
 This method computes the error in orthonormality of a multivector.
virtual Teuchos::ScalarTraits<
ScalarType >::magnitudeType 
orthogErrorMat (const MV &X1, Teuchos::RCP< const MV > MX1, const MV &X2) const =0
 This method computes the error in orthogonality of two multivectors.
Methods implementing Anasazi::OrthoManager
void innerProd (const MV &X, const MV &Y, Teuchos::SerialDenseMatrix< int, ScalarType > &Z) const
 Implements the interface OrthoManager::innerProd().
void norm (const MV &X, std::vector< typename Teuchos::ScalarTraits< ScalarType >::magnitudeType > *normvec) const
 Implements the interface OrthoManager::norm().
void project (MV &X, Teuchos::Array< Teuchos::RCP< Teuchos::SerialDenseMatrix< int, ScalarType > > > C=Teuchos::tuple(Teuchos::null), Teuchos::Array< Teuchos::RCP< const MV > > Q=Teuchos::tuple(Teuchos::null)) const
 Implements the interface OrthoManager::project().
int normalize (MV &X, Teuchos::RCP< Teuchos::SerialDenseMatrix< int, ScalarType > > B=Teuchos::null) const
 Implements the interface OrthoManager::normalize().
int projectAndNormalize (MV &X, Teuchos::Array< Teuchos::RCP< Teuchos::SerialDenseMatrix< int, ScalarType > > > C=Teuchos::tuple(Teuchos::null), Teuchos::RCP< Teuchos::SerialDenseMatrix< int, ScalarType > > B=Teuchos::null, Teuchos::Array< Teuchos::RCP< const MV > > Q=Teuchos::tuple(Teuchos::null)) const
 Implements the interface OrthoManager::projectAndNormalize().
Teuchos::ScalarTraits< ScalarType
>::magnitudeType 
orthonormError (const MV &X) const
 Implements the interface OrthoManager::orthonormError().
Teuchos::ScalarTraits< ScalarType
>::magnitudeType 
orthogError (const MV &X1, const MV &X2) const
 Implements the interface OrthoManager::orthogError().

Protected Attributes

Teuchos::RCP< const OP > _Op
bool _hasOp
int _OpCounter

Detailed Description

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

Anasazi's templated virtual class for providing routines for orthogonalization and orthonormalization of multivectors using matrix-based inner products.

This class extends Anasazi::OrthoManager by providing extra calling arguments to orthogonalization routines, to reduce the cost of applying the inner product in cases where the user already has the image of the source multivector under the inner product matrix.

A concrete implementation of this class is necessary. The user can create their own implementation if those supplied are not suitable for their needs.

Author:
Chris Baker, Ulrich Hetmaniuk, Rich Lehoucq, and Heidi Thornquist

Definition at line 61 of file AnasaziMatOrthoManager.hpp.


Constructor & Destructor Documentation

template<class ScalarType, class MV, class OP>
Anasazi::MatOrthoManager< ScalarType, MV, OP >::MatOrthoManager ( Teuchos::RCP< const OP >  Op = Teuchos::null  ) 

Default constructor.

Definition at line 251 of file AnasaziMatOrthoManager.hpp.

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

Destructor.

Definition at line 69 of file AnasaziMatOrthoManager.hpp.


Member Function Documentation

template<class ScalarType, class MV, class OP>
void Anasazi::MatOrthoManager< ScalarType, MV, OP >::setOp ( Teuchos::RCP< const OP >  Op  ) 

Set operator used for inner product.

Definition at line 255 of file AnasaziMatOrthoManager.hpp.

template<class ScalarType, class MV, class OP>
Teuchos::RCP< const OP > Anasazi::MatOrthoManager< ScalarType, MV, OP >::getOp (  )  const

Get operator used for inner product.

Definition at line 262 of file AnasaziMatOrthoManager.hpp.

template<class ScalarType, class MV, class OP>
int Anasazi::MatOrthoManager< ScalarType, MV, OP >::getOpCounter (  )  const

Retrieve operator counter.

This counter returns the number of applications of the operator specifying the inner product. When the operator is applied to a multivector, the counter is incremented by the number of vectors in the multivector. If the operator is not specified, the counter is never incremented.

Definition at line 268 of file AnasaziMatOrthoManager.hpp.

template<class ScalarType, class MV, class OP>
void Anasazi::MatOrthoManager< ScalarType, MV, OP >::resetOpCounter (  ) 

Reset the operator counter to zero.

See getOpCounter() for more details.

Definition at line 274 of file AnasaziMatOrthoManager.hpp.

template<class ScalarType, class MV, class OP>
void Anasazi::MatOrthoManager< ScalarType, MV, OP >::innerProdMat ( const MV &  X,
const MV &  Y,
Teuchos::RCP< const MV >  MY,
Teuchos::SerialDenseMatrix< int, ScalarType > &  Z 
) const

Provides a matrix-based inner product.

Provides the inner product

\[ \langle x, y \rangle = x^H M y \]

Optionally allows the provision of $M y$. See OrthoManager::innerProd() for more details.

Definition at line 316 of file AnasaziMatOrthoManager.hpp.

template<class ScalarType, class MV, class OP>
void Anasazi::MatOrthoManager< ScalarType, MV, OP >::normMat ( const MV &  X,
Teuchos::RCP< const MV >  MX,
std::vector< typename Teuchos::ScalarTraits< ScalarType >::magnitudeType > *  normvec 
) const

Provides the norm induced by the matrix-based inner product.

Provides the norm:

\[ \|x\|_M = \sqrt{x^T H y} \]

Optionally allows the provision of $M x$. See OrthoManager::norm() for more details.

Definition at line 346 of file AnasaziMatOrthoManager.hpp.

template<class ScalarType, class MV, class OP>
virtual void Anasazi::MatOrthoManager< ScalarType, MV, OP >::projectMat ( MV &  X,
Teuchos::RCP< MV >  MX = Teuchos::null,
Teuchos::Array< Teuchos::RCP< Teuchos::SerialDenseMatrix< int, ScalarType > > >  C = Teuchos::tuple(Teuchos::null),
Teuchos::Array< Teuchos::RCP< const MV > >  Q = Teuchos::tuple(Teuchos::null) 
) const [pure virtual]

Provides matrix-based projection method.

This method optionally allows the provision of $M X$. See OrthoManager::project() for more details.

Implemented in Anasazi::BasicOrthoManager< ScalarType, MV, OP >, and Anasazi::SVQBOrthoManager< ScalarType, MV, OP >.

template<class ScalarType, class MV, class OP>
virtual int Anasazi::MatOrthoManager< ScalarType, MV, OP >::normalizeMat ( MV &  X,
Teuchos::RCP< MV >  MX = Teuchos::null,
Teuchos::RCP< Teuchos::SerialDenseMatrix< int, ScalarType > >  B = Teuchos::null 
) const [pure virtual]

Provides matrix-based orthonormalization method.

This method optionally allows the provision of $M X$. See orthoManager::normalize() for more details.

Implemented in Anasazi::BasicOrthoManager< ScalarType, MV, OP >, and Anasazi::SVQBOrthoManager< ScalarType, MV, OP >.

template<class ScalarType, class MV, class OP>
virtual int Anasazi::MatOrthoManager< ScalarType, MV, OP >::projectAndNormalizeMat ( MV &  X,
Teuchos::RCP< MV >  MX = Teuchos::null,
Teuchos::Array< Teuchos::RCP< Teuchos::SerialDenseMatrix< int, ScalarType > > >  C = Teuchos::tuple(Teuchos::null),
Teuchos::RCP< Teuchos::SerialDenseMatrix< int, ScalarType > >  B = Teuchos::null,
Teuchos::Array< Teuchos::RCP< const MV > >  Q = Teuchos::tuple(Teuchos::null) 
) const [pure virtual]

Provides matrix-based projection/orthonormalization method.

This method optionally allows the provision of $M X$. See orthoManager::projectAndNormalize() for more details.

Implemented in Anasazi::BasicOrthoManager< ScalarType, MV, OP >, and Anasazi::SVQBOrthoManager< ScalarType, MV, OP >.

template<class ScalarType, class MV, class OP>
virtual Teuchos::ScalarTraits<ScalarType>::magnitudeType Anasazi::MatOrthoManager< ScalarType, MV, OP >::orthonormErrorMat ( const MV &  X,
Teuchos::RCP< const MV >  MX = Teuchos::null 
) const [pure virtual]

This method computes the error in orthonormality of a multivector.

This method optionally allows optionally exploits a caller-provided MX.

Implemented in Anasazi::BasicOrthoManager< ScalarType, MV, OP >, and Anasazi::SVQBOrthoManager< ScalarType, MV, OP >.

template<class ScalarType, class MV, class OP>
virtual Teuchos::ScalarTraits<ScalarType>::magnitudeType Anasazi::MatOrthoManager< ScalarType, MV, OP >::orthogErrorMat ( const MV &  X1,
Teuchos::RCP< const MV >  MX1,
const MV &  X2 
) const [pure virtual]

This method computes the error in orthogonality of two multivectors.

This method optionally allows optionally exploits a caller-provided MX.

Implemented in Anasazi::BasicOrthoManager< ScalarType, MV, OP >, and Anasazi::SVQBOrthoManager< ScalarType, MV, OP >.

template<class ScalarType, class MV, class OP>
void Anasazi::MatOrthoManager< ScalarType, MV, OP >::innerProd ( const MV &  X,
const MV &  Y,
Teuchos::SerialDenseMatrix< int, ScalarType > &  Z 
) const [virtual]

Implements the interface OrthoManager::innerProd().

This method calls

 innerProdMat(X,Teuchos::null,Y,Z);

Implements Anasazi::OrthoManager< ScalarType, MV >.

Definition at line 280 of file AnasaziMatOrthoManager.hpp.

template<class ScalarType, class MV, class OP>
void Anasazi::MatOrthoManager< ScalarType, MV, OP >::norm ( const MV &  X,
std::vector< typename Teuchos::ScalarTraits< ScalarType >::magnitudeType > *  normvec 
) const [virtual]

Implements the interface OrthoManager::norm().

This method calls

 normMat(X,Teuchos::null,normvec);

Implements Anasazi::OrthoManager< ScalarType, MV >.

Definition at line 339 of file AnasaziMatOrthoManager.hpp.

template<class ScalarType, class MV, class OP>
void Anasazi::MatOrthoManager< ScalarType, MV, OP >::project ( MV &  X,
Teuchos::Array< Teuchos::RCP< Teuchos::SerialDenseMatrix< int, ScalarType > > >  C = Teuchos::tuple(Teuchos::null),
Teuchos::Array< Teuchos::RCP< const MV > >  Q = Teuchos::tuple(Teuchos::null) 
) const [virtual]

Implements the interface OrthoManager::project().

This method calls

 projectMat(X,Teuchos::null,C,Z);

Implements Anasazi::OrthoManager< ScalarType, MV >.

Definition at line 377 of file AnasaziMatOrthoManager.hpp.

template<class ScalarType, class MV, class OP>
int Anasazi::MatOrthoManager< ScalarType, MV, OP >::normalize ( MV &  X,
Teuchos::RCP< Teuchos::SerialDenseMatrix< int, ScalarType > >  B = Teuchos::null 
) const [virtual]

Implements the interface OrthoManager::normalize().

This method calls

 normalizeMat(X,Teuchos::null,B);

Implements Anasazi::OrthoManager< ScalarType, MV >.

Definition at line 386 of file AnasaziMatOrthoManager.hpp.

template<class ScalarType, class MV, class OP>
int Anasazi::MatOrthoManager< ScalarType, MV, OP >::projectAndNormalize ( MV &  X,
Teuchos::Array< Teuchos::RCP< Teuchos::SerialDenseMatrix< int, ScalarType > > >  C = Teuchos::tuple(Teuchos::null),
Teuchos::RCP< Teuchos::SerialDenseMatrix< int, ScalarType > >  B = Teuchos::null,
Teuchos::Array< Teuchos::RCP< const MV > >  Q = Teuchos::tuple(Teuchos::null) 
) const [virtual]

Implements the interface OrthoManager::projectAndNormalize().

This method calls

 projectAndNormalizeMat(X,Teuchos::null,C,B,Q);

Implements Anasazi::OrthoManager< ScalarType, MV >.

Definition at line 393 of file AnasaziMatOrthoManager.hpp.

template<class ScalarType, class MV, class OP>
Teuchos::ScalarTraits< ScalarType >::magnitudeType Anasazi::MatOrthoManager< ScalarType, MV, OP >::orthonormError ( const MV &  X  )  const [virtual]

Implements the interface OrthoManager::orthonormError().

This method calls

 orthonormErrorMat(X,Teuchos::null);

Implements Anasazi::OrthoManager< ScalarType, MV >.

Definition at line 404 of file AnasaziMatOrthoManager.hpp.

template<class ScalarType, class MV, class OP>
Teuchos::ScalarTraits< ScalarType >::magnitudeType Anasazi::MatOrthoManager< ScalarType, MV, OP >::orthogError ( const MV &  X1,
const MV &  X2 
) const [virtual]

Implements the interface OrthoManager::orthogError().

This method calls

 orthogErrorMat(X1,Teuchos::null,X2);

Implements Anasazi::OrthoManager< ScalarType, MV >.

Definition at line 411 of file AnasaziMatOrthoManager.hpp.


The documentation for this class was generated from the following file:
Generated on Tue Oct 20 12:45:19 2009 for Anasazi by doxygen 1.4.7