Belos Version of the Day
Public Types | Public Member Functions
Belos::OutOfPlaceNormalizerMixin< Scalar, MV > Class Template Reference

Mixin for out-of-place orthogonalization. More...

#include <BelosTsqrOrthoManager.hpp>

Inheritance diagram for Belos::OutOfPlaceNormalizerMixin< Scalar, MV >:
Inheritance graph
[legend]

List of all members.

Public Types

typedef Scalar scalar_type
typedef Teuchos::ScalarTraits
< Scalar >::magnitudeType 
magnitude_type
typedef MV multivector_type
typedef
Teuchos::SerialDenseMatrix
< int, Scalar > 
mat_type
typedef Teuchos::RCP< mat_typemat_ptr

Public Member Functions

virtual int normalizeOutOfPlace (MV &X, MV &Q, mat_ptr B) const =0
 Normalize X into Q*B, possibly overwriting X.
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; overwrite X_in.
virtual ~OutOfPlaceNormalizerMixin ()
 Trivial virtual destructor, to silence compiler warnings.

Detailed Description

template<class Scalar, class MV>
class Belos::OutOfPlaceNormalizerMixin< Scalar, MV >

Mixin for out-of-place orthogonalization.

Author:
Mark Hoemmen

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. For TSQR, we provide this mixin, so that iterative methods can exploit TSQR's unique interface to avoid one multivector copy.

Definition at line 77 of file BelosTsqrOrthoManager.hpp.


Member Typedef Documentation

template<class Scalar , class MV >
typedef Scalar Belos::OutOfPlaceNormalizerMixin< Scalar, MV >::scalar_type
template<class Scalar , class MV >
typedef Teuchos::ScalarTraits<Scalar>::magnitudeType Belos::OutOfPlaceNormalizerMixin< Scalar, MV >::magnitude_type
template<class Scalar , class MV >
typedef MV Belos::OutOfPlaceNormalizerMixin< Scalar, MV >::multivector_type
template<class Scalar , class MV >
typedef Teuchos::SerialDenseMatrix<int, Scalar> Belos::OutOfPlaceNormalizerMixin< Scalar, MV >::mat_type
template<class Scalar , class MV >
typedef Teuchos::RCP<mat_type> Belos::OutOfPlaceNormalizerMixin< Scalar, MV >::mat_ptr

Constructor & Destructor Documentation

template<class Scalar , class MV >
virtual Belos::OutOfPlaceNormalizerMixin< Scalar, MV >::~OutOfPlaceNormalizerMixin ( ) [inline, virtual]

Trivial virtual destructor, to silence compiler warnings.

Definition at line 126 of file BelosTsqrOrthoManager.hpp.


Member Function Documentation

template<class Scalar , class MV >
virtual int Belos::OutOfPlaceNormalizerMixin< Scalar, MV >::normalizeOutOfPlace ( MV &  X,
MV &  Q,
mat_ptr  B 
) const [pure virtual]

Normalize X into Q*B, possibly overwriting X.

Normalize X into Q*B. X may be overwritten with invalid values.

Parameters:
X[in/out] Vector(s) to normalize
Q[out] Normalized vector(s)
B[out] Normalization coefficients
Returns:
Rank of X

Implemented in Belos::TsqrOrthoManager< Scalar, MV >, and Belos::TsqrMatOrthoManager< Scalar, MV, OP >.

template<class Scalar , class MV >
virtual int Belos::OutOfPlaceNormalizerMixin< Scalar, MV >::projectAndNormalizeOutOfPlace ( MV &  X_in,
MV &  X_out,
Teuchos::Array< mat_ptr C,
mat_ptr  B,
Teuchos::ArrayView< Teuchos::RCP< const MV > >  Q 
) const [pure virtual]

Project and normalize X_in into X_out; overwrite X_in.

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.

Parameters:
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
Returns:
Rank of X_in after projection

Implemented in Belos::TsqrOrthoManager< Scalar, MV >, and Belos::TsqrMatOrthoManager< Scalar, MV, OP >.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines