|
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 |
| Multivector type with which this class was specialized. | |
| 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. | |
| Teuchos::RCP< const Teuchos::ParameterList > | getFastParameters () const |
| Get "fast" parameters for TsqrOrthoManager. | |
| TsqrOrthoManager (const Teuchos::RCP< Teuchos::ParameterList > ¶ms, const std::string &label="Belos") | |
| Constructor (that sets user-specified parameters). | |
| TsqrOrthoManager (const std::string &label) | |
| Constructor (that sets default parameters). | |
| virtual | ~TsqrOrthoManager () |
| Destructor, declared virtual for safe inheritance. | |
| void | setReorthogonalizationCallback (const Teuchos::RCP< ReorthogonalizationCallback< Scalar > > &callback) |
| Set callback to be invoked on reorthogonalization. | |
| void | innerProd (const MV &X, const MV &Y, mat_type &Z) const |
| 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. | |
| 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. | |
| magnitude_type | orthonormError (const MV &X) const |
| This method computes the error in orthonormality of a multivector. | |
| magnitude_type | orthogError (const MV &X1, const MV &X2) const |
| This method computes the error in orthogonality of two multivectors. | |
| 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. | |
| const std::string & | getLabel () const |
| This method returns the label being used by the timers in the orthogonalization manager. | |
Protected Member Functions | |
| virtual int | projectAndNormalizeImpl (MV &X, Teuchos::Array< mat_ptr > C, mat_ptr B, Teuchos::ArrayView< Teuchos::RCP< const MV > > Q) 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 |
Reimplemented from Belos::OutOfPlaceNormalizerMixin< Scalar, MV >.
Definition at line 143 of file BelosTsqrOrthoManager.hpp.
| typedef Teuchos::ScalarTraits<Scalar>::magnitudeType Belos::TsqrOrthoManager< Scalar, MV >::magnitude_type |
Reimplemented from Belos::OutOfPlaceNormalizerMixin< Scalar, MV >.
Definition at line 144 of file BelosTsqrOrthoManager.hpp.
| typedef MV Belos::TsqrOrthoManager< Scalar, MV >::multivector_type |
Multivector type with which this class was specialized.
Reimplemented from Belos::OutOfPlaceNormalizerMixin< Scalar, MV >.
Definition at line 146 of file BelosTsqrOrthoManager.hpp.
| typedef Teuchos::SerialDenseMatrix<int, Scalar> Belos::TsqrOrthoManager< Scalar, MV >::mat_type |
Reimplemented from Belos::OutOfPlaceNormalizerMixin< Scalar, MV >.
Definition at line 148 of file BelosTsqrOrthoManager.hpp.
| typedef Teuchos::RCP<mat_type> Belos::TsqrOrthoManager< Scalar, MV >::mat_ptr |
Reimplemented from Belos::OutOfPlaceNormalizerMixin< Scalar, MV >.
Definition at line 149 of file BelosTsqrOrthoManager.hpp.
| Belos::TsqrOrthoManager< Scalar, MV >::TsqrOrthoManager | ( | const Teuchos::RCP< Teuchos::ParameterList > & | params, |
| const std::string & | label = "Belos" |
||
| ) | [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.
| Belos::TsqrOrthoManager< Scalar, MV >::TsqrOrthoManager | ( | const std::string & | label | ) | [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.
| virtual Belos::TsqrOrthoManager< Scalar, MV >::~TsqrOrthoManager | ( | ) | [inline, virtual] |
Destructor, declared virtual for safe inheritance.
Definition at line 216 of file BelosTsqrOrthoManager.hpp.
| void Belos::TsqrOrthoManager< Scalar, MV >::setParameterList | ( | const Teuchos::RCP< Teuchos::ParameterList > & | params | ) | [inline, virtual] |
Implements Teuchos::ParameterListAcceptor.
Definition at line 151 of file BelosTsqrOrthoManager.hpp.
| Teuchos::RCP<Teuchos::ParameterList> Belos::TsqrOrthoManager< Scalar, MV >::getNonconstParameterList | ( | ) | [inline, virtual] |
Implements Teuchos::ParameterListAcceptor.
Definition at line 155 of file BelosTsqrOrthoManager.hpp.
| Teuchos::RCP<Teuchos::ParameterList> Belos::TsqrOrthoManager< Scalar, MV >::unsetParameterList | ( | ) | [inline, virtual] |
Implements Teuchos::ParameterListAcceptor.
Definition at line 159 of file BelosTsqrOrthoManager.hpp.
| Teuchos::RCP<const Teuchos::ParameterList> Belos::TsqrOrthoManager< Scalar, MV >::getValidParameters | ( | ) | const [inline, virtual] |
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.
| Teuchos::RCP<const Teuchos::ParameterList> Belos::TsqrOrthoManager< Scalar, MV >::getFastParameters | ( | ) | const [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.
| void Belos::TsqrOrthoManager< Scalar, MV >::setReorthogonalizationCallback | ( | const Teuchos::RCP< ReorthogonalizationCallback< Scalar > > & | callback | ) | [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.
| void Belos::TsqrOrthoManager< Scalar, MV >::innerProd | ( | const MV & | X, |
| const MV & | Y, | ||
| mat_type & | Z | ||
| ) | const [inline] |
Definition at line 245 of file BelosTsqrOrthoManager.hpp.
| void Belos::TsqrOrthoManager< Scalar, MV >::norm | ( | const MV & | X, |
| std::vector< magnitude_type > & | normVec | ||
| ) | const [inline] |
Definition at line 249 of file BelosTsqrOrthoManager.hpp.
| void Belos::TsqrOrthoManager< Scalar, MV >::project | ( | MV & | X, |
| Teuchos::Array< mat_ptr > | C, | ||
| Teuchos::ArrayView< Teuchos::RCP< const MV > > | Q | ||
| ) | const [inline] |
Definition at line 254 of file BelosTsqrOrthoManager.hpp.
| int Belos::TsqrOrthoManager< Scalar, MV >::normalize | ( | MV & | X, |
| mat_ptr | B | ||
| ) | const [inline] |
Definition at line 262 of file BelosTsqrOrthoManager.hpp.
| virtual int Belos::TsqrOrthoManager< Scalar, MV >::projectAndNormalizeImpl | ( | MV & | X, |
| Teuchos::Array< mat_ptr > | C, | ||
| mat_ptr | B, | ||
| Teuchos::ArrayView< Teuchos::RCP< const MV > > | Q | ||
| ) | const [inline, protected, virtual] |
Definition at line 269 of file BelosTsqrOrthoManager.hpp.
| int Belos::TsqrOrthoManager< Scalar, MV >::normalizeOutOfPlace | ( | MV & | X, |
| MV & | Q, | ||
| mat_ptr | B | ||
| ) | const [inline, virtual] |
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.
| int Belos::TsqrOrthoManager< 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 [inline, 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 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.
| magnitude_type Belos::TsqrOrthoManager< Scalar, MV >::orthonormError | ( | const MV & | X | ) | const [inline, virtual] |
This method computes the error in orthonormality of a multivector.
Implements Belos::OrthoManager< Scalar, MV >.
Definition at line 330 of file BelosTsqrOrthoManager.hpp.
| magnitude_type Belos::TsqrOrthoManager< Scalar, MV >::orthogError | ( | const MV & | X1, |
| const MV & | X2 | ||
| ) | const [inline, virtual] |
This method computes the error in orthogonality of two multivectors.
Implements Belos::OrthoManager< Scalar, MV >.
Definition at line 334 of file BelosTsqrOrthoManager.hpp.
| void Belos::TsqrOrthoManager< Scalar, MV >::setLabel | ( | const std::string & | label | ) | [inline, virtual] |
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.
| const std::string& Belos::TsqrOrthoManager< Scalar, MV >::getLabel | ( | ) | const [inline, virtual] |
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.
1.7.6.1