NOX  Development
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | List of all members
NOX::StatusTest::Stagnation Class Reference

Failure test based on the convergence rate between nonlinear iterations. More...

#include <NOX_StatusTest_Stagnation.H>

Inheritance diagram for NOX::StatusTest::Stagnation:
Inheritance graph
[legend]
Collaboration diagram for NOX::StatusTest::Stagnation:
Collaboration graph
[legend]

Public Member Functions

 Stagnation (int n=50, double tol=1.0)
 Constructor. More...
 
virtual ~Stagnation ()
 Destructor.
 
virtual NOX::StatusTest::StatusType checkStatus (const NOX::Solver::Generic &problem, NOX::StatusTest::CheckType checkType)
 Tests the stopping criterion. More...
 
virtual NOX::StatusTest::StatusType getStatus () const
 Return the result of the most recent checkStatus call.
 
virtual std::ostream & print (std::ostream &stream, int indent=0) const
 Output formatted description of stopping test to output stream.
 
virtual int getMaxNumSteps () const
 Returns the used specified number of steps that can consecutively fail the tolerance test before the test returns a failed status.
 
virtual int getCurrentNumSteps () const
 Returns the current number of steps that have consecutively failed the tolerance test.
 
virtual double getTolerance () const
 Returns the user specified tolerance.
 
virtual double getConvRate () const
 Returns the current convergence rate.
 
- Public Member Functions inherited from NOX::StatusTest::Generic
 Generic ()
 Constructor.
 
virtual ~Generic ()
 Destructor.
 

Detailed Description

Failure test based on the convergence rate between nonlinear iterations.

This status test returns NOX::StatusTest::Failed if we fail to reduce the norm of $ F$ by a specified tolerance for n consecutive iterations. In other words, if

\[ \frac{\| F_k \|}{\| F_{k-1} \|} \geq {\rm tolerance}\]

for n consecutive iterations, the status is set to NOX::StatusTest::Failed and returned. Otherwise, the status is set to NOX::StatusTest::Uncoverged and returned. Both n and the tolerance are specified in the constructor, by n and tol, respectively.

Based on experience the following values are recommended:

Constructor & Destructor Documentation

NOX::StatusTest::Stagnation::Stagnation ( int  n = 50,
double  tol = 1.0 
)

Constructor.

Parameters
n- Number of consecutive nonlinear iterations
tol- Tolerance for stagnation test

References NOX::StatusTest::Unevaluated.

Member Function Documentation

NOX::StatusTest::StatusType NOX::StatusTest::Stagnation::checkStatus ( const NOX::Solver::Generic problem,
NOX::StatusTest::CheckType  checkType 
)
virtual

Tests the stopping criterion.

Note
The nature of this test is such that it must be executed at every nonlinear iteration, so we don't use the checkType argument.

Implements NOX::StatusTest::Generic.

References NOX::StatusTest::Failed, NOX::Abstract::Group::getNormF(), NOX::Solver::Generic::getNumIterations(), NOX::Solver::Generic::getPreviousSolutionGroup(), NOX::Solver::Generic::getSolutionGroup(), and NOX::StatusTest::Unconverged.


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