#include <AnasaziMatOrthoManager.hpp>
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::SerialDenseMatrix< int, ScalarType > &Z, Teuchos::RCP< const MV > MX=Teuchos::null, Teuchos::RCP< const MV > MY=Teuchos::null) const |
Provides a matrix-based inner product. | |
void | normMat (const MV &X, std::vector< typename Teuchos::ScalarTraits< ScalarType >::magnitudeType > &normvec, Teuchos::RCP< const MV > MX=Teuchos::null) const |
Provides the norm induced by the matrix-based inner product. | |
virtual void | projectMat (MV &X, Teuchos::Array< Teuchos::RCP< const MV > > Q, Teuchos::Array< Teuchos::RCP< Teuchos::SerialDenseMatrix< int, ScalarType > > > C=Teuchos::tuple(Teuchos::RCP< Teuchos::SerialDenseMatrix< int, ScalarType > >(Teuchos::null)), Teuchos::RCP< MV > MX=Teuchos::null, Teuchos::Array< Teuchos::RCP< const MV > > MQ=Teuchos::tuple(Teuchos::RCP< const MV >(Teuchos::null))) const =0 |
Provides matrix-based projection method. | |
virtual int | normalizeMat (MV &X, Teuchos::RCP< Teuchos::SerialDenseMatrix< int, ScalarType > > B=Teuchos::null, Teuchos::RCP< MV > MX=Teuchos::null) const =0 |
Provides matrix-based orthonormalization method. | |
virtual int | projectAndNormalizeMat (MV &X, Teuchos::Array< Teuchos::RCP< const MV > > Q, Teuchos::Array< Teuchos::RCP< Teuchos::SerialDenseMatrix< int, ScalarType > > > C=Teuchos::tuple(Teuchos::RCP< Teuchos::SerialDenseMatrix< int, ScalarType > >(Teuchos::null)), Teuchos::RCP< Teuchos::SerialDenseMatrix< int, ScalarType > > B=Teuchos::null, Teuchos::RCP< MV > MX=Teuchos::null, Teuchos::Array< Teuchos::RCP< const MV > > MQ=Teuchos::tuple(Teuchos::RCP< const MV >(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 &X, const MV &Y, Teuchos::RCP< const MV > MX=Teuchos::null, Teuchos::RCP< const MV > MY=Teuchos::null) 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< const MV > > Q, Teuchos::Array< Teuchos::RCP< Teuchos::SerialDenseMatrix< int, ScalarType > > > C=Teuchos::tuple(Teuchos::RCP< Teuchos::SerialDenseMatrix< int, ScalarType > >(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< const MV > > Q, Teuchos::Array< Teuchos::RCP< Teuchos::SerialDenseMatrix< int, ScalarType > > > C=Teuchos::tuple(Teuchos::RCP< Teuchos::SerialDenseMatrix< int, ScalarType > >(Teuchos::null)), Teuchos::RCP< Teuchos::SerialDenseMatrix< int, ScalarType > > B=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 |
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 target multivectors 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.
Definition at line 63 of file AnasaziMatOrthoManager.hpp.
Anasazi::MatOrthoManager< ScalarType, MV, OP >::MatOrthoManager | ( | Teuchos::RCP< const OP > | Op = Teuchos::null |
) | [inline] |
virtual Anasazi::MatOrthoManager< ScalarType, MV, OP >::~MatOrthoManager | ( | ) | [inline, virtual] |
Teuchos::RCP< const OP > Anasazi::MatOrthoManager< ScalarType, MV, OP >::getOp | ( | ) | const [inline] |
int Anasazi::MatOrthoManager< ScalarType, MV, OP >::getOpCounter | ( | ) | const [inline] |
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 322 of file AnasaziMatOrthoManager.hpp.
void Anasazi::MatOrthoManager< ScalarType, MV, OP >::innerProd | ( | const MV & | X, | |
const MV & | Y, | |||
Teuchos::SerialDenseMatrix< int, ScalarType > & | Z | |||
) | const [inline, virtual] |
Implements the interface OrthoManager::innerProd().
This method calls
innerProdMat(X,Y,Z);
Implements Anasazi::OrthoManager< ScalarType, MV >.
Definition at line 334 of file AnasaziMatOrthoManager.hpp.
void Anasazi::MatOrthoManager< ScalarType, MV, OP >::innerProdMat | ( | const MV & | X, | |
const MV & | Y, | |||
Teuchos::SerialDenseMatrix< int, ScalarType > & | Z, | |||
Teuchos::RCP< const MV > | MX = Teuchos::null , |
|||
Teuchos::RCP< const MV > | MY = Teuchos::null | |||
) | const [inline] |
Provides a matrix-based inner product.
Provides the inner product
Optionally allows the provision of and/or
. See OrthoManager::innerProd() for more details.
Definition at line 370 of file AnasaziMatOrthoManager.hpp.
void Anasazi::MatOrthoManager< ScalarType, MV, OP >::norm | ( | const MV & | X, | |
std::vector< typename Teuchos::ScalarTraits< ScalarType >::magnitudeType > & | normvec | |||
) | const [inline, virtual] |
Implements the interface OrthoManager::norm().
This method calls
normMat(X,normvec);
Implements Anasazi::OrthoManager< ScalarType, MV >.
Definition at line 402 of file AnasaziMatOrthoManager.hpp.
int Anasazi::MatOrthoManager< ScalarType, MV, OP >::normalize | ( | MV & | X, | |
Teuchos::RCP< Teuchos::SerialDenseMatrix< int, ScalarType > > | B = Teuchos::null | |||
) | const [inline, virtual] |
Implements the interface OrthoManager::normalize().
This method calls
normalizeMat(X,B);
Implements Anasazi::OrthoManager< ScalarType, MV >.
Definition at line 452 of file AnasaziMatOrthoManager.hpp.
virtual int Anasazi::MatOrthoManager< ScalarType, MV, OP >::normalizeMat | ( | MV & | X, | |
Teuchos::RCP< Teuchos::SerialDenseMatrix< int, ScalarType > > | B = Teuchos::null , |
|||
Teuchos::RCP< MV > | MX = Teuchos::null | |||
) | const [pure virtual] |
Provides matrix-based orthonormalization method.
This method optionally allows the provision of . See orthoManager::normalize() for more details.
X,B | [in/out] As in OrthoManager::normalize() | |
MX | [in/out] If specified by the user, on input MX is required to be the image of X under the operator getOp(). On output, MX will be updated to reflect the changes in X . |
X
. This specifies how many columns in the returned X
and MX
and rows in the returned B
are valid. Implemented in Anasazi::BasicOrthoManager< ScalarType, MV, OP >, Anasazi::ICGSOrthoManager< ScalarType, MV, OP >, and Anasazi::SVQBOrthoManager< ScalarType, MV, OP >.
void Anasazi::MatOrthoManager< ScalarType, MV, OP >::normMat | ( | const MV & | X, | |
std::vector< typename Teuchos::ScalarTraits< ScalarType >::magnitudeType > & | normvec, | |||
Teuchos::RCP< const MV > | MX = Teuchos::null | |||
) | const [inline] |
Provides the norm induced by the matrix-based inner product.
Provides the norm:
Optionally allows the provision of . See OrthoManager::norm() for more details.
Definition at line 409 of file AnasaziMatOrthoManager.hpp.
Teuchos::ScalarTraits< ScalarType >::magnitudeType Anasazi::MatOrthoManager< ScalarType, MV, OP >::orthogError | ( | const MV & | X1, | |
const MV & | X2 | |||
) | const [inline, virtual] |
Implements the interface OrthoManager::orthogError().
This method calls
orthogErrorMat(X1,X2);
Implements Anasazi::OrthoManager< ScalarType, MV >.
Definition at line 478 of file AnasaziMatOrthoManager.hpp.
virtual Teuchos::ScalarTraits<ScalarType>::magnitudeType Anasazi::MatOrthoManager< ScalarType, MV, OP >::orthogErrorMat | ( | const MV & | X, | |
const MV & | Y, | |||
Teuchos::RCP< const MV > | MX = Teuchos::null , |
|||
Teuchos::RCP< const MV > | MY = Teuchos::null | |||
) | const [pure virtual] |
This method computes the error in orthogonality of two multivectors.
This method optionally allows optionally exploits a caller-provided MX
and/or MY
.
Implemented in Anasazi::BasicOrthoManager< ScalarType, MV, OP >, Anasazi::ICGSOrthoManager< ScalarType, MV, OP >, and Anasazi::SVQBOrthoManager< ScalarType, MV, OP >.
Teuchos::ScalarTraits< ScalarType >::magnitudeType Anasazi::MatOrthoManager< ScalarType, MV, OP >::orthonormError | ( | const MV & | X | ) | const [inline, virtual] |
Implements the interface OrthoManager::orthonormError().
This method calls
Implements Anasazi::OrthoManager< ScalarType, MV >.
Definition at line 471 of file AnasaziMatOrthoManager.hpp.
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 >, Anasazi::ICGSOrthoManager< ScalarType, MV, OP >, and Anasazi::SVQBOrthoManager< ScalarType, MV, OP >.
void Anasazi::MatOrthoManager< ScalarType, MV, OP >::project | ( | MV & | X, | |
Teuchos::Array< Teuchos::RCP< const MV > > | Q, | |||
Teuchos::Array< Teuchos::RCP< Teuchos::SerialDenseMatrix< int, ScalarType > > > | C = Teuchos::tuple(Teuchos::RCP< Teuchos::SerialDenseMatrix<int,ScalarType> >(Teuchos::null)) | |||
) | const [inline, virtual] |
Implements the interface OrthoManager::project().
This method calls
projectMat(X,Q,C);
Implements Anasazi::OrthoManager< ScalarType, MV >.
Definition at line 442 of file AnasaziMatOrthoManager.hpp.
int Anasazi::MatOrthoManager< ScalarType, MV, OP >::projectAndNormalize | ( | MV & | X, | |
Teuchos::Array< Teuchos::RCP< const MV > > | Q, | |||
Teuchos::Array< Teuchos::RCP< Teuchos::SerialDenseMatrix< int, ScalarType > > > | C = Teuchos::tuple(Teuchos::RCP< Teuchos::SerialDenseMatrix<int,ScalarType> >(Teuchos::null)) , |
|||
Teuchos::RCP< Teuchos::SerialDenseMatrix< int, ScalarType > > | B = Teuchos::null | |||
) | const [inline, virtual] |
Implements the interface OrthoManager::projectAndNormalize().
This method calls
projectAndNormalizeMat(X,Q,C,B);
Implements Anasazi::OrthoManager< ScalarType, MV >.
Definition at line 459 of file AnasaziMatOrthoManager.hpp.
virtual int Anasazi::MatOrthoManager< ScalarType, MV, OP >::projectAndNormalizeMat | ( | MV & | X, | |
Teuchos::Array< Teuchos::RCP< const MV > > | Q, | |||
Teuchos::Array< Teuchos::RCP< Teuchos::SerialDenseMatrix< int, ScalarType > > > | C = Teuchos::tuple(Teuchos::RCP< Teuchos::SerialDenseMatrix< int, ScalarType > >(Teuchos::null)) , |
|||
Teuchos::RCP< Teuchos::SerialDenseMatrix< int, ScalarType > > | B = Teuchos::null , |
|||
Teuchos::RCP< MV > | MX = Teuchos::null , |
|||
Teuchos::Array< Teuchos::RCP< const MV > > | MQ = Teuchos::tuple(Teuchos::RCP< const MV >(Teuchos::null)) | |||
) | const [pure virtual] |
Provides matrix-based projection/orthonormalization method.
This method optionally allows the provision of and/or the
. See orthoManager::projectAndNormalize() for more details.
X,Q,C,B | [in/out] As in OrthoManager::projectAndNormalize() | |
MX | [in/out] If specified by the user, on input MX is required to be the image of X under the operator getOp(). On output, MX will be updated to reflect the changes in X . | |
MQ | [in] If specified by the user, on MQ [i] is required to be the image of Q[i] under the operator getOp(). |
X
. This specifies how many columns in the returned X
and MX
and rows in the returned B
are valid. Implemented in Anasazi::BasicOrthoManager< ScalarType, MV, OP >, Anasazi::ICGSOrthoManager< ScalarType, MV, OP >, and Anasazi::SVQBOrthoManager< ScalarType, MV, OP >.
virtual void Anasazi::MatOrthoManager< ScalarType, MV, OP >::projectMat | ( | MV & | X, | |
Teuchos::Array< Teuchos::RCP< const MV > > | Q, | |||
Teuchos::Array< Teuchos::RCP< Teuchos::SerialDenseMatrix< int, ScalarType > > > | C = Teuchos::tuple(Teuchos::RCP< Teuchos::SerialDenseMatrix< int, ScalarType > >(Teuchos::null)) , |
|||
Teuchos::RCP< MV > | MX = Teuchos::null , |
|||
Teuchos::Array< Teuchos::RCP< const MV > > | MQ = Teuchos::tuple(Teuchos::RCP< const MV >(Teuchos::null)) | |||
) | const [pure virtual] |
Provides matrix-based projection method.
This method optionally allows the provision of and/or the
. See OrthoManager::project() for more details.
X,Q,C | [in/out] As in OrthoManager::project() | |
MX | [in/out] If specified by the user, on input MX is required to be the image of X under the operator getOp(). On output, MX will be updated to reflect the changes in X . | |
MQ | [in] If specified by the user, on MQ [i] is required to be the image of Q[i] under the operator getOp(). |
Implemented in Anasazi::BasicOrthoManager< ScalarType, MV, OP >, Anasazi::ICGSOrthoManager< ScalarType, MV, OP >, and Anasazi::SVQBOrthoManager< ScalarType, MV, OP >.
void Anasazi::MatOrthoManager< ScalarType, MV, OP >::resetOpCounter | ( | ) | [inline] |
Reset the operator counter to zero.
See getOpCounter() for more details.
Definition at line 328 of file AnasaziMatOrthoManager.hpp.
void Anasazi::MatOrthoManager< ScalarType, MV, OP >::setOp | ( | Teuchos::RCP< const OP > | Op | ) | [inline] |
bool Anasazi::MatOrthoManager< ScalarType, MV, OP >::_hasOp [protected] |
Definition at line 299 of file AnasaziMatOrthoManager.hpp.
Teuchos::RCP<const OP> Anasazi::MatOrthoManager< ScalarType, MV, OP >::_Op [protected] |
Definition at line 298 of file AnasaziMatOrthoManager.hpp.
int Anasazi::MatOrthoManager< ScalarType, MV, OP >::_OpCounter [mutable, protected] |
Definition at line 300 of file AnasaziMatOrthoManager.hpp.