Class xlifepp::StatusTestWithOrdering#

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

Inheritence diagram for xlifepp::StatusTestWithOrdering:

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::StatusTestWithOrdering< ScalarType, MV, OP >" tooltip="xlifepp::StatusTestWithOrdering< ScalarType, MV, OP >" fillcolor="#BFBFBF"] "1" -> "2" [dir=forward tooltip="public-inheritance"] }

Collaboration diagram for xlifepp::StatusTestWithOrdering:

digraph { graph [bgcolor="#00000000"] node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2] edge [color="#1414CE"] "14" [label="CheckingPolicy< StoragePolicy< T >::StoredType >" tooltip="CheckingPolicy< StoragePolicy< T >::StoredType >"] "9" [label="CheckingPolicy< StoragePolicy< xlifepp::SortManager< typename xlifepp::NumTraits< ScalarType >::RealScalar > >::StoredType >" tooltip="CheckingPolicy< StoragePolicy< xlifepp::SortManager< typename xlifepp::NumTraits< ScalarType >::RealScalar > >::StoredType >"] "18" [label="CheckingPolicy< StoragePolicy< xlifepp::StatusTest< ScalarType, MV, OP > >::StoredType >" tooltip="CheckingPolicy< StoragePolicy< xlifepp::StatusTest< ScalarType, MV, OP > >::StoredType >"] "10" [label="ConversionPolicy" tooltip="ConversionPolicy"] "13" [label="OwnershipPolicy< StoragePolicy< T >::InitPointerType >" tooltip="OwnershipPolicy< StoragePolicy< T >::InitPointerType >"] "8" [label="OwnershipPolicy< StoragePolicy< xlifepp::SortManager< typename xlifepp::NumTraits< ScalarType >::RealScalar > >::InitPointerType >" tooltip="OwnershipPolicy< StoragePolicy< xlifepp::SortManager< typename xlifepp::NumTraits< ScalarType >::RealScalar > >::InitPointerType >"] "17" [label="OwnershipPolicy< StoragePolicy< xlifepp::StatusTest< ScalarType, MV, OP > >::InitPointerType >" tooltip="OwnershipPolicy< StoragePolicy< xlifepp::StatusTest< ScalarType, MV, OP > >::InitPointerType >"] "6" [label="xlifepp::SmartPtr< xlifepp::SortManager< typename xlifepp::NumTraits< ScalarType >::RealScalar > >" tooltip="xlifepp::SmartPtr< xlifepp::SortManager< typename xlifepp::NumTraits< ScalarType >::RealScalar > >"] "15" [label="xlifepp::SmartPtr< xlifepp::StatusTest< ScalarType, MV, OP > >" tooltip="xlifepp::SmartPtr< xlifepp::StatusTest< ScalarType, MV, OP > >"] "12" [label="StoragePolicy< T >" tooltip="StoragePolicy< T >"] "7" [label="StoragePolicy< xlifepp::SortManager< typename xlifepp::NumTraits< ScalarType >::RealScalar > >" tooltip="StoragePolicy< xlifepp::SortManager< typename xlifepp::NumTraits< ScalarType >::RealScalar > >"] "16" [label="StoragePolicy< xlifepp::StatusTest< ScalarType, MV, OP > >" tooltip="StoragePolicy< xlifepp::StatusTest< ScalarType, MV, OP > >"] "4" [label="std::vector< T >" tooltip="std::vector< T >"] "5" [label="std::vector< MagnitudeType >" tooltip="std::vector< MagnitudeType >"] "3" [label="std::vector< int >" tooltip="std::vector< int >"] "11" [label="xlifepp::SmartPtr< T, OwnershipPolicy, ConversionPolicy, CheckingPolicy, StoragePolicy, ConstnessPolicy >" tooltip="xlifepp::SmartPtr< T, OwnershipPolicy, ConversionPolicy, CheckingPolicy, StoragePolicy, ConstnessPolicy >"] "2" [label="xlifepp::StatusTest< ScalarType, MV, OP >" tooltip="xlifepp::StatusTest< ScalarType, MV, OP >"] "1" [label="xlifepp::StatusTestWithOrdering< ScalarType, MV, OP >" tooltip="xlifepp::StatusTestWithOrdering< ScalarType, MV, OP >" fillcolor="#BFBFBF"] "6" -> "7" [dir=forward tooltip="public-inheritance"] "6" -> "8" [dir=forward tooltip="public-inheritance"] "6" -> "9" [dir=forward tooltip="public-inheritance"] "6" -> "10" [dir=forward tooltip="public-inheritance"] "6" -> "11" [dir=forward tooltip="template-instance"] "15" -> "16" [dir=forward tooltip="public-inheritance"] "15" -> "17" [dir=forward tooltip="public-inheritance"] "15" -> "18" [dir=forward tooltip="public-inheritance"] "15" -> "10" [dir=forward tooltip="public-inheritance"] "15" -> "11" [dir=forward tooltip="template-instance"] "5" -> "4" [dir=forward tooltip="template-instance"] "3" -> "4" [dir=forward tooltip="template-instance"] "11" -> "12" [dir=forward tooltip="public-inheritance"] "11" -> "13" [dir=forward tooltip="public-inheritance"] "11" -> "14" [dir=forward tooltip="public-inheritance"] "11" -> "10" [dir=forward tooltip="public-inheritance"] "1" -> "2" [dir=forward tooltip="public-inheritance"] "1" -> "3" [dir=forward tooltip="usage"] "1" -> "5" [dir=forward tooltip="usage"] "1" -> "6" [dir=forward tooltip="usage"] "1" -> "15" [dir=forward tooltip="usage"] }

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:

  • the norm to be used: 2-norm or OrthoManager::norm() or getRitzRes2Norms()

  • the scale: absolute or relative to magnitude of Ritz value

  • the quorum: the number of vectors required for the test to evaluate as _passed.

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

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

StatusTestWithOrdering(SmartPtr<StatusTest<ScalarType, MV, OP>> test, SmartPtr<SortManager<typename NumTraits<ScalarType>::RealScalar>> sorter, int quorum = -1)#

Constructor.

inline virtual ~StatusTestWithOrdering()#

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.

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.

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.

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.

inline void setAuxVals(const std::vector<typename NumTraits<ScalarType>::RealScalar> &vals)#

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.

inline void setAuxVals(const std::vector<typename NumTraits<ScalarType>::RealScalar> &rvals, const std::vector<typename NumTraits<ScalarType>::RealScalar> &ivals)#

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.

inline void getAuxVals(std::vector<typename NumTraits<ScalarType>::RealScalar> &rvals, std::vector<typename NumTraits<ScalarType>::RealScalar> &ivals) const#

Get the auxiliary eigenvalues.

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