NOX Development
Loading...
Searching...
No Matches
NOX::Direction::Newton Class Reference

Newton direction computation More...

#include <NOX_Direction_Newton.H>

Inheritance diagram for NOX::Direction::Newton:
Collaboration diagram for NOX::Direction::Newton:

Public Member Functions

 Newton (const Teuchos::RCP< NOX::GlobalData > &gd, Teuchos::ParameterList &params)
 Constructor.
virtual ~Newton ()
 Destructor.
virtual bool reset (const Teuchos::RCP< NOX::GlobalData > &gd, Teuchos::ParameterList &params)
 Reset direction based on possibly new parameters.
virtual bool compute (NOX::Abstract::Vector &dir, NOX::Abstract::Group &grp, const NOX::Solver::Generic &solver)
 Compute the direction vector, dir, for a specific method given the current group, grp.
virtual bool compute (NOX::Abstract::Vector &dir, NOX::Abstract::Group &grp, const NOX::Solver::LineSearchBased &solver)
 Same as compute(NOX::Abstract::Vector&, NOX::Abstract::Group&, const NOX::Solver::Generic&).
Public Member Functions inherited from NOX::Direction::Generic
 Generic ()
 Constructor.
virtual ~Generic ()
 Destructor.

Protected Member Functions

virtual bool resetForcingTerm (const NOX::Abstract::Group &soln, const NOX::Abstract::Group &oldSoln, int niter, const NOX::Solver::Generic &solver)

Detailed Description

Newton direction computation

Computes the Newton direction by solving the Newton system.

\‍[  Jd = -F
\‍]

Here $J$ is the n x n Jacobian matrix at the current iterate, $F$ is the n-vector representing the nonlinear function at the current iterate, and $d$ is the n-vector that we are solving for.

If we use an iterative linear solver for the Newton system, then this is called an inexact Newton method. The tolerance used to terminate the linear solve is called the forcing term. The forcing term may be constant, or it may be adjustable. In either case, at iteration $k$ we require,

\‍[  \frac{\|J_k d_k - (-F_k)\|}{\|F_k\|} \leq \eta_k.
\‍]

Here $\eta_k$ is the forcing term for iteration $k$.

Note
This solution tolerance is to be enforced by the user's implementation of NOX::Abstract::Group::computeNewton; it is passed in as the "Tolerance" in the parameter list for that function.

Adjustable forcing terms were introduced by Eisenstat and Walker (1982); here they are implemented as described in Pernice and Walker (1998). We have two choices for adjustable forcing terms:

  • Type 1

    \‍[  \eta_k = \left\vert \frac{\| F_k \| - \|J_{k-1} d_{k-1} - (-F_{k-1}) \| }
  {\|F_{k-1}\|} \right\vert
\‍]

    With the following safeguards imposed:

    \‍[  \max\{\eta_{k-1}^{\frac{1 + \sqrt{5}}{2}}, \eta_{\min} \} \leq \eta_k \leq \eta_{\max}
\‍]

  • Type 2

    \‍[  \eta_k = \gamma \left( \frac{\|F_k\|}{\|F_{k-1}\|} \right)^\alpha
\‍]

    With the following safeguards imposed:

    \‍[  \max\{\gamma \eta_{k-1}^{\alpha}, \eta_{\min} \} \leq \eta_k \leq \eta_{\max}
\‍]

Parameters

"Direction":

  • "Method" = "Newton" [required]

"Direction"/"Newton":

  • "Forcing Term Method" - Method to compute the forcing term, i.e., the tolerance for the linear solver. Choices are:

    • "Constant" [default]
    • "Type 1"
    • "Type 2"

  • "Forcing Term Initial Tolerance" - $\eta_0$ (initial linear solver tolerance). Defaults to 0.1.

  • "Forcing Term Minimum Tolerance" - $\eta_{\min}$. Defaults to 1.0e-6.

  • "Forcing Term Maximum Tolerance" - $\eta_{\max}$. Defaults to 0.01.

  • "Forcing Term Alpha" - $\alpha$ (used only by "Type 2"). Defaults to 1.5.

  • "Forcing Term Gamma" - $\gamma$ (used only by "Type 2"). Defaults to 0.9.

  • "Rescue Bad %Newton Solve" (Boolean) - If set to true, we will use the computed direction even if the linear solve does not achieve the tolerance specified by the forcing term. Defaults to true.

"Direction"/"Newton"/"Linear Solver":

  • "Tolerance" - Tolerance for the linear solve. This may be adjusted automatically by the forcing calculation. Defaults to 1.0e-10. Will be adjusted automatically by NOX if the "Forcing Term Method" is "Type 1" or "Type 2".

Note
When using a forcing term, it's critically important the the residual of the original system is used in the comparison. This can be an issue if scaling or left preconditioning is applied to the linear system.

References

  • Michael Pernice and Homer F. Walker, NITSOL: A Newton Iterative Solver for Nonlinear Systems, SISC 19(Jan 1998):302-318.

  • S. C. Eisenstat and H. F. Walker, Globally convergent inexact Newton methods, SINUM 19(1982):400-408

Member Function Documentation

◆ compute() [1/2]

bool NOX::Direction::Newton::compute ( NOX::Abstract::Vector & dir,
NOX::Abstract::Group & grp,
const NOX::Solver::Generic & solver )
virtual

Compute the direction vector, dir, for a specific method given the current group, grp.

The grp is not const so that we can compute the F vector, the Jacobian matrix, the Newton vector, and so on.

Const access to the solver is used for getting additional information such as the past solution, the iteration number, and so on.

Implements NOX::Direction::Generic.

References NOX::Abstract::Group::computeF(), NOX::Abstract::Group::computeJacobian(), NOX::Abstract::Group::computeNewton(), NOX::Utils::Details, NOX::Abstract::Group::getNewton(), NOX::Solver::Generic::getNumIterations(), NOX::Solver::Generic::getPreviousSolutionGroup(), NOX::Abstract::Group::logLastLinearSolveStats(), NOX::Abstract::Group::Ok, resetForcingTerm(), and NOX::Utils::Warning.

◆ compute() [2/2]

bool NOX::Direction::Newton::compute ( NOX::Abstract::Vector & dir,
NOX::Abstract::Group & grp,
const NOX::Solver::LineSearchBased & solver )
virtual

Same as compute(NOX::Abstract::Vector&, NOX::Abstract::Group&, const NOX::Solver::Generic&).

Enables direct support for line search based solvers for the purpose of efficiency since the LineSearchBased object has a getStep() function that some directions require.

If it is not redefined in the derived class, it will just call the compute with the NOX::Solver::Generic argument.

Reimplemented from NOX::Direction::Generic.

References NOX::Direction::Generic::compute().

◆ reset()

bool NOX::Direction::Newton::reset ( const Teuchos::RCP< NOX::GlobalData > & gd,
Teuchos::ParameterList & params )
virtual

Reset direction based on possibly new parameters.

Implements NOX::Direction::Generic.

Referenced by Newton().

◆ resetForcingTerm()

bool NOX::Direction::Newton::resetForcingTerm ( const NOX::Abstract::Group & soln,
const NOX::Abstract::Group & oldSoln,
int niter,
const NOX::Solver::Generic & solver )
protectedvirtual

The documentation for this class was generated from the following files: