Anasazi Version of the Day

Anasazi's templated virtual class for providing routines for orthogonalization and orthonormalization of multivectors. More...
#include <AnasaziOrthoManager.hpp>
Public Member Functions  
Constructor/Destructor  
OrthoManager ()  
Default constructor.  
virtual  ~OrthoManager () 
Destructor.  
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.  
virtual void  norm (const MV &X, std::vector< typename Teuchos::ScalarTraits< ScalarType >::magnitudeType > &normvec) const =0 
Provides the norm induced by innerProd().  
virtual void  project (MV &X, Teuchos::Array< Teuchos::RCP< const MV > > Q, Teuchos::Array< Teuchos::RCP< Teuchos::SerialDenseMatrix< int, ScalarType > > > C=Teuchos::tuple(Teuchos::RCP< Teuchos::SerialDenseMatrix< int, ScalarType > >(Teuchos::null))) const =0 
Given a list of mutually orthogonal and internally orthonormal bases Q , this method projects a multivector X 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 int  normalize (MV &X, Teuchos::RCP< Teuchos::SerialDenseMatrix< int, ScalarType > > B=Teuchos::null) const =0 
This method takes a multivector X and attempts to compute a basis for . This basis is orthonormal with respect to innerProd().  
virtual int  projectAndNormalize (MV &X, Teuchos::Array< Teuchos::RCP< const MV > > Q, Teuchos::Array< Teuchos::RCP< Teuchos::SerialDenseMatrix< int, ScalarType > > > C=Teuchos::tuple(Teuchos::RCP< Teuchos::SerialDenseMatrix< int, ScalarType > >(Teuchos::null)), Teuchos::RCP< Teuchos::SerialDenseMatrix< int, ScalarType > > B=Teuchos::null) const =0 
Given a set of bases Q[i] and a multivector X , this method computes an orthonormal basis for .  
Error methods  
virtual Teuchos::ScalarTraits < ScalarType >::magnitudeType  orthonormError (const MV &X) const =0 
This method computes the error in orthonormality of a multivector.  
virtual Teuchos::ScalarTraits < ScalarType >::magnitudeType  orthogError (const MV &X1, const MV &X2) const =0 
This method computes the error in orthogonality of two multivectors. 
Anasazi's templated virtual class for providing routines for orthogonalization and orthonormalization 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.
Definition at line 74 of file AnasaziOrthoManager.hpp.
Anasazi::OrthoManager< ScalarType, MV >::OrthoManager  (  )  [inline] 
Default constructor.
Definition at line 79 of file AnasaziOrthoManager.hpp.
virtual Anasazi::OrthoManager< ScalarType, MV >::~OrthoManager  (  )  [inline, virtual] 
Destructor.
Definition at line 82 of file AnasaziOrthoManager.hpp.
virtual void Anasazi::OrthoManager< ScalarType, MV >::innerProd  (  const MV &  X, 
const MV &  Y,  
Teuchos::SerialDenseMatrix< int, ScalarType > &  Z  
)  const [pure virtual] 
Provides the inner product defining the orthogonality concepts.
All concepts of orthogonality discussed in this class are defined with respect to this inner product.
M
for the inner product: .Z  [out] Z(i,j) contains the inner product of X[i] and Y[i] :

Implemented in Anasazi::MatOrthoManager< ScalarType, MV, OP >.
virtual void Anasazi::OrthoManager< ScalarType, MV >::norm  (  const MV &  X, 
std::vector< typename Teuchos::ScalarTraits< ScalarType >::magnitudeType > &  normvec  
)  const [pure virtual] 
Provides the norm induced by innerProd().
This computes the norm for each column of a multivector. This is the norm induced by innerProd():
normvec  [out] Vector of norms, whose ith entry corresponds to the ith column of X 
normvec.size() == GetNumberVecs(X)
Implemented in Anasazi::MatOrthoManager< ScalarType, MV, OP >.
virtual void Anasazi::OrthoManager< ScalarType, MV >::project  (  MV &  X, 
Teuchos::Array< Teuchos::RCP< const MV > >  Q,  
Teuchos::Array< Teuchos::RCP< Teuchos::SerialDenseMatrix< int, ScalarType > > >  C = Teuchos::tuple(Teuchos::RCP< Teuchos::SerialDenseMatrix< int, ScalarType > >(Teuchos::null)) 

)  const [pure virtual] 
Given a list of mutually orthogonal and internally orthonormal bases Q
, this method projects a multivector X
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, the columns of X will be orthogonal to each Q[i] , satisfying Also,

Q  [in] A list of multivector bases specifying the subspaces to be orthogonalized against, satisfying and

C  [out] The coefficients of X in the bases Q[i] . If C[i] is a nonnull 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] , similar to calling innerProd( Q[i], X, C[i] ); C[i] points to a Teuchos::SerialDenseMatrix with size inconsistent with X and , then a std::invalid_argument exception will be thrown.Otherwise, if C.size() < i or C[i] is a null pointer, the caller will not have access to the computed coefficients. 
Implemented in Anasazi::MatOrthoManager< ScalarType, MV, OP >, and Anasazi::TsqrOrthoManager< Scalar, MV >.
virtual int Anasazi::OrthoManager< ScalarType, MV >::normalize  (  MV &  X, 
Teuchos::RCP< Teuchos::SerialDenseMatrix< int, ScalarType > >  B = Teuchos::null 

)  const [pure virtual] 
This method takes a multivector X
and attempts to compute a basis for . This basis is orthonormal 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 be modified. On output, the first rank columns of X satisfy Also, where m is the number of rows in X and n is the number of columns in X . 
B  [out] The coefficients of the original X with respect to the computed basis. If B is a nonnull pointer and B matches the dimensions of B , then the coefficients computed during the orthogonalization routine will be stored in B , similar to calling innerProd( X_{out}, X_{in}, B ); B points to a Teuchos::SerialDenseMatrix with size inconsistent with X , then a std::invalid_argument exception will be thrown.Otherwise, if B is null, the caller will not have access to the computed coefficients. 
X
. This specifies how many columns in the returned X
and rows in the returned B
are valid. Implemented in Anasazi::MatOrthoManager< ScalarType, MV, OP >.
virtual int Anasazi::OrthoManager< ScalarType, MV >::projectAndNormalize  (  MV &  X, 
Teuchos::Array< Teuchos::RCP< const MV > >  Q,  
Teuchos::Array< Teuchos::RCP< Teuchos::SerialDenseMatrix< int, ScalarType > > >  C = Teuchos::tuple(Teuchos::RCP< Teuchos::SerialDenseMatrix< int, ScalarType > >(Teuchos::null)) , 

Teuchos::RCP< Teuchos::SerialDenseMatrix< int, ScalarType > >  B = Teuchos::null 

)  const [pure virtual] 
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 does 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 of the returned basis. 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] On output, the first rank columns of X satisfy Also, where m is the number of rows in X and n is the number of columns in X . 
Q  [in] A list of multivector bases specifying the subspaces to be orthogonalized against, satisfying and

C  [out] The coefficients of X in the Q[i] . If C[i] is a nonnull 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] , similar to calling innerProd( Q[i], X, C[i] ); C[i] points to a Teuchos::SerialDenseMatrix with size inconsistent with X and , then a std::invalid_argument exception will be thrown.Otherwise, if C.size() < i or C[i] is a null pointer, the caller will not have access to the computed coefficients. 
B  [out] The coefficients of the original X with respect to the computed basis. If B is a nonnull pointer and B matches the dimensions of B , then the coefficients computed during the orthogonalization routine will be stored in B , similar to calling innerProd( Sout, Sin, B ); B points to a Teuchos::SerialDenseMatrix with size inconsistent with X , then a std::invalid_argument exception will be thrown.Otherwise, if B is null, the caller will not have access to the computed coefficients. 
X
. This specifies how many columns in the returned X
and rows in the returned B
are valid. Implemented in Anasazi::MatOrthoManager< ScalarType, MV, OP >, and Anasazi::TsqrOrthoManager< Scalar, MV >.
virtual Teuchos::ScalarTraits< ScalarType >::magnitudeType Anasazi::OrthoManager< ScalarType, MV >::orthonormError  (  const MV &  X  )  const [pure virtual] 
This method computes the error in orthonormality of a multivector.
This method return some measure of .
See the documentation of specific orthogonalization managers.
Implemented in Anasazi::MatOrthoManager< ScalarType, MV, OP >, Anasazi::TsqrOrthoManager< Scalar, MV >, and Anasazi::MatOrthoManager< Scalar, MV, OP >.
virtual Teuchos::ScalarTraits<ScalarType>::magnitudeType Anasazi::OrthoManager< ScalarType, MV >::orthogError  (  const MV &  X1, 
const MV &  X2  
)  const [pure virtual] 
This method computes the error in orthogonality of two multivectors.
This method return some measure of .
See the documentation of specific orthogonalization managers.
Implemented in Anasazi::MatOrthoManager< ScalarType, MV, OP >, Anasazi::TsqrOrthoManager< Scalar, MV >, and Anasazi::MatOrthoManager< Scalar, MV, OP >.