Anasazi
Version of the Day
|
A status test for testing the norm of the eigenvectors residuals. More...
#include <AnasaziStatusTestResNorm.hpp>
Public Member Functions | |
Constructors/destructors | |
StatusTestResNorm (typename Teuchos::ScalarTraits< ScalarType >::magnitudeType tol, int quorum=-1, ResType whichNorm=RES_ORTH, bool scaled=true, bool throwExceptionOnNaN=true) | |
Constructor. More... | |
virtual | ~StatusTestResNorm () |
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... | |
void | setTolerance (typename Teuchos::ScalarTraits< ScalarType >::magnitudeType tol) |
Set tolerance. This also resets the test status to Undefined. More... | |
Teuchos::ScalarTraits < ScalarType >::magnitudeType | getTolerance () |
Get tolerance. More... | |
void | setWhichNorm (ResType whichNorm) |
Set the residual norm to be used by the status test. More... | |
ResType | getWhichNorm () |
Return the residual norm used by the status test. More... | |
void | setScale (bool relscale) |
Instruct test to scale norms by eigenvalue estimates (relative scale). This also resets the test status to Undefined. More... | |
bool | getScale () |
Returns true if the test scales the norms by the eigenvalue estimates (relative scale). 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... | |
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... | |
A status test for testing the norm of the eigenvectors residuals.
StatusTestResNorm was designed to be used as a test for convergence. The tester compares the norms of the residual vectors against a user specified tolerance.
In addition to specifying the tolerance, the user may specify:
Definition at line 92 of file AnasaziStatusTestResNorm.hpp.
Anasazi::StatusTestResNorm< ScalarType, MV, OP >::StatusTestResNorm | ( | typename Teuchos::ScalarTraits< ScalarType >::magnitudeType | tol, |
int | quorum = -1 , |
||
ResType | whichNorm = RES_ORTH , |
||
bool | scaled = true , |
||
bool | throwExceptionOnNaN = true |
||
) |
Constructor.
Definition at line 230 of file AnasaziStatusTestResNorm.hpp.
|
inlinevirtual |
Destructor.
Definition at line 105 of file AnasaziStatusTestResNorm.hpp.
|
virtual |
Check status as defined by test.
Implements Anasazi::StatusTest< ScalarType, MV, OP >.
Definition at line 235 of file AnasaziStatusTestResNorm.hpp.
|
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 117 of file AnasaziStatusTestResNorm.hpp.
|
inlinevirtual |
Get the indices for the vectors that passed the test.
Implements Anasazi::StatusTest< ScalarType, MV, OP >.
Definition at line 120 of file AnasaziStatusTestResNorm.hpp.
|
inlinevirtual |
Get the number of vectors that passed the test.
Implements Anasazi::StatusTest< ScalarType, MV, OP >.
Definition at line 125 of file AnasaziStatusTestResNorm.hpp.
|
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 139 of file AnasaziStatusTestResNorm.hpp.
|
inline |
Get quorum.
Definition at line 146 of file AnasaziStatusTestResNorm.hpp.
|
inline |
Set tolerance. This also resets the test status to Undefined.
Definition at line 153 of file AnasaziStatusTestResNorm.hpp.
|
inline |
Get tolerance.
Definition at line 159 of file AnasaziStatusTestResNorm.hpp.
|
inline |
Set the residual norm to be used by the status test.
This also resets the test status to Undefined.
Definition at line 165 of file AnasaziStatusTestResNorm.hpp.
|
inline |
Return the residual norm used by the status test.
Definition at line 171 of file AnasaziStatusTestResNorm.hpp.
|
inline |
Instruct test to scale norms by eigenvalue estimates (relative scale). This also resets the test status to Undefined.
Definition at line 176 of file AnasaziStatusTestResNorm.hpp.
|
inline |
Returns true if the test scales the norms by the eigenvalue estimates (relative scale).
Definition at line 182 of file AnasaziStatusTestResNorm.hpp.
|
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 193 of file AnasaziStatusTestResNorm.hpp.
|
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 204 of file AnasaziStatusTestResNorm.hpp.
|
virtual |
Output formatted description of stopping test to output stream.
Implements Anasazi::StatusTest< ScalarType, MV, OP >.
Definition at line 292 of file AnasaziStatusTestResNorm.hpp.