NOX
Development
|
Convergence test based on the weighted root mean square norm fo the solution update between iterations. More...
#include <NOX_StatusTest_NormWRMS.H>
Public Member Functions | |
NormWRMS (double rtol, double atol, double BDFMultiplier=1.0, double tolerance=1.0, double alpha=1.0, double beta=0.5, bool disable_implicit_weighting=true) | |
Constructor where ATOL is a scalar. | |
NormWRMS (double rtol, const Teuchos::RCP< const NOX::Abstract::Vector > &atol, double BDFMultiplier=1.0, double tolerance=1.0, double alpha=1.0, double beta=0.5, bool disable_implicit_weighting=true) | |
Constructor where ATOL is a vector. | |
virtual | ~NormWRMS () |
Destructor. | |
virtual StatusType | checkStatus (const NOX::Solver::Generic &problem, NOX::StatusTest::CheckType checkType) |
Test the stopping criterion More... | |
virtual 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 | getNormWRMS () const |
Returns the value of WRMS norm. | |
virtual double | getTolerance () const |
Returns the requested tolerance set in the constructor. | |
virtual double | getRTOL () const |
Returns the realative tolerance set in the constructor. | |
virtual double | getATOL () const |
Returns the absolute tolerance set in the constructor. If ATOL is a vector, this will return a value of -1.0. | |
virtual double | getBDFMultiplier () const |
Returns the value of the BDFMultiplier set in the constructor. | |
virtual double | getAlpha () const |
Returns the value of 'alpha' set in the constructor. | |
virtual double | getBeta () const |
Returns the value of 'beta' set in the constructor. | |
virtual bool | getDisableImplicitWeighting () const |
Returns true if implicit weighting is disabled during norm computation. | |
Public Member Functions inherited from NOX::StatusTest::Generic | |
Generic () | |
Constructor. | |
virtual | ~Generic () |
Destructor. | |
Convergence test based on the weighted root mean square norm fo the solution update between iterations.
` If the number of iterations is zero, then the status is set to NOX::StatusTest::Unconverged and returned. (Also, #value is set to 1.0e+12.)
Otherwise, returns NOX::StatusTest::Converged if the three criteria listed below are satisfied. Note that use of Criteria #2 and #3 depend on the options set in the solver.
Weigthed root mean square norm is less than a specified tolerance:
where
Here:
rtol
in the constructoratol
in the constructor. This can be a vector or a scalar.BDFMultiplier
in the constructor.If a line search based solver is used, the line search step size, , must be greater than a specified step size value, :
The motivation for this test is to avoid detecting stagnation when in fact the true problem is that the step size is just small.
The value of is set in the constructor via the argument alpha
. Setting to zero effectively eliminates this part of the test.
The achieved linear solver tolerance, for nonlinear iteration , must be less than a specified tolerance value, ; i.e.,
The motivation for this test is to avoid detecting stagnation when in fact the true problem is that the linear solve tolerance was not accurate enough.
The value of is set in the constructor via the argument beta
. Setting to 1.0 effectively eliminates this part of the test.
References:
K. E. Brennam, S. L. Cambell, L. R. Petzold, Numerical Solution of Initial-Value Problems in Differential-Algebraic Equations, Classics in Applied Mathematics 14, SIAM 1996.
G. D. Byrne and A. C. Hindmarch, PVODE, an ODE Solver for Parallel Computers, Technical Report UCRL-JC-132361, Rev. 1, Center for Applied Scientific Computing (CASC), Lawrence Livermore National Lab, May 1999.
|
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::abs(), NOX::Abstract::Vector::clone(), NOX::StatusTest::Converged, Teuchos::ParameterList::get(), NOX::Abstract::ImplicitWeighting::getImplicitWeighting(), NOX::Solver::Generic::getList(), NOX::Solver::Generic::getNumIterations(), NOX::Solver::Generic::getPreviousSolutionGroup(), NOX::Abstract::Group::getScaledX(), NOX::Solver::Generic::getSolutionGroup(), NOX::Abstract::Vector::init(), Teuchos::is_null(), Teuchos::ParameterList::isSublist(), NOX::Abstract::Vector::length(), NOX::StatusTest::None, nonnull(), NOX::Abstract::Vector::reciprocal(), NOX::Abstract::Vector::scale(), NOX::Abstract::ImplicitWeighting::setImplicitWeighting(), NOX::ShapeCopy, Teuchos::ParameterList::sublist(), NOX::StatusTest::Unconverged, NOX::StatusTest::Unevaluated, and NOX::Abstract::Vector::update().