, between outer iterations.
More...
#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 ostream & | print (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. | |
Private Attributes | |
| NOX::StatusTest::StatusType | status |
| Status | |
| Teuchos::RCP < NOX::Abstract::Vector > | updateVectorPtr |
| Vector containing the update for the current outer iteration. | |
| NOX::Abstract::Vector::NormType | normType |
| Type of norm to use. | |
| ScaleType | scaleType |
| Scaling to use. | |
| double | tolerance |
| Tolerance value specified by user in constructor. | |
| double | normUpdate |
| Norm of the update to be compared to trueTolerance. | |
, between outer iterations.
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
and NOX::StatusTest::Uncoverged otherwise. Here
represents the norm of
and
represents the tolerance. We define:
where
is the solution vector of the
-th nonlinear iterate.
Let
denote an optional scale factor defined as
if sType in the constructor is NOX::NormF::Scaled, and
if sType in the constructor is NOX::NormF::Unscaled.
Then
is defined as follows:
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,
is set to the tolerance in the constructor, i.e.,
Definition at line 119 of file NOX_StatusTest_NormUpdate.H.
Type that determines whether to scale the norm by the problem size.
Definition at line 124 of file NOX_StatusTest_NormUpdate.H.
| NormUpdate::NormUpdate | ( | double | tolerance, | |
| NOX::Abstract::Vector::NormType | ntype, | |||
| ScaleType | stype = Scaled | |||
| ) |
Constructor for absolute norm.
This constructor defaults to the Absolute tolerance type.
Definition at line 52 of file NOX_StatusTest_NormUpdate.C.
References NOX::StatusTest::Unevaluated.
| NormUpdate::NormUpdate | ( | double | tolerance, | |
| ScaleType | stype = Scaled | |||
| ) |
Constructor for absolute norm.
This constructor defaults to the Absolute ToleranceType and TWO NormType.
Definition at line 61 of file NOX_StatusTest_NormUpdate.C.
| NormUpdate::~NormUpdate | ( | ) | [virtual] |
| StatusType NormUpdate::checkStatus | ( | const NOX::Solver::Generic & | problem, | |
| NOX::StatusTest::CheckType | checkType | |||
| ) | [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.
Definition at line 75 of file NOX_StatusTest_NormUpdate.C.
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::StatusTest::None, normType, normUpdate, Scaled, scaleType, status, tolerance, NOX::Abstract::Vector::TwoNorm, NOX::StatusTest::Unconverged, NOX::StatusTest::Unevaluated, and updateVectorPtr.
| StatusType NormUpdate::getStatus | ( | ) | const [virtual] |
Return the result of the most recent checkStatus call.
Implements NOX::StatusTest::Generic.
Definition at line 134 of file NOX_StatusTest_NormUpdate.C.
References status.
| ostream & NormUpdate::print | ( | ostream & | stream, | |
| int | indent = 0 | |||
| ) | const [virtual] |
Output formatted description of stopping test to output stream.
Implements NOX::StatusTest::Generic.
Definition at line 139 of file NOX_StatusTest_NormUpdate.C.
References normUpdate, NOX::Utils::sciformat(), status, and tolerance.
| double NOX::StatusTest::NormUpdate::getNormUpdate | ( | ) | const [virtual] |
Returns the value of the Update-norm computed in the last call to checkStatus.
Definition at line 149 of file NOX_StatusTest_NormUpdate.C.
References normUpdate.
| double NOX::StatusTest::NormUpdate::getTolerance | ( | ) | const [virtual] |
Returns the true tolerance.
Definition at line 154 of file NOX_StatusTest_NormUpdate.C.
References tolerance.
Status
Definition at line 166 of file NOX_StatusTest_NormUpdate.H.
Referenced by checkStatus(), getStatus(), and print().
Teuchos::RCP<NOX::Abstract::Vector> NOX::StatusTest::NormUpdate::updateVectorPtr [private] |
Vector containing the update for the current outer iteration.
Definition at line 169 of file NOX_StatusTest_NormUpdate.H.
Referenced by checkStatus().
Type of norm to use.
Definition at line 172 of file NOX_StatusTest_NormUpdate.H.
Referenced by checkStatus().
Scaling to use.
Definition at line 175 of file NOX_StatusTest_NormUpdate.H.
Referenced by checkStatus().
double NOX::StatusTest::NormUpdate::tolerance [private] |
Tolerance value specified by user in constructor.
Definition at line 178 of file NOX_StatusTest_NormUpdate.H.
Referenced by checkStatus(), getTolerance(), and print().
double NOX::StatusTest::NormUpdate::normUpdate [private] |
Norm of the update to be compared to trueTolerance.
Definition at line 181 of file NOX_StatusTest_NormUpdate.H.
Referenced by checkStatus(), getNormUpdate(), and print().
1.5.9