Belos
Version of the Day
|
MatOrthoManager subclass using TSQR or DGKS. 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. More... | |
typedef OP | operator_type |
Operator type with which this class was specialized. More... | |
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 | |
TsqrMatOrthoManager (const Teuchos::RCP< Teuchos::ParameterList > ¶ms, const std::string &label="Belos", Teuchos::RCP< const OP > Op=Teuchos::null) | |
Constructor (that sets user-specified parameters). More... | |
TsqrMatOrthoManager (const std::string &label="Belos", Teuchos::RCP< const OP > Op=Teuchos::null) | |
Constructor (that sets default parameters). More... | |
virtual | ~TsqrMatOrthoManager () |
Destructor (declared virtual for memory safety of derived classes). More... | |
Teuchos::RCP< const Teuchos::ParameterList > | getValidParameters () const |
Get default parameters for TsqrMatOrthoManager. More... | |
Teuchos::RCP< const Teuchos::ParameterList > | getFastParameters () |
Get "fast" parameters for TsqrMatOrthoManager. More... | |
void | setParameterList (const Teuchos::RCP< Teuchos::ParameterList > ¶ms) |
const std::string & | getLabel () const |
This method returns the label being used by the timers in the orthogonalization manager. More... | |
void | setOp (Teuchos::RCP< const OP > Op) |
Teuchos::RCP< const OP > | getOp () const |
void | project (MV &X, Teuchos::RCP< MV > MX, Teuchos::Array< mat_ptr > C, Teuchos::ArrayView< Teuchos::RCP< const MV > > Q) const |
void | project (MV &X, Teuchos::Array< mat_ptr > C, Teuchos::ArrayView< Teuchos::RCP< const MV > > Q) const |
int | normalize (MV &X, Teuchos::RCP< MV > MX, mat_ptr B) const |
int | normalize (MV &X, mat_ptr B) const |
int | normalizeOutOfPlace (MV &X, MV &Q, mat_ptr B) const |
Normalize X into Q*B. 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. More... | |
magnitude_type | orthonormError (const MV &X, Teuchos::RCP< const MV > MX) const |
This method computes the error in orthonormality of a multivector. The method has the option of exploiting a caller-provided MX . 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. This method. More... | |
magnitude_type | orthogError (const MV &X1, Teuchos::RCP< const MV > MX1, const MV &X2) const |
This method computes the error in orthogonality of two multivectors. The method has the option of exploiting a caller-provided MX . More... | |
void | setLabel (const std::string &label) |
This method sets the label used by the timers in the orthogonalization manager. More... | |
Public Member Functions inherited from Belos::MatOrthoManager< Scalar, MV, OP > | |
MatOrthoManager (Teuchos::RCP< const OP > Op=Teuchos::null) | |
Default constructor. More... | |
virtual | ~MatOrthoManager () |
Destructor. More... | |
void | setOp (Teuchos::RCP< const OP > Op) |
Set operator. More... | |
Teuchos::RCP< const OP > | getOp () const |
Get operator. More... | |
void | innerProd (const MV &X, const MV &Y, Teuchos::SerialDenseMatrix< int, Scalar > &Z) const |
Provides the inner product defining the orthogonality concepts, using the provided operator. More... | |
void | innerProd (const MV &X, const MV &Y, Teuchos::RCP< const MV > MY, Teuchos::SerialDenseMatrix< int, Scalar > &Z) const |
Provides the inner product defining the orthogonality concepts, using the provided operator. The method has the options of exploiting a caller-provided MX . More... | |
void | norm (const MV &X, std::vector< typename Teuchos::ScalarTraits< Scalar >::magnitudeType > &normvec) const |
Provides the norm induced by innerProd(). More... | |
void | norm (const MV &X, Teuchos::RCP< const MV > MX, std::vector< typename Teuchos::ScalarTraits< Scalar >::magnitudeType > &normvec) const |
Compute norm of each column of X. More... | |
virtual void | project (MV &X, Teuchos::RCP< MV > MX, Teuchos::Array< Teuchos::RCP< Teuchos::SerialDenseMatrix< int, Scalar > > > C, Teuchos::ArrayView< Teuchos::RCP< const MV > > Q) const =0 |
Given a list of (mutually and internally) orthonormal bases Q , this method takes a multivector X and projects it onto the space orthogonal to the individual Q[i] , optionally returning the coefficients of X for the individual Q[i] . All of this is done with respect to the inner product innerProd(). More... | |
virtual void | project (MV &X, Teuchos::Array< Teuchos::RCP< Teuchos::SerialDenseMatrix< int, Scalar > > > C, Teuchos::ArrayView< Teuchos::RCP< const MV > > Q) const |
This method calls project(X,Teuchos::null,C,Q); see documentation for that function. More... | |
virtual int | normalize (MV &X, Teuchos::RCP< MV > MX, 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... | |
virtual int | normalize (MV &X, Teuchos::RCP< Teuchos::SerialDenseMatrix< int, Scalar > > B) const |
This method calls normalize(X,Teuchos::null,B); see documentation for that function. More... | |
int | projectAndNormalize (MV &X, Teuchos::RCP< MV > MX, Teuchos::Array< Teuchos::RCP< Teuchos::SerialDenseMatrix< int, Scalar > > > C, Teuchos::RCP< Teuchos::SerialDenseMatrix< int, Scalar > > B, Teuchos::ArrayView< Teuchos::RCP< const MV > > Q) const |
Given a set of bases Q[i] and a multivector X , this method computes an orthonormal basis for . More... | |
Public Member Functions inherited from Belos::OrthoManager< ScalarType, MV > | |
OrthoManager () | |
Default constructor. More... | |
virtual | ~OrthoManager () |
Destructor. More... | |
virtual void | innerProd (const MV &X, const MV &Y, Teuchos::SerialDenseMatrix< int, ScalarType > &Z) const =0 |
Provides the inner product defining the orthogonality concepts. More... | |
virtual void | norm (const MV &X, std::vector< typename Teuchos::ScalarTraits< ScalarType >::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, ScalarType > > > 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, ScalarType > > 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, ScalarType > > > C, Teuchos::RCP< Teuchos::SerialDenseMatrix< int, ScalarType > > 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::ParameterListAcceptorDefaultBase | |
RCP< ParameterList > | getNonconstParameterList () |
RCP< ParameterList > | unsetParameterList () |
RCP< const ParameterList > | getParameterList () const |
Additional Inherited Members | |
Protected Attributes inherited from Belos::MatOrthoManager< Scalar, MV, OP > | |
Teuchos::RCP< const OP > | _Op |
bool | _hasOp |
MatOrthoManager subclass using TSQR or DGKS.
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 classical Gram-Schmidt with reorthogonalization (via DGKSOrthoManager).
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 378 of file BelosTsqrOrthoManager.hpp.
typedef Scalar Belos::TsqrMatOrthoManager< Scalar, MV, OP >::scalar_type |
Definition at line 384 of file BelosTsqrOrthoManager.hpp.
typedef Teuchos::ScalarTraits<Scalar>::magnitudeType Belos::TsqrMatOrthoManager< Scalar, MV, OP >::magnitude_type |
Definition at line 385 of file BelosTsqrOrthoManager.hpp.
typedef MV Belos::TsqrMatOrthoManager< Scalar, MV, OP >::multivector_type |
Multivector type with which this class was specialized.
Definition at line 387 of file BelosTsqrOrthoManager.hpp.
typedef OP Belos::TsqrMatOrthoManager< Scalar, MV, OP >::operator_type |
Operator type with which this class was specialized.
Definition at line 389 of file BelosTsqrOrthoManager.hpp.
typedef Teuchos::SerialDenseMatrix<int, Scalar> Belos::TsqrMatOrthoManager< Scalar, MV, OP >::mat_type |
Definition at line 391 of file BelosTsqrOrthoManager.hpp.
typedef Teuchos::RCP<mat_type> Belos::TsqrMatOrthoManager< Scalar, MV, OP >::mat_ptr |
Definition at line 392 of file BelosTsqrOrthoManager.hpp.
|
inline |
Constructor (that sets user-specified parameters).
label | [in] Label for timers. This only matters if the compile-time option for enabling timers is set. |
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. |
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 438 of file BelosTsqrOrthoManager.hpp.
|
inline |
Constructor (that sets default 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 454 of file BelosTsqrOrthoManager.hpp.
|
inlinevirtual |
Destructor (declared virtual for memory safety of derived classes).
Definition at line 462 of file BelosTsqrOrthoManager.hpp.
|
inlinevirtual |
Get default parameters for TsqrMatOrthoManager.
Get a (pointer to a) default list of parameters for configuring a TsqrMatOrthoManager instance.
Reimplemented from Teuchos::ParameterListAcceptor.
Definition at line 471 of file BelosTsqrOrthoManager.hpp.
|
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).
Definition at line 484 of file BelosTsqrOrthoManager.hpp.
|
inlinevirtual |
Implements Teuchos::ParameterListAcceptor.
Definition at line 488 of file BelosTsqrOrthoManager.hpp.
|
inlinevirtual |
This method returns the label being used by the timers in the orthogonalization manager.
Implements Belos::OrthoManager< ScalarType, MV >.
Definition at line 492 of file BelosTsqrOrthoManager.hpp.
|
inline |
Definition at line 495 of file BelosTsqrOrthoManager.hpp.
|
inline |
Definition at line 510 of file BelosTsqrOrthoManager.hpp.
|
inline |
Definition at line 517 of file BelosTsqrOrthoManager.hpp.
|
inline |
Definition at line 535 of file BelosTsqrOrthoManager.hpp.
|
inline |
Definition at line 543 of file BelosTsqrOrthoManager.hpp.
|
inline |
Definition at line 558 of file BelosTsqrOrthoManager.hpp.
|
inlineprotectedvirtual |
Definition at line 570 of file BelosTsqrOrthoManager.hpp.
|
inlinevirtual |
Normalize X into Q*B.
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. |
Implements Belos::OutOfPlaceNormalizerMixin< Scalar, MV >.
Definition at line 591 of file BelosTsqrOrthoManager.hpp.
|
inlinevirtual |
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.
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 |
Implements Belos::OutOfPlaceNormalizerMixin< Scalar, MV >.
Definition at line 605 of file BelosTsqrOrthoManager.hpp.
|
inlinevirtual |
This method computes the error in orthonormality of a multivector. The method has the option of exploiting a caller-provided MX
.
Implements Belos::MatOrthoManager< Scalar, MV, OP >.
Definition at line 625 of file BelosTsqrOrthoManager.hpp.
|
inlinevirtual |
This method computes the error in orthonormality of a multivector.
Reimplemented from Belos::MatOrthoManager< Scalar, MV, OP >.
Definition at line 635 of file BelosTsqrOrthoManager.hpp.
|
inlinevirtual |
This method computes the error in orthogonality of two multivectors. This method.
Reimplemented from Belos::MatOrthoManager< Scalar, MV, OP >.
Definition at line 639 of file BelosTsqrOrthoManager.hpp.
|
inlinevirtual |
This method computes the error in orthogonality of two multivectors. The method has the option of exploiting a caller-provided MX
.
Implements Belos::MatOrthoManager< Scalar, MV, OP >.
Definition at line 644 of file BelosTsqrOrthoManager.hpp.
|
inlinevirtual |
This method sets the label used by the timers in the orthogonalization manager.
Implements Belos::OrthoManager< ScalarType, MV >.
Definition at line 658 of file BelosTsqrOrthoManager.hpp.