NOX Development
|
Various convergence tests based on the norm of the change in the solution vector,
#include <NOX_StatusTest_NormUpdate.H>
Public Types | |
enum | ScaleType { Unscaled , Scaled } |
Type that determines whether to scale the norm by the problem size. More... | |
Public Member Functions | |
NormUpdate (double tolerance, NOX::Abstract::Vector::NormType ntype, ScaleType stype=Scaled) | |
Constructor for absolute norm. | |
NormUpdate (double tolerance, ScaleType stype=Scaled) | |
Constructor for absolute norm. | |
virtual | ~NormUpdate () |
Destructor. | |
virtual NOX::StatusTest::StatusType | checkStatus (const NOX::Solver::Generic &problem, NOX::StatusTest::CheckType checkType) |
Test the stopping criterion | |
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 double | getNormUpdate () const |
Returns the value of the Update-norm computed in the last call to checkStatus. | |
virtual double | getTolerance () const |
Returns the true tolerance. | |
![]() | |
Generic () | |
Constructor. | |
virtual | ~Generic () |
Destructor. | |
Various convergence tests based on the norm of the change in the solution vector,
If checkStatusEfficiently is called with the type set to NOX::StatusTest::None, then the status is set to NOX::StatusTest::Unevaluated and returned. (Also normUpdate is set to -1.0.)
If checkStatusEfficiently is called on the first iteration, then the status is set to NOX::StatusTest::Unconverged and returned. (Also normUpdate is set to -1.0.)
If checkStatusEfficiently is called on a problem where the solution group does not have F evaluated (i.e., problem.getSolutionGroup().isF() is false), then the status is set to NOX::StatusTest::Unconverged and returned. (Also normUpdate is set to -1.0.)
Finally, we return NOX::StatusTest::Converged if
where
Let
sType
in the constructor is NOX::NormF::Scaled, andsType
in the constructor is NOX::NormF::Unscaled.Then
nType
in the constructor is Abstract::Vector::TWO, then
nType
in the constructor is Abstract::Vector::ONE, then
nType
in the constructor is Abstract::Vector::INF, then
Finally, tolerance
in the constructor, i.e.,
NormUpdate::NormUpdate | ( | double | tolerance, |
NOX::Abstract::Vector::NormType | ntype, | ||
ScaleType | stype = Scaled ) |
Constructor for absolute norm.
This constructor defaults to the Absolute
tolerance type.
Constructor for absolute norm.
This constructor defaults to the Absolute
ToleranceType and TWO
NormType.
|
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::Abstract::Vector::clone(), NOX::StatusTest::Converged, NOX::Solver::Generic::getNumIterations(), NOX::Solver::Generic::getPreviousSolutionGroup(), NOX::Solver::Generic::getSolutionGroup(), NOX::Abstract::Group::getX(), NOX::Abstract::Group::isF(), NOX::Abstract::Vector::length(), NOX::StatusTest::None, Scaled, NOX::Abstract::Vector::TwoNorm, NOX::StatusTest::Unconverged, and NOX::StatusTest::Unevaluated.
|
virtual |
Return the result of the most recent checkStatus call.
Implements NOX::StatusTest::Generic.
|
virtual |
Output formatted description of stopping test to output stream.
Implements NOX::StatusTest::Generic.
References NOX::Utils::sciformat().