Anasazi  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
List of all members
Anasazi::StatusTestWithOrdering< 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 <AnasaziStatusTestWithOrdering.hpp>

Inheritance diagram for Anasazi::StatusTestWithOrdering< ScalarType, MV, OP >:
Anasazi::StatusTest< ScalarType, MV, OP >

Public Member Functions

Constructors/destructors
 StatusTestWithOrdering (Teuchos::RCP< StatusTest< ScalarType, MV, OP > > test, Teuchos::RCP< SortManager< typename Teuchos::ScalarTraits< ScalarType >::magnitudeType > > sorter, int quorum=-1)
 Constructor. More...
 
virtual ~StatusTestWithOrdering ()
 Destructor. More...
 
Status methods
TestStatus checkStatus (Eigensolver< ScalarType, MV, OP > *solver)
 
TestStatus getStatus () const
 Return the result of the most recent checkStatus call, or undefined if it has not been run. More...
 
std::vector< int > whichVecs () const
 Get the indices for the vectors that passed the test. More...
 
int howMany () const
 Get the number of vectors that passed the test. More...
 
Accessor methods
void setQuorum (int quorum)
 Set quorum. More...
 
int getQuorum () const
 Get quorum. More...
 
Reset methods
void reset ()
 Informs the status test that it should reset its internal configuration to the uninitialized state. More...
 
void clearStatus ()
 Clears the results of the last status test. More...
 
void setAuxVals (const std::vector< typename Teuchos::ScalarTraits< ScalarType >::magnitudeType > &vals)
 Set the auxiliary eigenvalues. More...
 
void setAuxVals (const std::vector< typename Teuchos::ScalarTraits< ScalarType >::magnitudeType > &rvals, const std::vector< typename Teuchos::ScalarTraits< ScalarType >::magnitudeType > &ivals)
 Set the auxiliary eigenvalues. More...
 
void getAuxVals (std::vector< typename Teuchos::ScalarTraits< ScalarType >::magnitudeType > &rvals, std::vector< typename Teuchos::ScalarTraits< ScalarType >::magnitudeType > &ivals) const
 Get the auxiliary eigenvalues. More...
 
Print methods
std::ostream & print (std::ostream &os, int indent=0) const
 Output formatted description of stopping test to output stream. More...
 
- Public Member Functions inherited from Anasazi::StatusTest< ScalarType, MV, OP >
 StatusTest ()
 Constructor. More...
 
virtual ~StatusTest ()
 Destructor. More...
 

Detailed Description

template<class ScalarType, class MV, class OP>
class Anasazi::StatusTestWithOrdering< 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 83 of file AnasaziStatusTestWithOrdering.hpp.

Constructor & Destructor Documentation

template<class ScalarType , class MV , class OP >
Anasazi::StatusTestWithOrdering< ScalarType, MV, OP >::StatusTestWithOrdering ( Teuchos::RCP< StatusTest< ScalarType, MV, OP > >  test,
Teuchos::RCP< SortManager< typename Teuchos::ScalarTraits< ScalarType >::magnitudeType > >  sorter,
int  quorum = -1 
)

Constructor.

Definition at line 225 of file AnasaziStatusTestWithOrdering.hpp.

template<class ScalarType , class MV , class OP >
virtual Anasazi::StatusTestWithOrdering< ScalarType, MV, OP >::~StatusTestWithOrdering ( )
inlinevirtual

Destructor.

Definition at line 98 of file AnasaziStatusTestWithOrdering.hpp.

Member Function Documentation

template<class ScalarType , class MV , class OP >
TestStatus Anasazi::StatusTestWithOrdering< 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 233 of file AnasaziStatusTestWithOrdering.hpp.

template<class ScalarType , class MV , class OP >
TestStatus Anasazi::StatusTestWithOrdering< ScalarType, MV, OP >::getStatus ( ) const
inlinevirtual

Return the result of the most recent checkStatus call, or undefined if it has not been run.

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

Definition at line 110 of file AnasaziStatusTestWithOrdering.hpp.

template<class ScalarType , class MV , class OP >
std::vector<int> Anasazi::StatusTestWithOrdering< ScalarType, MV, OP >::whichVecs ( ) const
inlinevirtual

Get the indices for the vectors that passed the test.

Non-negative indices correspond to passing vectors from the constituent status test. Negative entries correspond to auxilliary values, where the first auxilliary value is indexed by -NumAuxVals, the second by -NumAuxVals+1, and so forth.

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

Definition at line 118 of file AnasaziStatusTestWithOrdering.hpp.

template<class ScalarType , class MV , class OP >
int Anasazi::StatusTestWithOrdering< ScalarType, MV, OP >::howMany ( ) const
inlinevirtual

Get the number of vectors that passed the test.

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

Definition at line 123 of file AnasaziStatusTestWithOrdering.hpp.

template<class ScalarType , class MV , class OP >
void Anasazi::StatusTestWithOrdering< ScalarType, MV, OP >::setQuorum ( int  quorum)
inline

Set quorum.

Setting quorum to -1 signifies that all residuals from the solver must meet the tolerance. This also resets the test status to Undefined.

Definition at line 137 of file AnasaziStatusTestWithOrdering.hpp.

template<class ScalarType , class MV , class OP >
int Anasazi::StatusTestWithOrdering< ScalarType, MV, OP >::getQuorum ( ) const
inline

Get quorum.

Definition at line 144 of file AnasaziStatusTestWithOrdering.hpp.

template<class ScalarType , class MV , class OP >
void Anasazi::StatusTestWithOrdering< ScalarType, MV, OP >::reset ( )
inlinevirtual

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 158 of file AnasaziStatusTestWithOrdering.hpp.

template<class ScalarType , class MV , class OP >
void Anasazi::StatusTestWithOrdering< ScalarType, MV, OP >::clearStatus ( )
inlinevirtual

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 170 of file AnasaziStatusTestWithOrdering.hpp.

template<class ScalarType , class MV , class OP >
void Anasazi::StatusTestWithOrdering< 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 180 of file AnasaziStatusTestWithOrdering.hpp.

template<class ScalarType , class MV , class OP >
void Anasazi::StatusTestWithOrdering< 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 190 of file AnasaziStatusTestWithOrdering.hpp.

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

Get the auxiliary eigenvalues.

This routine gets the real and imaginary parts of the auxiliary eigenvalues.

Definition at line 200 of file AnasaziStatusTestWithOrdering.hpp.

template<class ScalarType , class MV , class OP >
std::ostream & Anasazi::StatusTestWithOrdering< 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 331 of file AnasaziStatusTestWithOrdering.hpp.


The documentation for this class was generated from the following file: