Class xlifepp::StatusTestResNorm#

template<class ScalarType, class MV, class OP>
class StatusTestResNorm : public xlifepp::StatusTest<ScalarType, MV, OP>#

Inheritence diagram for xlifepp::StatusTestResNorm:

digraph { graph [bgcolor="#00000000"] node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2] edge [color="#1414CE"] "2" [label="xlifepp::StatusTest< ScalarType, MV, OP >" tooltip="xlifepp::StatusTest< ScalarType, MV, OP >"] "1" [label="xlifepp::StatusTestResNorm< ScalarType, MV, OP >" tooltip="xlifepp::StatusTestResNorm< ScalarType, MV, OP >" fillcolor="#BFBFBF"] "1" -> "2" [dir=forward tooltip="public-inheritance"] }

Collaboration diagram for xlifepp::StatusTestResNorm:

digraph { graph [bgcolor="#00000000"] node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2] edge [color="#1414CE"] "3" [label="xlifepp::NumTraits< ScalarType >" tooltip="xlifepp::NumTraits< ScalarType >"] "6" [label="std::vector< T >" tooltip="std::vector< T >"] "5" [label="std::vector< int >" tooltip="std::vector< int >"] "4" [label="xlifepp::NumTraits< K >" tooltip="xlifepp::NumTraits< K >"] "2" [label="xlifepp::StatusTest< ScalarType, MV, OP >" tooltip="xlifepp::StatusTest< ScalarType, MV, OP >"] "1" [label="xlifepp::StatusTestResNorm< ScalarType, MV, OP >" tooltip="xlifepp::StatusTestResNorm< ScalarType, MV, OP >" fillcolor="#BFBFBF"] "3" -> "4" [dir=forward tooltip="template-instance"] "5" -> "6" [dir=forward tooltip="template-instance"] "1" -> "2" [dir=forward tooltip="public-inheritance"] "1" -> "3" [dir=forward tooltip="usage"] "1" -> "5" [dir=forward tooltip="usage"] }

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:

Print methods

virtual std::ostream &print(std::ostream &os, int indent = 0) const#

Output formatted description of stopping test to output stream.

inline virtual PrintStream &print(PrintStream &os, int indent = 0) const#

Output formatted description of stopping test to output stream.

Constructors/destructors

StatusTestResNorm(typename NumTraits<ScalarType>::RealScalar tol, int quorum = -1, ResType whichNorm = _resOrth, bool scaled = true, bool throwExceptionOnNaN = true)#

Constructor.

inline virtual ~StatusTestResNorm()#

Destructor.

Status methods

virtual TestStatus checkStatus(EigenSolver<ScalarType, MV, OP> *solver)#

Check status as defined by test.

Returns:

TestStatus indicating whether the test passed or failed.

inline virtual TestStatus getStatus() const#

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

inline virtual std::vector<int> whichVecs() const#

Get the indices for the vectors that passed the test.

inline virtual int howMany() const#

Get the number of vectors that passed the test.

Accessor methods

inline void setQuorum(int quorum)#

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.

inline int getQuorum() const#

Get quorum.

inline void setTolerance(typename NumTraits<ScalarType>::RealScalar tol)#

Set tolerance.

This also resets the test status to _undefined.

inline NumTraits<ScalarType>::RealScalar getTolerance()#

Get tolerance.

inline void setWhichNorm(ResType whichNorm)#

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

This also resets the test status to _undefined.

inline ResType getWhichNorm()#

Return the residual norm used by the status test.

inline void setScale(bool relscale)#

Instruct test to scale norms by eigenvalue estimates (relative scale).

This also resets the test status to _undefined.

inline bool getScale()#

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

Reset methods

inline virtual void reset()#

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.

inline virtual void clearStatus()#

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.

Public Types

enum ResType#

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

Values:

enumerator _resOrth#
enumerator _res2Norm#
enumerator _ritzRes2Norm#