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

A status test for testing the norm of the eigenvectors residuals along with a set of auxiliary eigenvalues. More...

#include <AnasaziStatusTestOrderedResNorm.hpp>

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

Anasazi::StatusTest< ScalarType, MV, OP > List of all members.

Public Types

Enums
enum  ResType
 Enumerated type used to specify which residual norm used by this status test. More...

Public Member Functions

Constructors/destructors
 StatusTestOrderedResNorm (Teuchos::RCP< SortManager< ScalarType, MV, OP > > sorter, typename Teuchos::ScalarTraits< ScalarType >::magnitudeType tol, int quorum=-1, ResType whichNorm=RES_ORTH, bool scaled=true)
 Constructor.
virtual ~StatusTestOrderedResNorm ()
 Destructor.
Status methods
TestStatus checkStatus (Eigensolver< ScalarType, MV, OP > *solver)
TestStatus getStatus () const
 Return the result of the most recent checkStatus call.
Accessor methods
void setTolerance (typename Teuchos::ScalarTraits< ScalarType >::magnitudeType tol)
 Set tolerance. This also resets the test status to Undefined.
Teuchos::ScalarTraits< ScalarType
>::magnitudeType 
getTolerance ()
 Get tolerance.
void setWhichNorm (ResType whichNorm)
 Set the residual norm to be used by the status test.
ResType getWhichNorm ()
 Return the residual norm used by the status test.
void setScale (bool relscale)
 Instruct test to scale norms by eigenvalue estimates (relative scale). This also resets the test status to Undefined.
bool getScale ()
 Returns true if the test scales the norms by the eigenvalue estimates (relative scale).
std::vector< int > whichVecs ()
 Get the indices for the vectors that passed the test.
int howMany ()
 Get the number of vectors that passed the test.
Reset methods
void reset ()
 Informs the status test that it should reset its internal configuration to the uninitialized state.
void clearStatus ()
 Clears the results of the last status test.
void setAuxVals (const std::vector< typename Teuchos::ScalarTraits< ScalarType >::magnitudeType > &vals)
 Set the auxiliary eigenvalues.
void setAuxVals (const std::vector< typename Teuchos::ScalarTraits< ScalarType >::magnitudeType > &rvals, const std::vector< typename Teuchos::ScalarTraits< ScalarType >::magnitudeType > &ivals)
 Set the auxiliary eigenvalues.
Print methods
std::ostream & print (std::ostream &os, int indent=0) const
 Output formatted description of stopping test to output stream.

Detailed Description

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

A status test for testing the norm of the eigenvectors residuals along with a set of auxiliary eigenvalues.

The test evaluates to Passed when then the most significant of the eigenvalues all have a residual below a certain threshhold. The purpose of the test is to not only test convergence for some number of eigenvalues, but to test convergence for the correct ones.

In addition to specifying the tolerance, the user may specify:

Finally, the user must specify the Anasazi::SortManager used for deciding significance.

Definition at line 71 of file AnasaziStatusTestOrderedResNorm.hpp.


Member Enumeration Documentation

template<class ScalarType, class MV, class OP>
enum Anasazi::StatusTestOrderedResNorm::ResType

Enumerated type used to specify which residual norm used by this status test.

Definition at line 85 of file AnasaziStatusTestOrderedResNorm.hpp.


Constructor & Destructor Documentation

template<class ScalarType, class MV, class OP>
Anasazi::StatusTestOrderedResNorm< ScalarType, MV, OP >::StatusTestOrderedResNorm ( Teuchos::RCP< SortManager< ScalarType, MV, OP > >  sorter,
typename Teuchos::ScalarTraits< ScalarType >::magnitudeType  tol,
int  quorum = -1,
ResType  whichNorm = RES_ORTH,
bool  scaled = true 
)

Constructor.

Definition at line 227 of file AnasaziStatusTestOrderedResNorm.hpp.

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

Destructor.

Definition at line 100 of file AnasaziStatusTestOrderedResNorm.hpp.


Member Function Documentation

template<class ScalarType, class MV, class OP>
TestStatus Anasazi::StatusTestOrderedResNorm< ScalarType, MV, OP >::checkStatus ( Eigensolver< ScalarType, MV, OP > *  solver  )  [virtual]

Check status as defined by test.

Returns:
TestStatus indicating whether the test passed or failed.

Implements Anasazi::StatusTest< ScalarType, MV, OP >.

Definition at line 235 of file AnasaziStatusTestOrderedResNorm.hpp.

template<class ScalarType, class MV, class OP>
TestStatus Anasazi::StatusTestOrderedResNorm< ScalarType, MV, OP >::getStatus (  )  const [inline, virtual]

Return the result of the most recent checkStatus call.

Implements Anasazi::StatusTest< ScalarType, MV, OP >.

Definition at line 111 of file AnasaziStatusTestOrderedResNorm.hpp.

template<class ScalarType, class MV, class OP>
void Anasazi::StatusTestOrderedResNorm< ScalarType, MV, OP >::setTolerance ( typename Teuchos::ScalarTraits< ScalarType >::magnitudeType  tol  )  [inline]

Set tolerance. This also resets the test status to Undefined.

Definition at line 120 of file AnasaziStatusTestOrderedResNorm.hpp.

template<class ScalarType, class MV, class OP>
Teuchos::ScalarTraits<ScalarType>::magnitudeType Anasazi::StatusTestOrderedResNorm< ScalarType, MV, OP >::getTolerance (  )  [inline]

Get tolerance.

Definition at line 126 of file AnasaziStatusTestOrderedResNorm.hpp.

template<class ScalarType, class MV, class OP>
void Anasazi::StatusTestOrderedResNorm< ScalarType, MV, OP >::setWhichNorm ( ResType  whichNorm  )  [inline]

Set the residual norm to be used by the status test.

This also resets the test status to Undefined.

Definition at line 132 of file AnasaziStatusTestOrderedResNorm.hpp.

template<class ScalarType, class MV, class OP>
ResType Anasazi::StatusTestOrderedResNorm< ScalarType, MV, OP >::getWhichNorm (  )  [inline]

Return the residual norm used by the status test.

Definition at line 138 of file AnasaziStatusTestOrderedResNorm.hpp.

template<class ScalarType, class MV, class OP>
void Anasazi::StatusTestOrderedResNorm< ScalarType, MV, OP >::setScale ( bool  relscale  )  [inline]

Instruct test to scale norms by eigenvalue estimates (relative scale). This also resets the test status to Undefined.

Definition at line 143 of file AnasaziStatusTestOrderedResNorm.hpp.

template<class ScalarType, class MV, class OP>
bool Anasazi::StatusTestOrderedResNorm< ScalarType, MV, OP >::getScale (  )  [inline]

Returns true if the test scales the norms by the eigenvalue estimates (relative scale).

Definition at line 149 of file AnasaziStatusTestOrderedResNorm.hpp.

template<class ScalarType, class MV, class OP>
std::vector<int> Anasazi::StatusTestOrderedResNorm< ScalarType, MV, OP >::whichVecs (  )  [inline]

Get the indices for the vectors that passed the test.

Definition at line 152 of file AnasaziStatusTestOrderedResNorm.hpp.

template<class ScalarType, class MV, class OP>
int Anasazi::StatusTestOrderedResNorm< ScalarType, MV, OP >::howMany (  )  [inline]

Get the number of vectors that passed the test.

Definition at line 157 of file AnasaziStatusTestOrderedResNorm.hpp.

template<class ScalarType, class MV, class OP>
void Anasazi::StatusTestOrderedResNorm< ScalarType, MV, OP >::reset (  )  [inline, virtual]

Informs the status test that it should reset its internal configuration to the uninitialized state.

This is necessary for the case when the status test is being reused by another solver or for another eigenvalue problem. The status test may have information that pertains to a particular problem or solver state. The internal information will be reset back to the uninitialized state. The user specified information that the convergence test uses will remain.

Implements Anasazi::StatusTest< ScalarType, MV, OP >.

Definition at line 171 of file AnasaziStatusTestOrderedResNorm.hpp.

template<class ScalarType, class MV, class OP>
void Anasazi::StatusTestOrderedResNorm< ScalarType, MV, OP >::clearStatus (  )  [inline, virtual]

Clears the results of the last status test.

This should be distinguished from the reset() method, as it only clears the cached result from the last status test, so that a call to getStatus() will return Undefined. This is necessary for the SEQOR and SEQAND tests in the StatusTestCombo class, which may short circuit and not evaluate all of the StatusTests contained in them.

Implements Anasazi::StatusTest< ScalarType, MV, OP >.

Definition at line 181 of file AnasaziStatusTestOrderedResNorm.hpp.

template<class ScalarType, class MV, class OP>
void Anasazi::StatusTestOrderedResNorm< ScalarType, MV, OP >::setAuxVals ( const std::vector< typename Teuchos::ScalarTraits< ScalarType >::magnitudeType > &  vals  )  [inline]

Set the auxiliary eigenvalues.

This routine sets only the real part of the auxiliary eigenvalues; the imaginary part is set to zero. This routine also resets the state to Undefined.

Definition at line 189 of file AnasaziStatusTestOrderedResNorm.hpp.

template<class ScalarType, class MV, class OP>
void Anasazi::StatusTestOrderedResNorm< ScalarType, MV, OP >::setAuxVals ( const std::vector< typename Teuchos::ScalarTraits< ScalarType >::magnitudeType > &  rvals,
const std::vector< typename Teuchos::ScalarTraits< ScalarType >::magnitudeType > &  ivals 
) [inline]

Set the auxiliary eigenvalues.

This routine sets both the real and imaginary parts of the auxiliary eigenvalues. This routine also resets the state to Undefined.

Definition at line 199 of file AnasaziStatusTestOrderedResNorm.hpp.

template<class ScalarType, class MV, class OP>
std::ostream & Anasazi::StatusTestOrderedResNorm< ScalarType, MV, OP >::print ( std::ostream &  os,
int  indent = 0 
) const [virtual]

Output formatted description of stopping test to output stream.

Implements Anasazi::StatusTest< ScalarType, MV, OP >.

Definition at line 320 of file AnasaziStatusTestOrderedResNorm.hpp.


The documentation for this class was generated from the following file:
Generated on Tue Oct 20 12:45:19 2009 for Anasazi by doxygen 1.4.7