NOX::Direction::Newton Class Reference

Newton direction computation More...

#include <NOX_Direction_Newton.H>

Inheritance diagram for NOX::Direction::Newton:

Inheritance graph
[legend]
Collaboration diagram for NOX::Direction::Newton:

Collaboration graph
[legend]

List of all members.

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&).

Protected Member Functions

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

Private Member Functions

void throwError (const string &functionName, const string &errorMsg)
 Print an error message.

Private Attributes

Teuchos::RCP< NOX::GlobalDataglobalDataPtr
 Global data pointer. Keep this so the parameter list remains valid.
Teuchos::RCP< NOX::Utilsutils
 Printing Utilities.
Teuchos::ParameterList * paramsPtr
 "Direction" sublist with parameters for the direction vector
bool doRescue
 Determined based on "Rescue Bad %Newton Solve".
Teuchos::RCP
< NOX::Abstract::Vector
predRhs
 Vector containing the predicted RHS.
Teuchos::RCP
< NOX::Abstract::Vector
stepDir
 Vector containing the computed direction.
bool useAdjustableForcingTerm
 Flag used to determine if adjustable forcing term is being used.
double eta_k
 Current linear solve tolerance.
double eta_min
 Minimum linear solve tolerance.
double eta_max
 Maximum linear solve tolerance.
double eta_initial
 Initial linear solve tolerance.
string method
 Name of the method used for calculating the inexact forcing term.
double alpha
 Parameter used for Type 2 forcing term calculation.
double gamma
 Parameter used for Type 2 forcing term calculation.


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:

Parameters

"Direction":

"Direction"/"Newton":

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

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

Definition at line 182 of file NOX_Direction_Newton.H.


Constructor & Destructor Documentation

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

Constructor.

Definition at line 53 of file NOX_Direction_Newton.C.

References reset().

NOX::Direction::Newton::~Newton (  )  [virtual]

Destructor.

Definition at line 59 of file NOX_Direction_Newton.C.


Member Function Documentation

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.

Definition at line 64 of file NOX_Direction_Newton.C.

References alpha, doRescue, eta_initial, eta_k, eta_max, eta_min, gamma, globalDataPtr, method, paramsPtr, useAdjustableForcingTerm, and utils.

Referenced by Newton().

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.

Definition at line 97 of file NOX_Direction_Newton.C.

References NOX::Abstract::Group::computeF(), NOX::Abstract::Group::computeJacobian(), NOX::Abstract::Group::computeNewton(), NOX::Utils::Details, doRescue, eta_k, NOX::Abstract::Group::getNewton(), NOX::Solver::Generic::getNumIterations(), NOX::Solver::Generic::getPreviousSolutionGroup(), NOX::Abstract::Group::Ok, paramsPtr, resetForcingTerm(), throwError(), useAdjustableForcingTerm, utils, and NOX::Utils::Warning.

Referenced by compute().

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.

Definition at line 149 of file NOX_Direction_Newton.C.

References compute().

bool NOX::Direction::Newton::resetForcingTerm ( const NOX::Abstract::Group soln,
const NOX::Abstract::Group oldSoln,
int  niter,
const NOX::Solver::Generic solver 
) [protected, virtual]

void NOX::Direction::Newton::throwError ( const string &  functionName,
const string &  errorMsg 
) [private]

Print an error message.

Definition at line 317 of file NOX_Direction_Newton.C.

References NOX::Utils::Error, and utils.

Referenced by compute().


Member Data Documentation

Global data pointer. Keep this so the parameter list remains valid.

Definition at line 224 of file NOX_Direction_Newton.H.

Referenced by reset().

Teuchos::RCP<NOX::Utils> NOX::Direction::Newton::utils [private]

Printing Utilities.

Definition at line 227 of file NOX_Direction_Newton.H.

Referenced by compute(), reset(), resetForcingTerm(), and throwError().

Teuchos::ParameterList* NOX::Direction::Newton::paramsPtr [private]

"Direction" sublist with parameters for the direction vector

Note:
This is pointer rather than a reference to allow for the reset function.

Definition at line 234 of file NOX_Direction_Newton.H.

Referenced by compute(), reset(), and resetForcingTerm().

Determined based on "Rescue Bad %Newton Solve".

Definition at line 237 of file NOX_Direction_Newton.H.

Referenced by compute(), and reset().

Vector containing the predicted RHS.

Definition at line 240 of file NOX_Direction_Newton.H.

Referenced by resetForcingTerm().

Vector containing the computed direction.

Definition at line 243 of file NOX_Direction_Newton.H.

Referenced by resetForcingTerm().

Flag used to determine if adjustable forcing term is being used.

Definition at line 246 of file NOX_Direction_Newton.H.

Referenced by compute(), and reset().

Current linear solve tolerance.

Definition at line 249 of file NOX_Direction_Newton.H.

Referenced by compute(), reset(), and resetForcingTerm().

Minimum linear solve tolerance.

Definition at line 252 of file NOX_Direction_Newton.H.

Referenced by reset(), and resetForcingTerm().

Maximum linear solve tolerance.

Definition at line 255 of file NOX_Direction_Newton.H.

Referenced by reset(), and resetForcingTerm().

Initial linear solve tolerance.

Definition at line 258 of file NOX_Direction_Newton.H.

Referenced by reset(), and resetForcingTerm().

Name of the method used for calculating the inexact forcing term.

Definition at line 261 of file NOX_Direction_Newton.H.

Referenced by reset(), and resetForcingTerm().

Parameter used for Type 2 forcing term calculation.

Definition at line 264 of file NOX_Direction_Newton.H.

Referenced by reset(), and resetForcingTerm().

Parameter used for Type 2 forcing term calculation.

Definition at line 267 of file NOX_Direction_Newton.H.

Referenced by reset(), and resetForcingTerm().


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

Generated on Wed Oct 21 14:28:44 2009 for Nonlinear Solver Project by  doxygen 1.5.9