Anasazi Version of the Day

An implementation of the Anasazi::MatOrthoManager that performs orthogonalization using the SVQB iterative orthogonalization technique described by Stathapoulos and Wu. This orthogonalization routine, while not returning the upper triangular factors of the popular GramSchmidt method, has a communication cost (measured in number of communication calls) that is independent of the number of columns in the basis. More...
#include <AnasaziSVQBOrthoManager.hpp>
Public Member Functions  
Constructor/Destructor  
SVQBOrthoManager (Teuchos::RCP< const OP > Op=Teuchos::null, bool debug=false)  
Constructor specifying reorthogonalization tolerance.  
~SVQBOrthoManager ()  
Destructor.  
Methods implementing Anasazi::MatOrthoManager  
void  projectMat (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< MV > MX=Teuchos::null, Teuchos::Array< Teuchos::RCP< const MV > > MQ=Teuchos::tuple(Teuchos::RCP< const MV >(Teuchos::null))) const 
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().  
int  normalizeMat (MV &X, Teuchos::RCP< Teuchos::SerialDenseMatrix< int, ScalarType > > B=Teuchos::null, Teuchos::RCP< MV > MX=Teuchos::null) const 
This method takes a multivector X and attempts to compute an orthonormal basis for , with respect to innerProd().  
int  projectAndNormalizeMat (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, Teuchos::RCP< MV > MX=Teuchos::null, Teuchos::Array< Teuchos::RCP< const MV > > MQ=Teuchos::tuple(Teuchos::RCP< const MV >(Teuchos::null))) const 
Given a set of bases Q[i] and a multivector X , this method computes an orthonormal basis for .  
Error methods  
Teuchos::ScalarTraits < ScalarType >::magnitudeType  orthonormErrorMat (const MV &X, Teuchos::RCP< const MV > MX=Teuchos::null) const 
This method computes the error in orthonormality of a multivector, measured as the Frobenius norm of the difference innerProd(X,Y)  I . The method has the option of exploiting a callerprovided MX .  
Teuchos::ScalarTraits < ScalarType >::magnitudeType  orthogErrorMat (const MV &X, const MV &Y, Teuchos::RCP< const MV > MX=Teuchos::null, Teuchos::RCP< const MV > MY=Teuchos::null) const 
This method computes the error in orthogonality of two multivectors, measured as the Frobenius norm of innerProd(X,Y) . The method has the option of exploiting a callerprovided MX . 
An implementation of the Anasazi::MatOrthoManager that performs orthogonalization using the SVQB iterative orthogonalization technique described by Stathapoulos and Wu. This orthogonalization routine, while not returning the upper triangular factors of the popular GramSchmidt method, has a communication cost (measured in number of communication calls) that is independent of the number of columns in the basis.
Definition at line 56 of file AnasaziSVQBOrthoManager.hpp.
Anasazi::SVQBOrthoManager< ScalarType, MV, OP >::SVQBOrthoManager  (  Teuchos::RCP< const OP >  Op = Teuchos::null , 
bool  debug = false 

) 
Constructor specifying reorthogonalization tolerance.
Definition at line 291 of file AnasaziSVQBOrthoManager.hpp.
Anasazi::SVQBOrthoManager< ScalarType, MV, OP >::~SVQBOrthoManager  (  )  [inline] 
Destructor.
Definition at line 77 of file AnasaziSVQBOrthoManager.hpp.
void Anasazi::SVQBOrthoManager< ScalarType, MV, OP >::projectMat  (  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< MV >  MX = Teuchos::null , 

Teuchos::Array< Teuchos::RCP< const MV > >  MQ = Teuchos::tuple(Teuchos::RCP<const MV>(Teuchos::null)) 

)  const [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

MX  [in/out] The image of X under the inner product operator Op . If : On input, this is expected to be consistent with Op X. On output, this is updated consistent with updates to X . If or : MX is not referenced. 
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. 
Q  [in] A list of multivector bases specifying the subspaces to be orthogonalized against, satisfying and

Implements Anasazi::MatOrthoManager< ScalarType, MV, OP >.
Definition at line 338 of file AnasaziSVQBOrthoManager.hpp.
int Anasazi::SVQBOrthoManager< ScalarType, MV, OP >::normalizeMat  (  MV &  X, 
Teuchos::RCP< Teuchos::SerialDenseMatrix< int, ScalarType > >  B = Teuchos::null , 

Teuchos::RCP< MV >  MX = Teuchos::null 

)  const [virtual] 
This method takes a multivector X
and attempts to compute an orthonormal basis for , with respect to innerProd().
This method does not compute an upper triangular coefficient matrix B
.
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.
The method attempts to find a basis with dimension equal to the number of columns in X
. It does this by augmenting linearly dependent vectors in X
with random directions. A finite number of these attempts will be made; therefore, it is possible that the dimension of the computed basis is less than the number of vectors in X
.
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 . 
MX  [in/out] The image of X under the inner product operator Op . If : On input, this is expected to be consistent with Op X. On output, this is updated consistent with updates to X . If or : MX is not referenced. 
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( Xout, Xin, 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. This matrix is not necessarily triangular (as in a QR factorization); see the documentation of specific orthogonalization managers.In general, B has no nonzero structure. 
X
. This specifies how many columns in the returned X
and rows in the returned B
are valid. Implements Anasazi::MatOrthoManager< ScalarType, MV, OP >.
Definition at line 353 of file AnasaziSVQBOrthoManager.hpp.
int Anasazi::SVQBOrthoManager< ScalarType, MV, OP >::projectAndNormalizeMat  (  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 , 

Teuchos::RCP< MV >  MX = Teuchos::null , 

Teuchos::Array< Teuchos::RCP< const MV > >  MQ = Teuchos::tuple(Teuchos::RCP<const MV>(Teuchos::null)) 

)  const [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 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.
The method attempts to find a basis with dimension the same as the number of columns in X
. It does this by augmenting linearly dependent vectors with random directions. A finite number of these attempts will be made; therefore, it is possible that the dimension of the computed basis is less than the number of vectors in X
.
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 . 
MX  [in/out] The image of X under the inner product operator Op . If : On input, this is expected to be consistent with Op X. On output, this is updated consistent with updates to X . If or : MX is not referenced. 
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( Xout, Xin, 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. This matrix is not necessarily triangular (as in a QR factorization); see the documentation of specific orthogonalization managers.In general, B has no nonzero structure. 
Q  [in] A list of multivector bases specifying the subspaces to be orthogonalized against, satisfying and

X
. This specifies how many columns in the returned X
and rows in the returned B
are valid. Implements Anasazi::MatOrthoManager< ScalarType, MV, OP >.
Definition at line 367 of file AnasaziSVQBOrthoManager.hpp.
Teuchos::ScalarTraits< ScalarType >::magnitudeType Anasazi::SVQBOrthoManager< ScalarType, MV, OP >::orthonormErrorMat  (  const MV &  X, 
Teuchos::RCP< const MV >  MX = Teuchos::null 

)  const [virtual] 
This method computes the error in orthonormality of a multivector, measured as the Frobenius norm of the difference innerProd(X,Y)  I
. The method has the option of exploiting a callerprovided MX
.
Implements Anasazi::MatOrthoManager< ScalarType, MV, OP >.
Definition at line 306 of file AnasaziSVQBOrthoManager.hpp.
Teuchos::ScalarTraits< ScalarType >::magnitudeType Anasazi::SVQBOrthoManager< ScalarType, MV, OP >::orthogErrorMat  (  const MV &  X, 
const MV &  Y,  
Teuchos::RCP< const MV >  MX = Teuchos::null , 

Teuchos::RCP< const MV >  MY = Teuchos::null 

)  const [virtual] 
This method computes the error in orthogonality of two multivectors, measured as the Frobenius norm of innerProd(X,Y)
. The method has the option of exploiting a callerprovided MX
.
Implements Anasazi::MatOrthoManager< ScalarType, MV, OP >.
Definition at line 321 of file AnasaziSVQBOrthoManager.hpp.