NOX Development
Loading...
Searching...
No Matches
NOX::StatusTest Namespace Reference

Status checkers. More...

Classes

class  Combo
 Arbitrary combination of status tests. More...
class  Divergence
 Failure test based on a threshold value of the norm of F. More...
class  Factory
 Factory to build a set of status tests from a parameter list. More...
class  FiniteValue
 Failure test based on whether the norm of a vector has a finite value. More...
class  Generic
 Generic status test to check for convergence or failure of the nonlinear solver. More...
class  MaxIters
 Failure test based on the maximum number of nonlinear solver iterations. More...
class  NormF
 Various convergence tests based on the norm of the residual. More...
class  NormUpdate
 Various convergence tests based on the norm of the change in the solution vector, $ x $, between outer iterations. More...
class  NStep
 Takes n Iterations before declaring convergence. More...
class  RelativeNormF
 Requires reduction in residual norm compared to initial norm. More...
class  Stagnation
 Failure test based on the convergence rate between nonlinear iterations. More...

Enumerations

enum  StatusType { Unevaluated = -2 , Unconverged = 0 , Converged = 1 , Failed = -1 }
 Status type. More...
enum  CheckType { Complete , Minimal , None }
 Type of check that should be done by checkStatus. More...

Functions

std::ostream & operator<< (std::ostream &os, NOX::StatusTest::StatusType type)
Teuchos::RCP< NOX::StatusTest::GenericbuildStatusTests (const std::string &file_name, const NOX::Utils &utils, std::map< std::string, Teuchos::RCP< NOX::StatusTest::Generic > > *tagged_tests=nullptr)
 Nonmember helper function for the NOX::StatusTest::Factory.
Teuchos::RCP< NOX::StatusTest::GenericbuildStatusTests (Teuchos::ParameterList &p, const NOX::Utils &utils, std::map< std::string, Teuchos::RCP< NOX::StatusTest::Generic > > *tagged_tests=nullptr)
 Nonmember helper function for the NOX::StatusTest::Factory.
Teuchos::RCP< LOCA::StatusTest::AbstractbuildStatusTests (const std::string &file_name, const Teuchos::RCP< const LOCA::GlobalData > &globalData, std::map< std::string, Teuchos::RCP< LOCA::StatusTest::Abstract > > *tagged_tests=0)
 Nonmember helper function for the NOX::StatusTest::Factory.
Teuchos::RCP< LOCA::StatusTest::AbstractbuildStatusTests (Teuchos::ParameterList &p, const Teuchos::RCP< const LOCA::GlobalData > &globalData, std::map< std::string, Teuchos::RCP< LOCA::StatusTest::Abstract > > *tagged_tests=0)
 Nonmember helper function for the NOX::StatusTest::Factory.

Accessor Functions

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.

  1. Weigthed root mean square norm is less than a specified tolerance:

    \‍[  ||\delta x^k||_{wrms} < \mbox{tolerance}
\‍]

    where

    \‍[  ||\delta x^k||_{wrms} \equiv C \sqrt{ \frac{1}{N} \sum_{i=1}^N \left( \frac
    {(x^k_i-x^{k-1}_i)}{RTOL |x^{k-1}_i| + ATOL_i} \right) ^2 }
\‍]

    Here:

    • $ x_i^k$ denotes component $ i$ of nonlinear iterate $ k$.
    • $ N$ denotes the number of unknowns
    • $ RTOL$ denotes the relative error tolerance, specified via rtol in the constructor
    • $ ATOL$ denotes the absolution error tolerance, specified via atol in the constructor. This can be a vector or a scalar.
    • $ C$ denotes a weight, specified via the parameter BDFMultiplier in the constructor.

  2. If a line search based solver is used, the line search step size, $ \lambda $, must be greater than a specified step size value, $ \alpha $:

    \‍[ \lambda > \alpha \‍]

    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 $\alpha$ is set in the constructor via the argument alpha. Setting $\alpha$ to zero effectively eliminates this part of the test.

  3. The achieved linear solver tolerance, $ \eta^k $ for nonlinear iteration $ k $, must be less than a specified tolerance value, $ \beta $; i.e.,

    \‍[ \eta^k < \beta \‍]

    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 $\beta$ is set in the constructor via the argument beta. Setting $\beta$ to 1.0 effectively eliminates this part of the test.

    Note
    This criteria will only be used if the "Achieved Tolerance" parameter (the value of $ \eta^k $) is set by the linear solver in the "Newton"/"Linear Solver"/"Output" sublist. The checkStatus() method will search for this parameter.

References:

  1. 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.

  2. 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.

*/ class NormWRMS : public Generic {

public:

  Constructor where ATOL is a scalar

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 vector 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);

Destructor. virtual ~NormWRMS();

Derived classes virtual StatusType checkStatus(const NOX::Solver::Generic& problem, NOX::StatusTest::CheckType checkType); virtual StatusType getStatus() const; virtual std::ostream& print(std::ostream& stream, int indent = 0) const;

/* Used to query current values of variables in the status test.

*Returns the absolute tolerance set in the constructor If ATOL is a vector
*Returns the value of WRMS virtual norm double getNormWRMS () const
*Returns the requested tolerance set in the virtual constructor double getTolerance () const
*Returns the realative tolerance set in the virtual constructor double getRTOL () const
*Returns the absolute tolerance set in the constructor If ATOL is a this will return a value virtual of double getATOL () const
*Returns the value of the BDFMultiplier set in the virtual constructor double getBDFMultiplier () const
*Returns the value of alpha set in the virtual constructor double getAlpha () const
*Returns the value of beta set in the virtual constructor double getBeta () const
*Returns true if implicit weighting is disabled during norm virtual computation bool getDisableImplicitWeighting () const

Detailed Description

Status checkers.

Enumeration Type Documentation

◆ CheckType

Type of check that should be done by checkStatus.

Enumerator
Complete 

Evaluate every test and subtest.

Minimal 

Evaluate all tests and subtests that are necessary to determine the status.

None 

Evaluation is entirely optional.

◆ StatusType

Status type.

Enumerator
Unevaluated 

Unevaluated.

Unconverged 

Neither Converged nor Failed.

Converged 

Converged.

Failed 

Failed.