Belos
Version of the Day
|
Mixin for out-of-place orthogonalization. More...
#include <BelosTsqrOrthoManager.hpp>
Public Types | |
typedef Scalar | scalar_type |
typedef Teuchos::ScalarTraits < Scalar >::magnitudeType | magnitude_type |
typedef MV | multivector_type |
Multivector type with which this class was specialized. More... | |
typedef Teuchos::SerialDenseMatrix < int, Scalar > | mat_type |
typedef Teuchos::RCP< mat_type > | mat_ptr |
Public Member Functions | |
virtual int | normalizeOutOfPlace (MV &X, MV &Q, mat_ptr B) const =0 |
Normalize X into Q*B. More... | |
virtual int | projectAndNormalizeOutOfPlace (MV &X_in, MV &X_out, Teuchos::Array< mat_ptr > C, mat_ptr B, Teuchos::ArrayView< Teuchos::RCP< const MV > > Q) const =0 |
Project and normalize X_in into X_out. More... | |
virtual | ~OutOfPlaceNormalizerMixin () |
Trivial virtual destructor, to silence compiler warnings. More... | |
Mixin for out-of-place orthogonalization.
This class presents an abstract interface for multiple inheritance ("mixin") for special orthogonalization methods that normalize "out-of-place." OrthoManager and MatOrthoManager both normalize (and projectAndNormalize) multivectors "in place," meaning that the input and output multivectors are the same (X, in both cases). Gram-Schmidt (modified or classical) is an example of an orthogonalization method that can normalize (and projectAndNormalize) in place. TSQR (the Tall Skinny QR factorization, see TsqrOrthoManager.hpp for references) is an orthogonalization method which cannot normalize (or projectAndNormalize) in place.
Tsqr(Mat)OrthoManager implements (Mat)OrthoManager's normalize() and projectAndNormalize() methods with scratch space and copying. However, if you handle Tsqr(Mat)OrthoManager through this mixin, you can exploit TSQR's unique interface to avoid copying back and forth between scratch space.
Definition at line 47 of file BelosTsqrOrthoManager.hpp.
typedef Scalar Belos::OutOfPlaceNormalizerMixin< Scalar, MV >::scalar_type |
Definition at line 49 of file BelosTsqrOrthoManager.hpp.
typedef Teuchos::ScalarTraits<Scalar>::magnitudeType Belos::OutOfPlaceNormalizerMixin< Scalar, MV >::magnitude_type |
Definition at line 50 of file BelosTsqrOrthoManager.hpp.
Belos::OutOfPlaceNormalizerMixin< Scalar, MV >::multivector_type |
Multivector type with which this class was specialized.
Definition at line 53 of file BelosTsqrOrthoManager.hpp.
typedef Teuchos::SerialDenseMatrix<int, Scalar> Belos::OutOfPlaceNormalizerMixin< Scalar, MV >::mat_type |
Definition at line 55 of file BelosTsqrOrthoManager.hpp.
typedef Teuchos::RCP<mat_type> Belos::OutOfPlaceNormalizerMixin< Scalar, MV >::mat_ptr |
Definition at line 56 of file BelosTsqrOrthoManager.hpp.
|
inlinevirtual |
Trivial virtual destructor, to silence compiler warnings.
Definition at line 95 of file BelosTsqrOrthoManager.hpp.
|
pure virtual |
Normalize X into Q*B.
X | [in/out] On input: Multivector to normalize. On output: Possibly overwritten with invalid values. |
Q | [out] On output: Normalized multivector. |
B | [out] On output: Normalization coefficients. |
Implemented in Belos::TsqrMatOrthoManager< Scalar, MV, OP >, and Belos::TsqrOrthoManager< Scalar, MV >.
|
pure virtual |
Project and normalize X_in into X_out.
Project X_in against Q, storing projection coefficients in C, and normalize X_in into X_out, storing normalization coefficients in B. On output, X_out has the resulting orthogonal vectors. X_in may be overwritten with invalid values.
X_in | [in/out] On input: The vectors to project against Q and normalize. On output: possibly overwritten with invalid values. |
X_out | [out] The normalized input vectors after projection against Q. |
C | [out] Projection coefficients |
B | [out] Normalization coefficients |
Q | [in] The orthogonal basis against which to project |
Implemented in Belos::TsqrMatOrthoManager< Scalar, MV, OP >, and Belos::TsqrOrthoManager< Scalar, MV >.