NOX
Development
|
Failure test based on the convergence rate between nonlinear iterations. More...
#include <NOX_StatusTest_Stagnation.H>
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. | |
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 by a specified tolerance for n consecutive iterations. In other words, if
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:
NOX::StatusTest::Stagnation::Stagnation | ( | int | n = 50 , |
double | tol = 1.0 |
||
) |
Constructor.
n | - Number of consecutive nonlinear iterations |
tol | - Tolerance for stagnation test |
References NOX::StatusTest::Unevaluated.
|
virtual |
Tests the stopping criterion.
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.