NOX  Development
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends
Public Member Functions
NOX::LineSearch::Utils::Slope Class Reference

Common line search utilites for computing the slope of a function. More...

#include <NOX_LineSearch_Utils_Slope.H>

List of all members.

Public Member Functions

 Slope (const Teuchos::RCP< NOX::GlobalData > &gd)
 Default constructor.
virtual ~Slope ()
 Destructor.
void reset (const Teuchos::RCP< NOX::GlobalData > &gd)
 Reset method.
double computeSlope (const NOX::Abstract::Vector &dir, const NOX::Abstract::Group &grp)
 Compute the inner product of the given direction and the gradient associated with the given group.
double computeSlopeWithOutJac (const NOX::Abstract::Vector &dir, const NOX::Abstract::Group &grp)
 This is a variant of the computeSlope() method above optimized to work with out having to compute an explicit Jacobian.

Detailed Description

Common line search utilites for computing the slope of a function.

This class provides routines for computing the slope of a give function. There are two methods, one that uses a Jacobian and the other that estimates the action of the Jacobian by directional derivatives.


Member Function Documentation

Compute the inner product of the given direction and the gradient associated with the given group.

Calculates and returns

\[ \zeta = d^T \nabla f(x). \]

Here $d$ represents the input parameter dir and $\nabla f(x)$ is the gradient associated with the given group.

References NOX::Abstract::Group::applyJacobian(), NOX::Abstract::Vector::clone(), NOX::Abstract::Group::getF(), NOX::Abstract::Group::getGradient(), NOX::Abstract::Vector::innerProduct(), is_null(), NOX::Abstract::Group::isF(), NOX::Abstract::Group::isGradient(), NOX::Abstract::Group::Ok, and NOX::ShapeCopy.

This is a variant of the computeSlope() method above optimized to work with out having to compute an explicit Jacobian.

Calculates and returns

\[ \zeta = d^T \nabla f(x) = d^TJ^TF \]

Here $d$ represents the input parameter dir $\nabla f(x)$ is the gradient associated with the given group (for nonlinear solves this equates to $ J^TF $ where $ J $ is the Jacobian and $ F $ is the original nonlinear function).

We can rewrite this equation as:

\[ d^TJ^TF = F^TJd \]

which allows us to use directional derivatives to estimate $ J^TF $:

\[ F^TJd = F^T \frac{F(x + \eta d) - F(x)}{\eta} \]

This may allow for faster computations of the slope if the Jacobian is expensive to evaluate.

where $\eta$ is a scalar perturbation calculated by:

\[ \eta = \lambda * (\lambda + \frac{\| x\|}{\| d\|} ) \]

$ \lambda $ is a constant fixed at 1.0e-6.

References NOX::Abstract::Vector::clone(), NOX::Abstract::Group::clone(), NOX::Abstract::Group::getF(), NOX::Abstract::Group::getX(), is_null(), NOX::Abstract::Group::isF(), NOX::Abstract::Vector::norm(), and NOX::ShapeCopy.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends