Belos Package Browser (Single Doxygen Collection)
Development
|
Belos's templated virtual class for providing routines for orthogonalization and orthonormzalition of multivectors. More...
#include <BelosOrthoManager.hpp>
Constructor/Destructor | |
OrthoManager () | |
Default constructor. More... | |
virtual | ~OrthoManager () |
Destructor. More... | |
Orthogonalization methods | |
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... | |
virtual int | projectAndNormalizeImpl (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 =0 |
Error methods | |
virtual Teuchos::ScalarTraits < ScalarType >::magnitudeType | orthonormError (const MV &X) const =0 |
This method computes the error in orthonormality of a multivector. More... | |
virtual Teuchos::ScalarTraits < ScalarType >::magnitudeType | orthogError (const MV &X1, const MV &X2) const =0 |
This method computes the error in orthogonality of two multivectors. More... | |
Label methods | |
virtual void | setLabel (const std::string &label)=0 |
This method sets the label used by the timers in the orthogonalization manager. More... | |
virtual const std::string & | getLabel () const =0 |
This method returns the label being used by the timers in the orthogonalization manager. More... | |
Additional Inherited Members | |
Public Member Functions inherited from Teuchos::ParameterListAcceptorDefaultBase | |
RCP< ParameterList > | getNonconstParameterList () |
RCP< ParameterList > | unsetParameterList () |
RCP< const ParameterList > | getParameterList () const |
Public Member Functions inherited from Teuchos::ParameterListAcceptor | |
virtual void | setParameterList (const RCP< ParameterList > ¶mList)=0 |
virtual RCP< const ParameterList > | getValidParameters () const |
Protected Member Functions inherited from Teuchos::ParameterListAcceptorDefaultBase | |
void | setMyParamList (const RCP< ParameterList > ¶mList) |
RCP< ParameterList > | getMyNonconstParamList () |
RCP< const ParameterList > | getMyParamList () const |
Belos's templated virtual class for providing routines for orthogonalization and orthonormzalition of multivectors.
This class defines concepts of orthogonality through the definition of an inner product. It also provides computational routines for orthogonalization.
A concrete implementation of this class is necessary. The user can create their own implementation if those supplied are not suitable for their needs.
Note: The OrthoManager class now inherits from Teuchos::ParameterListAcceptorDefaultBase. New derived classes must implement setParameterList()
and getValidParameters()
.
Definition at line 89 of file BelosOrthoManager.hpp.
|
inline |
Default constructor.
Definition at line 96 of file BelosOrthoManager.hpp.
|
inlinevirtual |
Destructor.
Definition at line 99 of file BelosOrthoManager.hpp.
|
pure virtual |
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 ( ). Implemented in Belos::SimpleOrthoManager< Scalar, MV >, Belos::TsqrOrthoManager< Scalar, MV >, and Belos::MatOrthoManager< ScalarType, MV, OP >.
|
pure virtual |
Compute the norm(s) of the column(s) of X.
The norm computed is the norm induced by the inner product defined by innerProd()
.
X | [in] The multivector whose columns this method will compute norms. |
normvec | [out] On output, normvec[j] is the norm of column j of X. This method reserves the right to resize normvec if it does not have enough entries, but it may not necessarily resize normvec if it has too many entries. |
Implemented in Belos::MatOrthoManager< ScalarType, MV, OP >.
|
pure virtual |
Project X against the (orthogonal) entries of Q.
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().
After calling this routine, X
will be orthogonal to each of the Q[i]
.
X | [in/out] The multivector to be modified. On output, X will be orthogonal to Q[i] with respect to innerProd(). |
C | [out] The coefficients of X in the *Q [i], with respect to innerProd(). If C[i] is a non-null pointer and *C [i] matches the dimensions of X and *Q [i], then the coefficients computed during the orthogonalization routine will be stored in the matrix *C [i]. If C[i] is a nnon-null pointer whose size does not match the dimensions of X and *Q [i], then a std::invalid_argument std::exception will be thrown. Otherwise, if C.size() < i or C[i] is a null pointer, then the orthogonalization manager will declare storage for the coefficients and the user will not have access to them. |
Q | [in] A list of multivector bases specifying the subspaces to be orthogonalized against. Each Q[i] is assumed to have orthonormal columns, and the Q[i] are assumed to be mutually orthogonal. |
Implemented in Belos::ICGSOrthoManager< ScalarType, MV, OP >, Belos::IMGSOrthoManager< ScalarType, MV, OP >, Belos::DGKSOrthoManager< ScalarType, MV, OP >, and Belos::MatOrthoManager< ScalarType, MV, OP >.
|
pure virtual |
This method takes a multivector X
and attempts to compute an orthonormal basis for , with respect to innerProd().
This routine returns an integer rank
stating the rank of the computed basis. If X
does not have full rank and the normalize() routine does not attempt to augment the subspace, then rank
may be smaller than the number of columns in X
. In this case, only the first rank
columns of output X
and first rank
rows of B
will be valid.
X | [in/out] The multivector to the modified. On output, X will have some number of orthonormal columns (with respect to innerProd()). |
B | [out] The coefficients of the original X with respect to the computed basis. This matrix is not necessarily triangular; see the documentation for specific orthogonalization managers. |
Implemented in Belos::ICGSOrthoManager< ScalarType, MV, OP >, Belos::IMGSOrthoManager< ScalarType, MV, OP >, Belos::DGKSOrthoManager< ScalarType, MV, OP >, and Belos::MatOrthoManager< ScalarType, MV, OP >.
|
protectedpure virtual |
Implemented in Belos::MatOrthoManager< ScalarType, MV, OP >.
|
inline |
Project X against the Q[i] and normalize X.
Given a set of bases Q[i]
and a multivector X
, this method computes an orthonormal basis for .
This routine returns an integer rank
stating the rank of the computed basis. If the subspace does not have dimension as large as the number of columns of X
and the orthogonalization manager doe not attempt to augment the subspace, then rank
may be smaller than the number of columns of X
. In this case, only the first rank
columns of output X
and first rank
rows of B
will be valid.
Q[i]
as well as the orthonormality constraints. Therefore, this method is not necessarily equivalent to calling project() followed by a call to normalize(). See the documentation for specific orthogonalization managers.X | [in/out] The multivector to the modified. On output, the relevant rows of X will be orthogonal to the Q[i] and will have orthonormal columns (with respect to innerProd()). |
C | [out] The coefficients of the original X in the *Q [i], with respect to innerProd(). If C[i] is a non-null pointer and *C [i] matches the dimensions of X and *Q [i], then the coefficients computed during the orthogonalization routine will be stored in the matrix *C [i]. If C[i] is a non-null pointer whose size does not match the dimensions of X and *Q [i], then a std::invalid_argument std::exception will be thrown. Otherwise, if C.size() < i or C[i] is a null pointer, then the orthogonalization manager will declare storage for the coefficients and the user will not have access to them. |
B | [out] The coefficients of the original X with respect to the computed basis. This matrix is not necessarily upper triangular (as it would be for textbook Gram-Schmidt orthogonalization of a full-rank matrix, for example). See the documentation for specific orthogonalization managers. |
Q | [in] A list of multivector bases specifying the subspaces to be orthogonalized against. Each Q[i] is assumed to have orthonormal columns, and the Q[i] are assumed to be mutually orthogonal. |
Definition at line 249 of file BelosOrthoManager.hpp.
|
pure virtual |
This method computes the error in orthonormality of a multivector.
Implemented in Belos::TsqrMatOrthoManager< Scalar, MV, OP >, Belos::ICGSOrthoManager< ScalarType, MV, OP >, Belos::DGKSOrthoManager< ScalarType, MV, OP >, Belos::IMGSOrthoManager< ScalarType, MV, OP >, Belos::MatOrthoManager< ScalarType, MV, OP >, Belos::MatOrthoManager< Scalar, MV, OP >, Belos::TsqrOrthoManager< Scalar, MV >, and Belos::SimpleOrthoManager< Scalar, MV >.
|
pure virtual |
This method computes the error in orthogonality of two multivectors.
Implemented in Belos::TsqrMatOrthoManager< Scalar, MV, OP >, Belos::ICGSOrthoManager< ScalarType, MV, OP >, Belos::DGKSOrthoManager< ScalarType, MV, OP >, Belos::IMGSOrthoManager< ScalarType, MV, OP >, Belos::MatOrthoManager< ScalarType, MV, OP >, Belos::MatOrthoManager< Scalar, MV, OP >, Belos::SimpleOrthoManager< Scalar, MV >, and Belos::TsqrOrthoManager< Scalar, MV >.
|
pure virtual |
This method sets the label used by the timers in the orthogonalization manager.
Implemented in Belos::TsqrMatOrthoManager< Scalar, MV, OP >, Belos::ICGSOrthoManager< ScalarType, MV, OP >, Belos::DGKSOrthoManager< ScalarType, MV, OP >, Belos::IMGSOrthoManager< ScalarType, MV, OP >, Belos::SimpleOrthoManager< Scalar, MV >, and Belos::TsqrOrthoManager< Scalar, MV >.
|
pure virtual |
This method returns the label being used by the timers in the orthogonalization manager.
Implemented in Belos::TsqrMatOrthoManager< Scalar, MV, OP >, Belos::ICGSOrthoManager< ScalarType, MV, OP >, Belos::DGKSOrthoManager< ScalarType, MV, OP >, Belos::IMGSOrthoManager< ScalarType, MV, OP >, Belos::TsqrOrthoManager< Scalar, MV >, and Belos::SimpleOrthoManager< Scalar, MV >.