Belos
Version of the Day
|
TSQR-based OrthoManager subclass. More...
#include <BelosTsqrOrthoManager.hpp>
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_type > | mat_ptr |
Public Types inherited from Belos::OutOfPlaceNormalizerMixin< Scalar, MV > | |
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 | |
void | setParameterList (const Teuchos::RCP< Teuchos::ParameterList > ¶ms) |
Teuchos::RCP < Teuchos::ParameterList > | getNonconstParameterList () |
Teuchos::RCP < Teuchos::ParameterList > | unsetParameterList () |
Teuchos::RCP< const Teuchos::ParameterList > | getValidParameters () const |
Default valid parameter list. More... | |
Teuchos::RCP< const Teuchos::ParameterList > | getFastParameters () const |
Get "fast" parameters for TsqrOrthoManager. More... | |
TsqrOrthoManager (const Teuchos::RCP< Teuchos::ParameterList > ¶ms, const std::string &label="Belos") | |
Constructor (that sets user-specified parameters). More... | |
TsqrOrthoManager (const std::string &label) | |
Constructor (that sets default parameters). More... | |
virtual | ~TsqrOrthoManager () |
Destructor, declared virtual for safe inheritance. More... | |
void | setReorthogonalizationCallback (const Teuchos::RCP< ReorthogonalizationCallback< Scalar > > &callback) |
Set callback to be invoked on reorthogonalization. More... | |
void | innerProd (const MV &X, const MV &Y, mat_type &Z) const |
Provides the inner product defining the orthogonality concepts. More... | |
void | norm (const MV &X, std::vector< magnitude_type > &normVec) const |
void | project (MV &X, Teuchos::Array< mat_ptr > C, Teuchos::ArrayView< Teuchos::RCP< const MV > > Q) const |
int | normalize (MV &X, mat_ptr B) const |
int | normalizeOutOfPlace (MV &X, MV &Q, mat_ptr B) const |
Normalize X into Q*B, overwriting X with invalid values. More... | |
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; overwrite X_in. More... | |
magnitude_type | orthonormError (const MV &X) const |
This method computes the error in orthonormality of a multivector. More... | |
magnitude_type | orthogError (const MV &X1, const MV &X2) const |
This method computes the error in orthogonality of two multivectors. More... | |
void | setLabel (const std::string &label) |
Set the label for (the timers for) this orthogonalization manager, and create new timers if the label has changed. More... | |
const std::string & | getLabel () const |
This method returns the label being used by the timers in the orthogonalization manager. More... | |
Public Member Functions inherited from Belos::OrthoManager< Scalar, MV > | |
OrthoManager () | |
Default constructor. More... | |
virtual | ~OrthoManager () |
Destructor. More... | |
virtual void | norm (const MV &X, std::vector< typename Teuchos::ScalarTraits< Scalar >::magnitudeType > &normvec) const =0 |
Compute the norm(s) of the column(s) of X. More... | |
virtual void | project (MV &X, Teuchos::Array< Teuchos::RCP< Teuchos::SerialDenseMatrix< int, Scalar > > > C, Teuchos::ArrayView< Teuchos::RCP< const MV > > Q) const =0 |
Project X against the (orthogonal) entries of Q. More... | |
virtual int | normalize (MV &X, Teuchos::RCP< Teuchos::SerialDenseMatrix< int, Scalar > > B) const =0 |
This method takes a multivector X and attempts to compute an orthonormal basis for , with respect to innerProd(). More... | |
int | projectAndNormalize (MV &X, Teuchos::Array< Teuchos::RCP< Teuchos::SerialDenseMatrix< int, Scalar > > > C, Teuchos::RCP< Teuchos::SerialDenseMatrix< int, Scalar > > B, Teuchos::ArrayView< Teuchos::RCP< const MV > > Q) const |
Project X against the Q[i] and normalize X. More... | |
Public Member Functions inherited from Teuchos::ParameterListAcceptorDefaultBase | |
RCP< const ParameterList > | getParameterList () const |
Public Member Functions inherited from Belos::OutOfPlaceNormalizerMixin< Scalar, MV > | |
virtual | ~OutOfPlaceNormalizerMixin () |
Trivial virtual destructor, to silence compiler warnings. More... | |
Protected Member Functions | |
virtual int | projectAndNormalizeImpl (MV &X, Teuchos::Array< mat_ptr > C, mat_ptr B, Teuchos::ArrayView< Teuchos::RCP< const MV > > Q) const |
Protected Member Functions inherited from Belos::OrthoManager< Scalar, MV > | |
virtual int | projectAndNormalizeImpl (MV &X, Teuchos::Array< Teuchos::RCP< Teuchos::SerialDenseMatrix< int, Scalar > > > C, Teuchos::RCP< Teuchos::SerialDenseMatrix< int, Scalar > > B, Teuchos::ArrayView< Teuchos::RCP< const MV > > Q) const =0 |
Protected Member Functions inherited from Teuchos::ParameterListAcceptorDefaultBase | |
void | setMyParamList (const RCP< ParameterList > ¶mList) |
RCP< ParameterList > | getMyNonconstParamList () |
RCP< const ParameterList > | getMyParamList () const |
TSQR-based OrthoManager subclass.
Subclass of OrthoManager, implemented using TsqrOrthoManagerImpl (TSQR + Block Gram-Schmidt).
Definition at line 137 of file BelosTsqrOrthoManager.hpp.
typedef Scalar Belos::TsqrOrthoManager< Scalar, MV >::scalar_type |
Definition at line 142 of file BelosTsqrOrthoManager.hpp.
typedef Teuchos::ScalarTraits<Scalar>::magnitudeType Belos::TsqrOrthoManager< Scalar, MV >::magnitude_type |
Definition at line 143 of file BelosTsqrOrthoManager.hpp.
typedef MV Belos::TsqrOrthoManager< Scalar, MV >::multivector_type |
Definition at line 145 of file BelosTsqrOrthoManager.hpp.
typedef Teuchos::SerialDenseMatrix<int, Scalar> Belos::TsqrOrthoManager< Scalar, MV >::mat_type |
Definition at line 147 of file BelosTsqrOrthoManager.hpp.
typedef Teuchos::RCP<mat_type> Belos::TsqrOrthoManager< Scalar, MV >::mat_ptr |
Definition at line 148 of file BelosTsqrOrthoManager.hpp.
|
inline |
Constructor (that sets user-specified parameters).
params | [in/out] Configuration parameters, both for this orthogonalization manager, and for TSQR itself (as the "TsqrImpl" 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. |
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 201 of file BelosTsqrOrthoManager.hpp.
|
inline |
Constructor (that sets default parameters).
label | [in] Label for timers. This only matters if the compile-time option for enabling timers is set. |
Definition at line 210 of file BelosTsqrOrthoManager.hpp.
|
inlinevirtual |
Destructor, declared virtual for safe inheritance.
Definition at line 215 of file BelosTsqrOrthoManager.hpp.
|
inlinevirtual |
Implements Teuchos::ParameterListAcceptor.
Definition at line 150 of file BelosTsqrOrthoManager.hpp.
|
inlinevirtual |
Reimplemented from Teuchos::ParameterListAcceptorDefaultBase.
Definition at line 154 of file BelosTsqrOrthoManager.hpp.
|
inlinevirtual |
Reimplemented from Teuchos::ParameterListAcceptorDefaultBase.
Definition at line 158 of file BelosTsqrOrthoManager.hpp.
|
inlinevirtual |
Default valid parameter list.
Get a (pointer to a) default list of parameters for configuring a TsqrOrthoManager instance.
Reimplemented from Teuchos::ParameterListAcceptor.
Definition at line 169 of file BelosTsqrOrthoManager.hpp.
|
inline |
Get "fast" parameters for TsqrOrthoManager.
Get a (pointer to a) list of parameters for configuring a TsqrOrthoManager instance for maximum speed, at the cost of accuracy (no block reorthogonalization) and robustness to rank deficiency (no randomization of the null space basis).
Definition at line 182 of file BelosTsqrOrthoManager.hpp.
|
inline |
Set callback to be invoked on reorthogonalization.
This callback is invoked right after the first projection step, and only if reorthogonalization will be necessary. It is called before actually reorthogonalizing. The first argument gives the norms of the columns of the input multivector before the first projection pass, and the second argument gives their norms after the first projection pass.
The callback is null by default. If the callback is null, no callback will be invoked.
For details and suggested uses, please refer to the documentation of ReorthogonalizationCallback.
Definition at line 239 of file BelosTsqrOrthoManager.hpp.
|
inlinevirtual |
Provides the inner product defining the orthogonality concepts.
All concepts of orthogonality discussed in this class are with respect to this inner product.
M
, then this might be the M
inner product ( ). Implements Belos::OrthoManager< Scalar, MV >.
Definition at line 244 of file BelosTsqrOrthoManager.hpp.
|
inline |
Definition at line 248 of file BelosTsqrOrthoManager.hpp.
|
inline |
Definition at line 253 of file BelosTsqrOrthoManager.hpp.
|
inline |
Definition at line 261 of file BelosTsqrOrthoManager.hpp.
|
inlineprotectedvirtual |
Definition at line 268 of file BelosTsqrOrthoManager.hpp.
|
inlinevirtual |
Normalize X into Q*B, overwriting X with invalid values.
We expose this interface to applications because TSQR is not able to compute an orthogonal basis in place; it needs scratch space. Applications can exploit this interface to avoid excessive copying of vectors when using TSQR for orthogonalization.
X | [in/out] Input vector(s) to normalize |
Q | [out] Normalized output vector(s) |
B | [out] Normalization coefficients |
Implements Belos::OutOfPlaceNormalizerMixin< Scalar, MV >.
Definition at line 294 of file BelosTsqrOrthoManager.hpp.
|
inlinevirtual |
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 and X_in is overwritten with invalid values.
X_in | [in/out] On input: The vectors to project against Q and normalize. Overwritten with invalid values on output. |
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 |
Implements Belos::OutOfPlaceNormalizerMixin< Scalar, MV >.
Definition at line 320 of file BelosTsqrOrthoManager.hpp.
|
inlinevirtual |
This method computes the error in orthonormality of a multivector.
Implements Belos::OrthoManager< Scalar, MV >.
Definition at line 329 of file BelosTsqrOrthoManager.hpp.
|
inlinevirtual |
This method computes the error in orthogonality of two multivectors.
Implements Belos::OrthoManager< Scalar, MV >.
Definition at line 333 of file BelosTsqrOrthoManager.hpp.
|
inlinevirtual |
Set the label for (the timers for) this orthogonalization manager, and create new timers if the label has changed.
label | [in] New label for timers |
Implements Belos::OrthoManager< Scalar, MV >.
Definition at line 344 of file BelosTsqrOrthoManager.hpp.
|
inlinevirtual |
This method returns the label being used by the timers in the orthogonalization manager.
Implements Belos::OrthoManager< Scalar, MV >.
Definition at line 348 of file BelosTsqrOrthoManager.hpp.