Belos  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | List of all members
Belos::LSQRStatusTest< ScalarType, MV, OP > Class Template Reference

#include <BelosLSQRStatusTest.hpp>

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

Public Types

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

Public Member Functions

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. More...
 
virtual ~LSQRStatusTest ()
 Destructor. More...
 
Status method
Belos::StatusType checkStatus (Belos::Iteration< ScalarType, MV, OP > *iSolver)
 Check convergence status of the iterative solver: Unconverged, Converged, Failed. More...
 
Belos::StatusType getStatus () const
 Return the result of the most recent CheckStatus call. More...
 
Reset methods
void reset ()
 Resets the status test to the initial internal state. More...
 
int setCondLim (MagnitudeType condMax)
 Set the tolerances. More...
 
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. More...
 
int getTermIterMax () const
 Returns the number of successful convergent iterations required set in the constructor. More...
 
MagnitudeType getRelRhsErr () const
 Returns the value of the estimate of the relative error in the data defining b set in the constructor. More...
 
MagnitudeType getMatErr () const
 Returns the value of the estimate of the relative error in the data defining A set in the constructor. More...
 
MagnitudeType getMatCondNum () const
 Returns the value of the observed condition number of Abar. More...
 
MagnitudeType getMatNorm () const
 Returns the value of the observed (Frobenius) norm of A. More...
 
int getTermIter () const
 !Returns the current number of successful iterations from the most recent StatusTest call. More...
 
MagnitudeType getResidNorm () const
 Returns the value of the observed norm of the residual r = b-Ax. More...
 
MagnitudeType getLSResidNorm () const
 Returns the value of the observed norm of the Least Squares residual A^T r. More...
 
Print methods
void print (std::ostream &os, int indent=0) const
 Output formatted description of stopping test to output stream. More...
 
void printStatus (std::ostream &os, Belos::StatusType type) const
 Print message for each status specific to this stopping test. More...
 
Misc.
Belos::StatusType firstCallCheckStatusSetup (Belos::Iteration< ScalarType, MV, OP > *iSolver)
 Called in checkStatus exactly once, on the first call to checkStatus. More...
 
Overridden from Teuchos::Describable
std::string description () const
 Method to return description of the maximum iteration status test. More...
 
- Public Member Functions inherited from Belos::StatusTest< ScalarType, MV, OP >
 StatusTest ()
 Constructor. More...
 
virtual ~StatusTest ()
 Destructor. More...
 
- Public Member Functions inherited from Teuchos::Describable
virtual void describe (FancyOStream &out, const EVerbosityLevel verbLevel=verbLevel_default) const
 
void describe (std::ostream &out, const EVerbosityLevel verbLevel=verbLevel_default) const
 
virtual ~Describable ()
 
 LabeledObject ()
 
virtual ~LabeledObject ()
 
virtual void setObjectLabel (const std::string &objectLabel)
 
virtual std::string getObjectLabel () const
 
DescribableStreamManipulatorState describe (const Describable &describable, const EVerbosityLevel verbLevel=Describable::verbLevel_default)
 
std::ostream & operator<< (std::ostream &os, const DescribableStreamManipulatorState &d)
 

Additional Inherited Members

- Static Public Attributes inherited from Teuchos::Describable
static const EVerbosityLevel verbLevel_default
 

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
inlinevirtual

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 395 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 405 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
inlinevirtual

Method to return description of the maximum iteration status test.

Reimplemented from Teuchos::Describable.

Definition at line 188 of file BelosLSQRStatusTest.hpp.


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

Generated on Thu Nov 21 2024 09:28:20 for Belos by doxygen 1.8.5