Belos Package Browser (Single Doxygen Collection)
Development
|
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 Belos::OutOfPlaceNormalizerMixin< Scalar, MV > | |
virtual | ~OutOfPlaceNormalizerMixin () |
Trivial virtual destructor, to silence compiler warnings. More... | |
Public Member Functions inherited from Teuchos::ParameterListAcceptor | |
virtual RCP< const ParameterList > | getParameterList () const |
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 |
Private Attributes | |
TsqrOrthoManagerImpl< Scalar, MV > | impl_ |
The implementation of TSQR. More... | |
std::string | label_ |
Label for timers (if timers are enabled at compile time). More... | |
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 143 of file BelosTsqrOrthoManager.hpp.
typedef Teuchos::ScalarTraits<Scalar>::magnitudeType Belos::TsqrOrthoManager< Scalar, MV >::magnitude_type |
Definition at line 144 of file BelosTsqrOrthoManager.hpp.
typedef MV Belos::TsqrOrthoManager< Scalar, MV >::multivector_type |
Definition at line 146 of file BelosTsqrOrthoManager.hpp.
typedef Teuchos::SerialDenseMatrix<int, Scalar> Belos::TsqrOrthoManager< Scalar, MV >::mat_type |
Definition at line 148 of file BelosTsqrOrthoManager.hpp.
typedef Teuchos::RCP<mat_type> Belos::TsqrOrthoManager< Scalar, MV >::mat_ptr |
Definition at line 149 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 202 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 211 of file BelosTsqrOrthoManager.hpp.
|
inlinevirtual |
Destructor, declared virtual for safe inheritance.
Definition at line 216 of file BelosTsqrOrthoManager.hpp.
|
inlinevirtual |
Implements Teuchos::ParameterListAcceptor.
Definition at line 151 of file BelosTsqrOrthoManager.hpp.
|
inlinevirtual |
Implements Teuchos::ParameterListAcceptor.
Definition at line 155 of file BelosTsqrOrthoManager.hpp.
|
inlinevirtual |
Implements Teuchos::ParameterListAcceptor.
Definition at line 159 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 170 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 183 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 240 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 245 of file BelosTsqrOrthoManager.hpp.
|
inline |
Definition at line 249 of file BelosTsqrOrthoManager.hpp.
|
inline |
Definition at line 254 of file BelosTsqrOrthoManager.hpp.
|
inline |
Definition at line 262 of file BelosTsqrOrthoManager.hpp.
|
inlineprotectedvirtual |
Definition at line 269 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 295 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 321 of file BelosTsqrOrthoManager.hpp.
|
inlinevirtual |
This method computes the error in orthonormality of a multivector.
Implements Belos::OrthoManager< Scalar, MV >.
Definition at line 330 of file BelosTsqrOrthoManager.hpp.
|
inlinevirtual |
This method computes the error in orthogonality of two multivectors.
Implements Belos::OrthoManager< Scalar, MV >.
Definition at line 334 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 345 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 349 of file BelosTsqrOrthoManager.hpp.
|
mutableprivate |
The implementation of TSQR.
The object is delcared "mutable" because it has internal scratch space state, and because the OrthoManager interface requires most of its methods to be declared const.
Definition at line 357 of file BelosTsqrOrthoManager.hpp.
|
private |
Label for timers (if timers are enabled at compile time).
Definition at line 360 of file BelosTsqrOrthoManager.hpp.