NOX
Development
|
Takes n Iterations before declaring convergence. More...
#include <NOX_StatusTest_NStep.H>
Public Member Functions | |
NStep (int numberOfStepsForConvergence, int numberOfNonlinearSolvesInRampingPhase=0, int rampingPhaseNumberOfStepsForConvergence=10, const NOX::Utils *u=NULL) | |
Ctor. More... | |
virtual NOX::StatusTest::StatusType | checkStatus (const NOX::Solver::Generic &problem, NOX::StatusTest::CheckType checkType) |
Test 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. | |
Public Member Functions inherited from NOX::StatusTest::Generic | |
Generic () | |
Constructor. | |
virtual | ~Generic () |
Destructor. | |
Takes n Iterations before declaring convergence.
This test is used to control an N-step Newton method. The test declares convergence once n nonlinear iterations have been taken. Optionally, an initial phase with a different number of steps can be taken.
This is used where the time steps in a transient method are small enough that the step is essentially linear. The typical use case is to start with some initial transient run and take enough Newton steps to converge to an accurate solutions. After a few time steps, then switch over to a 1-Newton step per time step.
NOX::StatusTest::NStep::NStep | ( | int | numberOfStepsForConvergence, |
int | numberOfNonlinearSolvesInRampingPhase = 0 , |
||
int | rampingPhaseNumberOfStepsForConvergence = 10 , |
||
const NOX::Utils * | u = NULL |
||
) |
Ctor.
[in] | numberOfStepsForConvergence | Number of nonlinear iterations to take until convergence. |
[in] | numberOfNonlinearSolvesInRampingPhase | Number of nonlinear solves in an initial ramping phase. During the ramping phase, convergenc will be declared after using a number of nonlinear steps equal to rampingPhaseNumberOfStepsForConvergence. |
[in] | rampingPhaseNumberOfStepsForConvergence | Test will declaare convergence in the ramping phase after this number of time steps. |
References NOX::StatusTest::Unconverged.
|
virtual |
Test the stopping criterion
The test can (and should, if possible) be skipped if checkType is NOX::StatusType::None. If the test is skipped, then the status should be set to NOX::StatusTest::Unevaluated.
Implements NOX::StatusTest::Generic.
References NOX::StatusTest::Converged, NOX::Solver::Generic::getNumIterations(), NOX::StatusTest::None, NOX::StatusTest::Unconverged, and NOX::StatusTest::Unevaluated.