Anasazi::MatOrthoManager< ScalarType, MV, OP > Class Template Reference

Anasazi's templated virtual class for providing routines for orthogonalization and orthonormzalition of multivectors using matrix-based inner products. More...

#include <AnasaziMatOrthoManager.hpp>

Inheritance diagram for Anasazi::MatOrthoManager< ScalarType, MV, OP >:

Anasazi::OrthoManager< ScalarType, MV > Anasazi::BasicOrthoManager< ScalarType, MV, OP > Anasazi::SVQBOrthoManager< ScalarType, MV, OP > List of all members.

Public Member Functions

Constructor/Destructor
 MatOrthoManager (Teuchos::RefCountPtr< const OP > Op=Teuchos::null)
 Default constructor.
virtual ~MatOrthoManager ()
 Destructor.
Accessor routines
void setOp (Teuchos::RefCountPtr< const OP > Op)
 Set operator.
Teuchos::RefCountPtr< const
OP > 
getOp () const
 Get operator.
Orthogonalization methods
void innerProd (const MV &X, const MV &Y, Teuchos::SerialDenseMatrix< int, ScalarType > &Z) const
 Provides the inner product defining the orthogonality concepts, using the provided operator.
void innerProd (const MV &X, const MV &Y, Teuchos::RefCountPtr< const MV > MY, Teuchos::SerialDenseMatrix< int, ScalarType > &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.
void norm (const MV &X, std::vector< typename Teuchos::ScalarTraits< ScalarType >::magnitudeType > *normvec) const
 Provides the norm induced by innerProd().
void norm (const MV &X, Teuchos::RefCountPtr< const MV > MX, std::vector< typename Teuchos::ScalarTraits< ScalarType >::magnitudeType > *normvec) const
 Provides the norm induced by innerProd(). The method has the options of exploiting a caller-provided MX.
virtual void project (MV &X, Teuchos::RefCountPtr< MV > MX, Teuchos::Array< Teuchos::RefCountPtr< Teuchos::SerialDenseMatrix< int, ScalarType > > > C, Teuchos::Array< Teuchos::RefCountPtr< 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().
virtual void project (MV &X, Teuchos::Array< Teuchos::RefCountPtr< Teuchos::SerialDenseMatrix< int, ScalarType > > > C, Teuchos::Array< Teuchos::RefCountPtr< const MV > > Q) const
 This method calls project(X,Teuchos::null,C,Q); see documentation for that function.
virtual int normalize (MV &X, Teuchos::RefCountPtr< MV > MX, Teuchos::RefCountPtr< Teuchos::SerialDenseMatrix< int, ScalarType > > B) const =0
 This method takes a multivector X and attempts to compute an orthonormal basis for $colspan(X)$, with respect to innerProd().
virtual int normalize (MV &X, Teuchos::RefCountPtr< Teuchos::SerialDenseMatrix< int, ScalarType > > B) const
 This method calls normalize(X,Teuchos::null,B); see documentation for that function.
virtual int projectAndNormalize (MV &X, Teuchos::RefCountPtr< MV > MX, Teuchos::Array< Teuchos::RefCountPtr< Teuchos::SerialDenseMatrix< int, ScalarType > > > C, Teuchos::RefCountPtr< Teuchos::SerialDenseMatrix< int, ScalarType > > B, Teuchos::Array< Teuchos::RefCountPtr< const MV > > Q) const =0
 Given a set of bases Q[i] and a multivector X, this method computes an orthonormal basis for $colspan(X) - \sum_i colspan(Q[i])$.
virtual int projectAndNormalize (MV &X, Teuchos::Array< Teuchos::RefCountPtr< Teuchos::SerialDenseMatrix< int, ScalarType > > > C, Teuchos::RefCountPtr< Teuchos::SerialDenseMatrix< int, ScalarType > > B, Teuchos::Array< Teuchos::RefCountPtr< const MV > > Q) const
 This method calls projectAndNormalize(X,Teuchos::null,C,B,Q); see documentation for that function.
Error methods
virtual Teuchos::ScalarTraits<
ScalarType >::magnitudeType 
orthonormError (const MV &X) const
 This method computes the error in orthonormality of a multivector.
virtual Teuchos::ScalarTraits<
ScalarType >::magnitudeType 
orthonormError (const MV &X, Teuchos::RefCountPtr< const MV > MX) const =0
 This method computes the error in orthonormality of a multivector. The method has the option of exploiting a caller-provided MX.
virtual Teuchos::ScalarTraits<
ScalarType >::magnitudeType 
orthogError (const MV &X1, const MV &X2) const
 This method computes the error in orthogonality of two multivectors. This method.
virtual Teuchos::ScalarTraits<
ScalarType >::magnitudeType 
orthogError (const MV &X1, Teuchos::RefCountPtr< const MV > MX1, const MV &X2) const =0
 This method computes the error in orthogonality of two multivectors. The method has the option of exploiting a caller-provided MX.

Detailed Description

template<class ScalarType, class MV, class OP>
class Anasazi::MatOrthoManager< ScalarType, MV, OP >

Anasazi's templated virtual class for providing routines for orthogonalization and orthonormzalition of multivectors using matrix-based inner products.

This class extends Anasazi::OrthoManager by providing extra calling arguments to orthogonalization routines, to reduce the cost of applying the inner product in cases where the user already has the image of the source multivector under the inner product matrix.

A concrete implementation of this class is necessary. The user can create their own implementation if those supplied are not suitable for their needs.

Author:
Chris Baker, Ulrich Hetmaniuk, Rich Lehoucq, and Heidi Thornquist

Definition at line 61 of file AnasaziMatOrthoManager.hpp.


Constructor & Destructor Documentation

template<class ScalarType, class MV, class OP>
Anasazi::MatOrthoManager< ScalarType, MV, OP >::MatOrthoManager Teuchos::RefCountPtr< const OP >  Op = Teuchos::null  )  [inline]
 

Default constructor.

Definition at line 70 of file AnasaziMatOrthoManager.hpp.

template<class ScalarType, class MV, class OP>
virtual Anasazi::MatOrthoManager< ScalarType, MV, OP >::~MatOrthoManager  )  [inline, virtual]
 

Destructor.

Definition at line 73 of file AnasaziMatOrthoManager.hpp.


Member Function Documentation

template<class ScalarType, class MV, class OP>
void Anasazi::MatOrthoManager< ScalarType, MV, OP >::setOp Teuchos::RefCountPtr< const OP >  Op  )  [inline]
 

Set operator.

Definition at line 80 of file AnasaziMatOrthoManager.hpp.

template<class ScalarType, class MV, class OP>
Teuchos::RefCountPtr<const OP> Anasazi::MatOrthoManager< ScalarType, MV, OP >::getOp  )  const [inline]
 

Get operator.

Definition at line 86 of file AnasaziMatOrthoManager.hpp.

template<class ScalarType, class MV, class OP>
void Anasazi::MatOrthoManager< ScalarType, MV, OP >::innerProd const MV &  X,
const MV &  Y,
Teuchos::SerialDenseMatrix< int, ScalarType > &  Z
const [inline, virtual]
 

Provides the inner product defining the orthogonality concepts, using the provided operator.

All concepts of orthogonality discussed in this class are with respect to this inner product.

Implements Anasazi::OrthoManager< ScalarType, MV >.

Definition at line 98 of file AnasaziMatOrthoManager.hpp.

template<class ScalarType, class MV, class OP>
void Anasazi::MatOrthoManager< ScalarType, MV, OP >::innerProd const MV &  X,
const MV &  Y,
Teuchos::RefCountPtr< const MV >  MY,
Teuchos::SerialDenseMatrix< int, ScalarType > &  Z
const [inline]
 

Provides the inner product defining the orthogonality concepts, using the provided operator. The method has the options of exploiting a caller-provided MX.

If pointer MY is null, then this routine calls innerProd(X,Y,Z). Otherwise, it forgoes the operator application and uses *MY in the computation of the inner product.

Definition at line 136 of file AnasaziMatOrthoManager.hpp.

template<class ScalarType, class MV, class OP>
void Anasazi::MatOrthoManager< ScalarType, MV, OP >::norm const MV &  X,
std::vector< typename Teuchos::ScalarTraits< ScalarType >::magnitudeType > *  normvec
const [inline, virtual]
 

Provides the norm induced by innerProd().

Implements Anasazi::OrthoManager< ScalarType, MV >.

Definition at line 159 of file AnasaziMatOrthoManager.hpp.

template<class ScalarType, class MV, class OP>
void Anasazi::MatOrthoManager< ScalarType, MV, OP >::norm const MV &  X,
Teuchos::RefCountPtr< const MV >  MX,
std::vector< typename Teuchos::ScalarTraits< ScalarType >::magnitudeType > *  normvec
const [inline]
 

Provides the norm induced by innerProd(). The method has the options of exploiting a caller-provided MX.

Definition at line 166 of file AnasaziMatOrthoManager.hpp.

template<class ScalarType, class MV, class OP>
virtual void Anasazi::MatOrthoManager< ScalarType, MV, OP >::project MV &  X,
Teuchos::RefCountPtr< MV >  MX,
Teuchos::Array< Teuchos::RefCountPtr< Teuchos::SerialDenseMatrix< int, ScalarType > > >  C,
Teuchos::Array< Teuchos::RefCountPtr< const MV > >  Q
const [pure virtual]
 

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].

Parameters:
X [in/out] The multivector to be modified. On output, X will be orthogonal to Q[i] with respect to innerProd().
MX [in] The image of the multivector under the specified operator. If MX is null, it is not used.
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 non-null pointer whose size does not match the dimensions of X and *Q[i], then a std::invalid_argument 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 Anasazi::BasicOrthoManager< ScalarType, MV, OP >, and Anasazi::SVQBOrthoManager< ScalarType, MV, OP >.

template<class ScalarType, class MV, class OP>
virtual void Anasazi::MatOrthoManager< ScalarType, MV, OP >::project MV &  X,
Teuchos::Array< Teuchos::RefCountPtr< Teuchos::SerialDenseMatrix< int, ScalarType > > >  C,
Teuchos::Array< Teuchos::RefCountPtr< const MV > >  Q
const [inline, virtual]
 

This method calls project(X,Teuchos::null,C,Q); see documentation for that function.

Implements Anasazi::OrthoManager< ScalarType, MV >.

Reimplemented in Anasazi::BasicOrthoManager< ScalarType, MV, OP >, and Anasazi::SVQBOrthoManager< ScalarType, MV, OP >.

Definition at line 223 of file AnasaziMatOrthoManager.hpp.

template<class ScalarType, class MV, class OP>
virtual int Anasazi::MatOrthoManager< ScalarType, MV, OP >::normalize MV &  X,
Teuchos::RefCountPtr< MV >  MX,
Teuchos::RefCountPtr< Teuchos::SerialDenseMatrix< int, ScalarType > >  B
const [pure virtual]
 

This method takes a multivector X and attempts to compute an orthonormal basis for $colspan(X)$, 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.

Parameters:
X [in/out] The multivector to the modified. On output, X will have some number of orthonormal columns (with respect to innerProd()).
MX [in/out] The image of the multivector under the specified operator. If MX is null, it is not used. On output, it returns the image of the valid basis vectors under the specified operator.
B [out] The coefficients of X in the computed basis. If B is a non-null pointer and *B has appropriate dimensions, then the coefficients computed during the orthogonalization routine will be stored in the matrix *B. If B is a non-null pointer whose size does not match the dimensions of X, then a std::invalid_argument exception will be thrown. Otherwise, the orthogonalization manager will declare storage for the coefficients and the user will not have access to them. This matrix may or may not be triangular; see documentation for individual orthogonalization managers.
Returns:
Rank of the basis computed by this method.

Implemented in Anasazi::BasicOrthoManager< ScalarType, MV, OP >, and Anasazi::SVQBOrthoManager< ScalarType, MV, OP >.

template<class ScalarType, class MV, class OP>
virtual int Anasazi::MatOrthoManager< ScalarType, MV, OP >::normalize MV &  X,
Teuchos::RefCountPtr< Teuchos::SerialDenseMatrix< int, ScalarType > >  B
const [inline, virtual]
 

This method calls normalize(X,Teuchos::null,B); see documentation for that function.

Implements Anasazi::OrthoManager< ScalarType, MV >.

Reimplemented in Anasazi::BasicOrthoManager< ScalarType, MV, OP >, and Anasazi::SVQBOrthoManager< ScalarType, MV, OP >.

Definition at line 256 of file AnasaziMatOrthoManager.hpp.

template<class ScalarType, class MV, class OP>
virtual int Anasazi::MatOrthoManager< ScalarType, MV, OP >::projectAndNormalize MV &  X,
Teuchos::RefCountPtr< MV >  MX,
Teuchos::Array< Teuchos::RefCountPtr< Teuchos::SerialDenseMatrix< int, ScalarType > > >  C,
Teuchos::RefCountPtr< Teuchos::SerialDenseMatrix< int, ScalarType > >  B,
Teuchos::Array< Teuchos::RefCountPtr< const MV > >  Q
const [pure virtual]
 

Given a set of bases Q[i] and a multivector X, this method computes an orthonormal basis for $colspan(X) - \sum_i colspan(Q[i])$.

This routine returns an integer rank stating the rank of the computed basis. If the subspace $colspan(X) - \sum_i colspan(Q[i])$ 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.

Note:
This routine guarantees both the orthgonality constraints against the 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.
Parameters:
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()).
MX [in/out] The image of the multivector under the specified operator. If MX is null, it is not used. On output, it returns the image of the valid basis vectors under the specified operator.
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 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 X in the computed basis. If B is a non-null pointer and *B has appropriate dimensions, then the coefficients computed during the orthogonalization routine will be stored in the matrix *B. If B is a non-null pointer whose size does not match the dimensions of X, then a std::invalid_argument exception will be thrown. Otherwise, the orthogonalization manager will declare storage for the coefficients and the user will not have access to them. This matrix may or may not be triangular; see documentation for individual 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.
Returns:
Rank of the basis computed by this method.

Implemented in Anasazi::BasicOrthoManager< ScalarType, MV, OP >, and Anasazi::SVQBOrthoManager< ScalarType, MV, OP >.

template<class ScalarType, class MV, class OP>
virtual int Anasazi::MatOrthoManager< ScalarType, MV, OP >::projectAndNormalize MV &  X,
Teuchos::Array< Teuchos::RefCountPtr< Teuchos::SerialDenseMatrix< int, ScalarType > > >  C,
Teuchos::RefCountPtr< Teuchos::SerialDenseMatrix< int, ScalarType > >  B,
Teuchos::Array< Teuchos::RefCountPtr< const MV > >  Q
const [inline, virtual]
 

This method calls projectAndNormalize(X,Teuchos::null,C,B,Q); see documentation for that function.

Implements Anasazi::OrthoManager< ScalarType, MV >.

Reimplemented in Anasazi::BasicOrthoManager< ScalarType, MV, OP >, and Anasazi::SVQBOrthoManager< ScalarType, MV, OP >.

Definition at line 302 of file AnasaziMatOrthoManager.hpp.

template<class ScalarType, class MV, class OP>
virtual Teuchos::ScalarTraits<ScalarType>::magnitudeType Anasazi::MatOrthoManager< ScalarType, MV, OP >::orthonormError const MV &  X  )  const [inline, virtual]
 

This method computes the error in orthonormality of a multivector.

Implements Anasazi::OrthoManager< ScalarType, MV >.

Reimplemented in Anasazi::BasicOrthoManager< ScalarType, MV, OP >, and Anasazi::SVQBOrthoManager< ScalarType, MV, OP >.

Definition at line 317 of file AnasaziMatOrthoManager.hpp.

template<class ScalarType, class MV, class OP>
virtual Teuchos::ScalarTraits<ScalarType>::magnitudeType Anasazi::MatOrthoManager< ScalarType, MV, OP >::orthonormError const MV &  X,
Teuchos::RefCountPtr< const MV >  MX
const [pure virtual]
 

This method computes the error in orthonormality of a multivector. The method has the option of exploiting a caller-provided MX.

Implemented in Anasazi::BasicOrthoManager< ScalarType, MV, OP >, and Anasazi::SVQBOrthoManager< ScalarType, MV, OP >.

template<class ScalarType, class MV, class OP>
virtual Teuchos::ScalarTraits<ScalarType>::magnitudeType Anasazi::MatOrthoManager< ScalarType, MV, OP >::orthogError const MV &  X1,
const MV &  X2
const [inline, virtual]
 

This method computes the error in orthogonality of two multivectors. This method.

Implements Anasazi::OrthoManager< ScalarType, MV >.

Reimplemented in Anasazi::BasicOrthoManager< ScalarType, MV, OP >, and Anasazi::SVQBOrthoManager< ScalarType, MV, OP >.

Definition at line 330 of file AnasaziMatOrthoManager.hpp.

template<class ScalarType, class MV, class OP>
virtual Teuchos::ScalarTraits<ScalarType>::magnitudeType Anasazi::MatOrthoManager< ScalarType, MV, OP >::orthogError const MV &  X1,
Teuchos::RefCountPtr< const MV >  MX1,
const MV &  X2
const [pure virtual]
 

This method computes the error in orthogonality of two multivectors. The method has the option of exploiting a caller-provided MX.

Implemented in Anasazi::BasicOrthoManager< ScalarType, MV, OP >, and Anasazi::SVQBOrthoManager< ScalarType, MV, OP >.


The documentation for this class was generated from the following file:
Generated on Thu Sep 18 12:31:39 2008 for Anasazi by doxygen 1.3.9.1