Anasazi
Version of the Day
|
Anasazi's templated virtual class for providing routines for orthogonalization and orthonormalization of multivectors using matrix-based inner products. More...
#include <AnasaziMatOrthoManager.hpp>
Public Member Functions | |
Constructor/Destructor | |
MatOrthoManager (Teuchos::RCP< const OP > Op=Teuchos::null) | |
Default constructor. More... | |
virtual | ~MatOrthoManager () |
Destructor. More... | |
Accessor routines | |
virtual void | setOp (Teuchos::RCP< const OP > Op) |
Set operator used for inner product. More... | |
virtual Teuchos::RCP< const OP > | getOp () const |
Get operator used for inner product. More... | |
int | getOpCounter () const |
Retrieve operator counter. More... | |
void | resetOpCounter () |
Reset the operator counter to zero. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
Methods implementing Anasazi::OrthoManager | |
void | innerProd (const MV &X, const MV &Y, Teuchos::SerialDenseMatrix< int, ScalarType > &Z) const |
Implements the interface OrthoManager::innerProd(). More... | |
void | norm (const MV &X, std::vector< typename Teuchos::ScalarTraits< ScalarType >::magnitudeType > &normvec) const |
Implements the interface OrthoManager::norm(). More... | |
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(). More... | |
int | normalize (MV &X, Teuchos::RCP< Teuchos::SerialDenseMatrix< int, ScalarType > > B=Teuchos::null) const |
Implements the interface OrthoManager::normalize(). More... | |
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(). More... | |
Teuchos::ScalarTraits < ScalarType >::magnitudeType | orthonormError (const MV &X) const |
Implements the interface OrthoManager::orthonormError(). More... | |
Teuchos::ScalarTraits < ScalarType >::magnitudeType | orthogError (const MV &X1, const MV &X2) const |
Implements the interface OrthoManager::orthogError(). More... | |
Public Member Functions inherited from Anasazi::OrthoManager< ScalarType, MV > | |
OrthoManager () | |
Default constructor. More... | |
virtual | ~OrthoManager () |
Destructor. More... | |
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 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 44 of file AnasaziMatOrthoManager.hpp.
Anasazi::MatOrthoManager< ScalarType, MV, OP >::MatOrthoManager | ( | Teuchos::RCP< const OP > | Op = Teuchos::null | ) |
Default constructor.
Definition at line 286 of file AnasaziMatOrthoManager.hpp.
|
inlinevirtual |
Destructor.
Definition at line 52 of file AnasaziMatOrthoManager.hpp.
|
virtual |
Set operator used for inner product.
Reimplemented in Anasazi::TsqrMatOrthoManager< Scalar, MV, OP >.
Definition at line 290 of file AnasaziMatOrthoManager.hpp.
|
virtual |
Get operator used for inner product.
Reimplemented in Anasazi::TsqrMatOrthoManager< Scalar, MV, OP >.
Definition at line 297 of file AnasaziMatOrthoManager.hpp.
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 303 of file AnasaziMatOrthoManager.hpp.
void Anasazi::MatOrthoManager< ScalarType, MV, OP >::resetOpCounter | ( | ) |
Reset the operator counter to zero.
See getOpCounter() for more details.
Definition at line 309 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 |
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 351 of file AnasaziMatOrthoManager.hpp.
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 |
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 390 of file AnasaziMatOrthoManager.hpp.
|
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::TsqrMatOrthoManager< Scalar, MV, OP >, Anasazi::ICGSOrthoManager< ScalarType, MV, OP >, Anasazi::BasicOrthoManager< ScalarType, MV, OP >, and Anasazi::SVQBOrthoManager< ScalarType, MV, OP >.
|
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::ICGSOrthoManager< ScalarType, MV, OP >, Anasazi::BasicOrthoManager< ScalarType, MV, OP >, and Anasazi::SVQBOrthoManager< ScalarType, MV, OP >.
|
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::TsqrMatOrthoManager< Scalar, MV, OP >, Anasazi::ICGSOrthoManager< ScalarType, MV, OP >, Anasazi::BasicOrthoManager< ScalarType, MV, OP >, and Anasazi::SVQBOrthoManager< ScalarType, MV, OP >.
|
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::TsqrMatOrthoManager< Scalar, MV, OP >, Anasazi::ICGSOrthoManager< ScalarType, MV, OP >, Anasazi::BasicOrthoManager< ScalarType, MV, OP >, and Anasazi::SVQBOrthoManager< ScalarType, MV, OP >.
|
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::TsqrMatOrthoManager< Scalar, MV, OP >, Anasazi::ICGSOrthoManager< ScalarType, MV, OP >, Anasazi::BasicOrthoManager< ScalarType, MV, OP >, and Anasazi::SVQBOrthoManager< ScalarType, MV, OP >.
|
virtual |
Implements the interface OrthoManager::innerProd().
This method calls
Implements Anasazi::OrthoManager< ScalarType, MV >.
Definition at line 315 of file AnasaziMatOrthoManager.hpp.
|
virtual |
Implements the interface OrthoManager::norm().
This method calls
Implements Anasazi::OrthoManager< ScalarType, MV >.
Definition at line 383 of file AnasaziMatOrthoManager.hpp.
|
virtual |
Implements the interface OrthoManager::project().
This method calls
Implements Anasazi::OrthoManager< ScalarType, MV >.
Definition at line 445 of file AnasaziMatOrthoManager.hpp.
|
virtual |
Implements the interface OrthoManager::normalize().
This method calls
Implements Anasazi::OrthoManager< ScalarType, MV >.
Definition at line 455 of file AnasaziMatOrthoManager.hpp.
|
virtual |
Implements the interface OrthoManager::projectAndNormalize().
This method calls
Implements Anasazi::OrthoManager< ScalarType, MV >.
Definition at line 462 of file AnasaziMatOrthoManager.hpp.
|
virtual |
Implements the interface OrthoManager::orthonormError().
This method calls
Implements Anasazi::OrthoManager< ScalarType, MV >.
Definition at line 474 of file AnasaziMatOrthoManager.hpp.
|
virtual |
Implements the interface OrthoManager::orthogError().
This method calls
Implements Anasazi::OrthoManager< ScalarType, MV >.
Definition at line 481 of file AnasaziMatOrthoManager.hpp.