Belos Package Browser (Single Doxygen Collection) Development
Public Types
Belos::LSQRStatusTest< ScalarType, MV, OP > Class Template Reference

#include <BelosLSQRStatusTest.hpp>

Inheritance diagram for Belos::LSQRStatusTest< ScalarType, MV, OP >:
Inheritance graph
[legend]

List of all members.

Public Types

typedef Teuchos::ScalarTraits
< ScalarType > 
SCT
typedef SCT::magnitudeType MagnitudeType
typedef Belos::MultiVecTraits
< ScalarType, MV > 
MVT

Constructor/Destructor.

 LSQRStatusTest (MagnitudeType condMax=0.0, int term_iter_max=1, MagnitudeType rel_rhs_err=0.0, MagnitudeType rel_mat_err=0.0)
 Constructor.
virtual ~LSQRStatusTest ()
 Destructor.

Status method

Belos::StatusType checkStatus (Belos::Iteration< ScalarType, MV, OP > *iSolver)
 Check convergence status of the iterative solver: Unconverged, Converged, Failed.
Belos::StatusType getStatus () const
 Return the result of the most recent CheckStatus call.

Reset methods

void reset ()
 Resets the status test to the initial internal state.
int setCondLim (MagnitudeType condMax)
 Set the tolerances.
int setTermIterMax (int term_iter_max)
int setRelRhsErr (MagnitudeType rel_rhs_err)
int setRelMatErr (MagnitudeType rel_mat_err)

Accessor methods

MagnitudeType getCondMaxLim () const
 Returns the value of the upper limit of the condition number of Abar set in the constructor.
int getTermIterMax () const
 Returns the number of successful convergent iterations required set in the constructor.
MagnitudeType getRelRhsErr () const
 Returns the value of the estimate of the relative error in the data defining b set in the constructor.
MagnitudeType getMatErr () const
 Returns the value of the estimate of the relative error in the data defining A set in the constructor.
MagnitudeType getMatCondNum () const
 Returns the value of the observed condition number of Abar.
MagnitudeType getMatNorm () const
 Returns the value of the observed (Frobenius) norm of A.
int getTermIter () const
 !Returns the current number of successful iterations from the most recent StatusTest call.
MagnitudeType getResidNorm () const
 Returns the value of the observed norm of the residual r = b-Ax.
MagnitudeType getLSResidNorm () const
 Returns the value of the observed norm of the Least Squares residual A^T r.

Print methods

void print (std::ostream &os, int indent=0) const
 Output formatted description of stopping test to output stream.
void printStatus (std::ostream &os, Belos::StatusType type) const
 Print message for each status specific to this stopping test.

Misc.

Belos::StatusType firstCallCheckStatusSetup (Belos::Iteration< ScalarType, MV, OP > *iSolver)
 Called in checkStatus exactly once, on the first call to checkStatus.

Overridden from Teuchos::Describable

std::string description () const
 Method to return description of the maximum iteration status test.

Private data members.

MagnitudeType condMax_
 Upper limit of condition number of Abar.
int term_iter_max_
 How many iterations in a row a passing test for convergence is required.
MagnitudeType rel_rhs_err_
 Error in data defining b.
MagnitudeType rel_mat_err_
 Error in data defining A.
MagnitudeType rcondMin_
 One of the tolerances defining convergence, the reciprocal of condMax_ or, if that is zero, machine epsilon.
Belos::StatusType status_
 Status.
int term_iter_
MagnitudeType matCondNum_
MagnitudeType matNorm_
MagnitudeType resNorm_
MagnitudeType matResNorm_

Detailed Description

template<class ScalarType, class MV, class OP>
class Belos::LSQRStatusTest< ScalarType, MV, OP >

Definition at line 65 of file BelosLSQRStatusTest.hpp.


Member Typedef Documentation

template<class ScalarType , class MV , class OP >
typedef Teuchos::ScalarTraits<ScalarType> Belos::LSQRStatusTest< ScalarType, MV, OP >::SCT

Definition at line 70 of file BelosLSQRStatusTest.hpp.

template<class ScalarType , class MV , class OP >
typedef SCT::magnitudeType Belos::LSQRStatusTest< ScalarType, MV, OP >::MagnitudeType

Definition at line 71 of file BelosLSQRStatusTest.hpp.

template<class ScalarType , class MV , class OP >
typedef Belos::MultiVecTraits<ScalarType,MV> Belos::LSQRStatusTest< ScalarType, MV, OP >::MVT

Definition at line 72 of file BelosLSQRStatusTest.hpp.


Constructor & Destructor Documentation

template<class ScalarType , class MV , class OP >
LSQRStatusTest::LSQRStatusTest ( MagnitudeType  condMax = 0.0,
int  term_iter_max = 1,
MagnitudeType  rel_rhs_err = 0.0,
MagnitudeType  rel_mat_err = 0.0 
)

Constructor.

The constructor has four optional arguments, specifying the maximum observed condition number of Abar, the number of successive convergent iterations, an estimate of the relative error in the data defining the right-hand side (b), and an estimate of the relative error in the data defining the coefficinet matrix (A). The default termIterMax is 1, and the other three parameters default to 0. The defaults specified in LSQRSolMgr are more realistic.

Definition at line 241 of file BelosLSQRStatusTest.hpp.

template<class ScalarType , class MV , class OP >
LSQRStatusTest::~LSQRStatusTest ( ) [virtual]

Destructor.

Definition at line 259 of file BelosLSQRStatusTest.hpp.


Member Function Documentation

template<class ScalarType , class MV , class OP >
Belos::StatusType LSQRStatusTest::checkStatus ( Belos::Iteration< ScalarType, MV, OP > *  iSolver) [virtual]

Check convergence status of the iterative solver: Unconverged, Converged, Failed.

This method checks if the convergence criteria are met using the current information from the iterative solver.

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

Definition at line 269 of file BelosLSQRStatusTest.hpp.

template<class ScalarType , class MV , class OP >
Belos::StatusType Belos::LSQRStatusTest< ScalarType, MV, OP >::getStatus ( ) const [inline, virtual]

Return the result of the most recent CheckStatus call.

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

Definition at line 101 of file BelosLSQRStatusTest.hpp.

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

Resets the status test to the initial internal state.

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

Definition at line 263 of file BelosLSQRStatusTest.hpp.

template<class ScalarType , class MV , class OP >
int Belos::LSQRStatusTest< ScalarType, MV, OP >::setCondLim ( MagnitudeType  condMax) [inline]

Set the tolerances.

Definition at line 112 of file BelosLSQRStatusTest.hpp.

template<class ScalarType , class MV , class OP >
int Belos::LSQRStatusTest< ScalarType, MV, OP >::setTermIterMax ( int  term_iter_max) [inline]

Definition at line 117 of file BelosLSQRStatusTest.hpp.

template<class ScalarType , class MV , class OP >
int Belos::LSQRStatusTest< ScalarType, MV, OP >::setRelRhsErr ( MagnitudeType  rel_rhs_err) [inline]

Definition at line 123 of file BelosLSQRStatusTest.hpp.

template<class ScalarType , class MV , class OP >
int Belos::LSQRStatusTest< ScalarType, MV, OP >::setRelMatErr ( MagnitudeType  rel_mat_err) [inline]

Definition at line 127 of file BelosLSQRStatusTest.hpp.

template<class ScalarType , class MV , class OP >
MagnitudeType Belos::LSQRStatusTest< ScalarType, MV, OP >::getCondMaxLim ( ) const [inline]

Returns the value of the upper limit of the condition number of Abar set in the constructor.

Definition at line 137 of file BelosLSQRStatusTest.hpp.

template<class ScalarType , class MV , class OP >
int Belos::LSQRStatusTest< ScalarType, MV, OP >::getTermIterMax ( ) const [inline]

Returns the number of successful convergent iterations required set in the constructor.

Definition at line 140 of file BelosLSQRStatusTest.hpp.

template<class ScalarType , class MV , class OP >
MagnitudeType Belos::LSQRStatusTest< ScalarType, MV, OP >::getRelRhsErr ( ) const [inline]

Returns the value of the estimate of the relative error in the data defining b set in the constructor.

Definition at line 143 of file BelosLSQRStatusTest.hpp.

template<class ScalarType , class MV , class OP >
MagnitudeType Belos::LSQRStatusTest< ScalarType, MV, OP >::getMatErr ( ) const [inline]

Returns the value of the estimate of the relative error in the data defining A set in the constructor.

Definition at line 146 of file BelosLSQRStatusTest.hpp.

template<class ScalarType , class MV , class OP >
MagnitudeType Belos::LSQRStatusTest< ScalarType, MV, OP >::getMatCondNum ( ) const [inline]

Returns the value of the observed condition number of Abar.

Definition at line 149 of file BelosLSQRStatusTest.hpp.

template<class ScalarType , class MV , class OP >
MagnitudeType Belos::LSQRStatusTest< ScalarType, MV, OP >::getMatNorm ( ) const [inline]

Returns the value of the observed (Frobenius) norm of A.

Definition at line 152 of file BelosLSQRStatusTest.hpp.

template<class ScalarType , class MV , class OP >
int Belos::LSQRStatusTest< ScalarType, MV, OP >::getTermIter ( ) const [inline]

!Returns the current number of successful iterations from the most recent StatusTest call.

Definition at line 155 of file BelosLSQRStatusTest.hpp.

template<class ScalarType , class MV , class OP >
MagnitudeType Belos::LSQRStatusTest< ScalarType, MV, OP >::getResidNorm ( ) const [inline]

Returns the value of the observed norm of the residual r = b-Ax.

Definition at line 158 of file BelosLSQRStatusTest.hpp.

template<class ScalarType , class MV , class OP >
MagnitudeType Belos::LSQRStatusTest< ScalarType, MV, OP >::getLSResidNorm ( ) const [inline]

Returns the value of the observed norm of the Least Squares residual A^T r.

Definition at line 161 of file BelosLSQRStatusTest.hpp.

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

Output formatted description of stopping test to output stream.

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

Definition at line 394 of file BelosLSQRStatusTest.hpp.

template<class ScalarType , class MV , class OP >
void LSQRStatusTest::printStatus ( std::ostream &  os,
Belos::StatusType  type 
) const [virtual]

Print message for each status specific to this stopping test.

Reimplemented from Belos::StatusTest< ScalarType, MV, OP >.

Definition at line 404 of file BelosLSQRStatusTest.hpp.

template<class ScalarType , class MV , class OP >
Belos::StatusType Belos::LSQRStatusTest< ScalarType, MV, OP >::firstCallCheckStatusSetup ( Belos::Iteration< ScalarType, MV, OP > *  iSolver)

Called in checkStatus exactly once, on the first call to checkStatus.

template<class ScalarType , class MV , class OP >
std::string Belos::LSQRStatusTest< ScalarType, MV, OP >::description ( ) const [inline, virtual]

Method to return description of the maximum iteration status test.

Reimplemented from Teuchos::Describable.

Definition at line 188 of file BelosLSQRStatusTest.hpp.


Member Data Documentation

template<class ScalarType , class MV , class OP >
MagnitudeType Belos::LSQRStatusTest< ScalarType, MV, OP >::condMax_ [private]

Upper limit of condition number of Abar.

Definition at line 202 of file BelosLSQRStatusTest.hpp.

template<class ScalarType , class MV , class OP >
int Belos::LSQRStatusTest< ScalarType, MV, OP >::term_iter_max_ [private]

How many iterations in a row a passing test for convergence is required.

Definition at line 205 of file BelosLSQRStatusTest.hpp.

template<class ScalarType , class MV , class OP >
MagnitudeType Belos::LSQRStatusTest< ScalarType, MV, OP >::rel_rhs_err_ [private]

Error in data defining b.

Definition at line 208 of file BelosLSQRStatusTest.hpp.

template<class ScalarType , class MV , class OP >
MagnitudeType Belos::LSQRStatusTest< ScalarType, MV, OP >::rel_mat_err_ [private]

Error in data defining A.

Definition at line 211 of file BelosLSQRStatusTest.hpp.

template<class ScalarType , class MV , class OP >
MagnitudeType Belos::LSQRStatusTest< ScalarType, MV, OP >::rcondMin_ [private]

One of the tolerances defining convergence, the reciprocal of condMax_ or, if that is zero, machine epsilon.

Definition at line 214 of file BelosLSQRStatusTest.hpp.

template<class ScalarType , class MV , class OP >
Belos::StatusType Belos::LSQRStatusTest< ScalarType, MV, OP >::status_ [private]

Status.

Definition at line 217 of file BelosLSQRStatusTest.hpp.

template<class ScalarType , class MV , class OP >
int Belos::LSQRStatusTest< ScalarType, MV, OP >::term_iter_ [private]

Definition at line 221 of file BelosLSQRStatusTest.hpp.

template<class ScalarType , class MV , class OP >
MagnitudeType Belos::LSQRStatusTest< ScalarType, MV, OP >::matCondNum_ [private]

Definition at line 224 of file BelosLSQRStatusTest.hpp.

template<class ScalarType , class MV , class OP >
MagnitudeType Belos::LSQRStatusTest< ScalarType, MV, OP >::matNorm_ [private]

Definition at line 227 of file BelosLSQRStatusTest.hpp.

template<class ScalarType , class MV , class OP >
MagnitudeType Belos::LSQRStatusTest< ScalarType, MV, OP >::resNorm_ [private]

Definition at line 230 of file BelosLSQRStatusTest.hpp.

template<class ScalarType , class MV , class OP >
MagnitudeType Belos::LSQRStatusTest< ScalarType, MV, OP >::matResNorm_ [private]

Definition at line 233 of file BelosLSQRStatusTest.hpp.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines