Anasazi Version of the Day
Public Types | Public Member Functions
Anasazi::TsqrMatOrthoManager< Scalar, MV, OP > Class Template Reference

MatOrthoManager subclass using TSQR or SVQB. More...

#include <AnasaziTsqrOrthoManager.hpp>

Inheritance diagram for Anasazi::TsqrMatOrthoManager< Scalar, MV, OP >:
Anasazi::MatOrthoManager< Scalar, MV, OP > Anasazi::OutOfPlaceNormalizerMixin< Scalar, MV > Teuchos::ParameterListAcceptorDefaultBase Anasazi::OrthoManager< ScalarType, MV > Teuchos::ParameterListAcceptor

List of all members.

Public Types

typedef MV multivector_type
 Multivector type with which this class was specialized.
typedef OP operator_type
 Operator type with which this class was specialized.

Public Member Functions

 TsqrMatOrthoManager (const Teuchos::RCP< Teuchos::ParameterList > &params, const std::string &label="Belos", Teuchos::RCP< const OP > Op=Teuchos::null)
 Constructor (that sets user-specified parameters).
 TsqrMatOrthoManager (const std::string &label="Belos", Teuchos::RCP< const OP > Op=Teuchos::null)
 Constructor (that sets default parameters).
virtual ~TsqrMatOrthoManager ()
 Destructor (declared virtual for memory safety of derived classes).
Teuchos::RCP< const
Teuchos::ParameterList
getValidParameters () const
 Get default parameters for TsqrMatOrthoManager.
Teuchos::RCP< const
Teuchos::ParameterList
getFastParameters ()
 Get "fast" parameters for TsqrMatOrthoManager.
virtual 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 normalizeOutOfPlace (MV &X, MV &Q, mat_ptr B) const
 Normalize X into Q*B.
int projectAndNormalizeOutOfPlace (MV &X_in, MV &X_out, Teuchos::Array< mat_ptr > C, mat_ptr B, Teuchos::ArrayView< Teuchos::RCP< const MV > > Q) const
 Project and normalize X_in into X_out.
magnitude_type orthonormErrorMat (const MV &X, Teuchos::RCP< const MV > MX=Teuchos::null) const
 This method computes the error in orthonormality of a multivector.
magnitude_type orthogErrorMat (const MV &X, const MV &Y, Teuchos::RCP< const MV > MX=Teuchos::null, Teuchos::RCP< const MV > MY=Teuchos::null) const
 This method computes the error in orthogonality of two multivectors.

Detailed Description

template<class Scalar, class MV, class OP>
class Anasazi::TsqrMatOrthoManager< Scalar, MV, OP >

MatOrthoManager subclass using TSQR or SVQB.

When the inner product matrix has not been set, this class uses TSQR + Block Gram-Schmidt (via TsqrOrthoManagerImpl). If the inner product matrix has been set, then this class uses the SVQB algorithm (Stathopoulos and Wu 2002: CholeskyQR + SVD) for orthogonalization.

TSQR uses multivector scratch space. However, scratch space initialization is "lazy," so scratch space will not be allocated if TSQR is not used.

Definition at line 319 of file AnasaziTsqrOrthoManager.hpp.


Member Typedef Documentation

template<class Scalar , class MV , class OP >
typedef MV Anasazi::TsqrMatOrthoManager< Scalar, MV, OP >::multivector_type

Multivector type with which this class was specialized.

Reimplemented from Anasazi::OutOfPlaceNormalizerMixin< Scalar, MV >.

Definition at line 328 of file AnasaziTsqrOrthoManager.hpp.

template<class Scalar , class MV , class OP >
typedef OP Anasazi::TsqrMatOrthoManager< Scalar, MV, OP >::operator_type

Operator type with which this class was specialized.

Definition at line 330 of file AnasaziTsqrOrthoManager.hpp.


Constructor & Destructor Documentation

template<class Scalar , class MV , class OP >
Anasazi::TsqrMatOrthoManager< Scalar, MV, OP >::TsqrMatOrthoManager ( const Teuchos::RCP< Teuchos::ParameterList > &  params,
const std::string &  label = "Belos",
Teuchos::RCP< const OP >  Op = Teuchos::null 
) [inline]

Constructor (that sets user-specified parameters).

Parameters:
params[in/out] Configuration parameters, both for this orthogonalization manager, and for TSQR itself (as the "TSQR implementation" sublist). This can be null, in which case default parameters will be set for now; you can always call setParameterList() later to change these.
label[in] Label for timers. This only matters if the compile-time option for enabling timers is set.
Op[in] Inner product with respect to which to orthogonalize vectors. If Teuchos::null, use the Euclidean inner product.

Call getValidParameters() for default parameters and their documentation, including TSQR implementation parameters. Call getFastParameters() to get documented parameters for faster computation, possibly at the expense of accuracy and robustness.

Definition at line 379 of file AnasaziTsqrOrthoManager.hpp.

template<class Scalar , class MV , class OP >
Anasazi::TsqrMatOrthoManager< Scalar, MV, OP >::TsqrMatOrthoManager ( const std::string &  label = "Belos",
Teuchos::RCP< const OP >  Op = Teuchos::null 
) [inline]

Constructor (that sets default parameters).

Parameters:
Op[in] Inner product with respect to which to orthogonalize vectors. If Teuchos::null, use the Euclidean inner product.
label[in] Label for timers. This only matters if the compile-time option for enabling timers is set.

Definition at line 395 of file AnasaziTsqrOrthoManager.hpp.

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

Destructor (declared virtual for memory safety of derived classes).

Definition at line 403 of file AnasaziTsqrOrthoManager.hpp.


Member Function Documentation

template<class Scalar , class MV , class OP >
Teuchos::RCP<const Teuchos::ParameterList> Anasazi::TsqrMatOrthoManager< Scalar, MV, OP >::getValidParameters ( ) const [inline, virtual]

Get default parameters for TsqrMatOrthoManager.

Get a (pointer to a) default list of parameters for configuring a TsqrMatOrthoManager instance.

Note:
TSQR implementation configuration options are stored under "TSQR implementation" as a sublist.

Reimplemented from Teuchos::ParameterListAcceptor.

Definition at line 412 of file AnasaziTsqrOrthoManager.hpp.

template<class Scalar , class MV , class OP >
Teuchos::RCP<const Teuchos::ParameterList> Anasazi::TsqrMatOrthoManager< Scalar, MV, OP >::getFastParameters ( ) [inline]

Get "fast" parameters for TsqrMatOrthoManager.

Get a (pointer to a) list of parameters for configuring a TsqrMatOrthoManager instance for maximum speed, at the cost of accuracy (no block reorthogonalization) and robustness to rank deficiency (no randomization of the null space basis).

Note:
TSQR implementation configuration options are stored under "TSQR implementation" as a sublist.

Definition at line 425 of file AnasaziTsqrOrthoManager.hpp.

template<class Scalar , class MV , class OP >
virtual void Anasazi::TsqrMatOrthoManager< Scalar, MV, OP >::setOp ( Teuchos::RCP< const OP >  Op) [inline, virtual]

Set operator used for inner product.

Reimplemented from Anasazi::MatOrthoManager< Scalar, MV, OP >.

Definition at line 434 of file AnasaziTsqrOrthoManager.hpp.

template<class Scalar , class MV , class OP >
Teuchos::RCP<const OP> Anasazi::TsqrMatOrthoManager< Scalar, MV, OP >::getOp ( ) const [inline, virtual]

Get operator used for inner product.

Reimplemented from Anasazi::MatOrthoManager< Scalar, MV, OP >.

Definition at line 449 of file AnasaziTsqrOrthoManager.hpp.

template<class Scalar , class MV , class OP >
int Anasazi::TsqrMatOrthoManager< Scalar, MV, OP >::normalizeOutOfPlace ( MV &  X,
MV &  Q,
mat_ptr  B 
) const [inline, virtual]

Normalize X into Q*B.

Parameters:
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.
Returns:
Rank of the input multivector X.

Implements Anasazi::OutOfPlaceNormalizerMixin< Scalar, MV >.

Definition at line 540 of file AnasaziTsqrOrthoManager.hpp.

template<class Scalar , class MV , class OP >
int Anasazi::TsqrMatOrthoManager< Scalar, MV, OP >::projectAndNormalizeOutOfPlace ( MV &  X_in,
MV &  X_out,
Teuchos::Array< mat_ptr C,
mat_ptr  B,
Teuchos::ArrayView< Teuchos::RCP< const MV > >  Q 
) const [inline, 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.

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

Implements Anasazi::OutOfPlaceNormalizerMixin< Scalar, MV >.

Definition at line 554 of file AnasaziTsqrOrthoManager.hpp.

template<class Scalar , class MV , class OP >
magnitude_type Anasazi::TsqrMatOrthoManager< Scalar, MV, OP >::orthonormErrorMat ( const MV &  X,
Teuchos::RCP< const MV >  MX = Teuchos::null 
) const [inline, virtual]

This method computes the error in orthonormality of a multivector.

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

Implements Anasazi::MatOrthoManager< Scalar, MV, OP >.

Definition at line 578 of file AnasaziTsqrOrthoManager.hpp.

template<class Scalar , class MV , class OP >
magnitude_type Anasazi::TsqrMatOrthoManager< Scalar, MV, OP >::orthogErrorMat ( const MV &  X,
const MV &  Y,
Teuchos::RCP< const MV >  MX = Teuchos::null,
Teuchos::RCP< const MV >  MY = Teuchos::null 
) const [inline, virtual]

This method computes the error in orthogonality of two multivectors.

This method optionally allows optionally exploits a caller-provided MX and/or MY.

Implements Anasazi::MatOrthoManager< Scalar, MV, OP >.

Definition at line 590 of file AnasaziTsqrOrthoManager.hpp.


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