NOX Development
Loading...
Searching...
No Matches
Public Member Functions | List of all members
NOX::MeritFunction::SumOfSquares Class Reference

Sum of squares merit function. More...

#include <NOX_MeritFunction_SumOfSquares.H>

Inheritance diagram for NOX::MeritFunction::SumOfSquares:
Inheritance graph
[legend]
Collaboration diagram for NOX::MeritFunction::SumOfSquares:
Collaboration graph
[legend]

Public Member Functions

 SumOfSquares (const Teuchos::RCP< NOX::Utils > &u)
 Constructor.
 
virtual ~SumOfSquares ()
 Destructor.
 
virtual double computef (const NOX::Abstract::Group &grp) const
 Computes the merit function, $ f(x) = \frac{1}{2}\| F(x) \|^2 $.
 
virtual void computeGradient (const NOX::Abstract::Group &group, NOX::Abstract::Vector &result) const
 Computes the gradient, $ g = \nabla f(x) = J(x)^T F(x) $.
 
virtual double computeSlope (const NOX::Abstract::Vector &dir, const NOX::Abstract::Group &grp) const
 Computes the slope, $ s(x,d) = d^T \nabla f(x) = d^T J(x)^T F(x) $.
 
virtual double computeQuadraticModel (const NOX::Abstract::Vector &dir, const NOX::Abstract::Group &grp) const
 Computes the quadratic model, $ m(x,d) = f(x) + \nabla f(x)^T d + d^T \nabla^2 f(x) d $.
 
virtual void computeQuadraticMinimizer (const NOX::Abstract::Group &grp, NOX::Abstract::Vector &result) const
 Computes the vector in the steepest descent direction that minimizes, the quadratic model.
 
virtual const std::string & name () const
 Returns the name of the merit function.
 
- Public Member Functions inherited from NOX::MeritFunction::Generic
 Generic ()
 Default Constructor.
 
virtual ~Generic ()
 Destructor.
 
virtual double computef (const NOX::Abstract::Group &grp) const =0
 Computes the merit function, $ f(x) $.
 
virtual void computeGradient (const NOX::Abstract::Group &group, NOX::Abstract::Vector &result) const =0
 Computes the gradient of the merit function, $ \nabla f $, and returns the result in the result vector.
 
virtual double computeSlope (const NOX::Abstract::Vector &dir, const NOX::Abstract::Group &grp) const =0
 Computes the inner product of the given direction and the gradient associated with the merit function. Returns the steepest descent direction in the result vector.
 
virtual double computeQuadraticModel (const NOX::Abstract::Vector &dir, const NOX::Abstract::Group &grp) const =0
 Compute the quadratic model, $ m(d) $, for the given merit function.
 
virtual void computeQuadraticMinimizer (const NOX::Abstract::Group &grp, NOX::Abstract::Vector &result) const =0
 Computes the vector in the steepest descent direction that minimizes the quadratic model.
 
virtual const std::string & name () const =0
 Returns the name of the merit function.
 

Detailed Description

Sum of squares merit function.

A basic merit function used in many nonlinear equation solvers:

\[
  f = \frac{1}{2} \| F(x) \| ^2
\]

Where the norm is the 2-Norm using the NOX::Abstract::Vector's inner product.

This is the default merit function used in nox.

This merit function is taken from: J. E. Dennis Jr. and Robert B. Schnabel, "Numerical Methods for Unconstrained Optimization and Nonlinear Equations," Prentice Hall, 1983

Member Function Documentation

◆ computef()

double NOX::MeritFunction::SumOfSquares::computef ( const NOX::Abstract::Group grp) const
virtual

Computes the merit function, $ f(x) = \frac{1}{2}\| F(x) \|^2 $.

Implements NOX::MeritFunction::Generic.

References NOX::Abstract::Group::getNormF(), and NOX::Abstract::Group::isF().

◆ computeGradient()

void NOX::MeritFunction::SumOfSquares::computeGradient ( const NOX::Abstract::Group group,
NOX::Abstract::Vector result 
) const
virtual

◆ computeQuadraticMinimizer()

void NOX::MeritFunction::SumOfSquares::computeQuadraticMinimizer ( const NOX::Abstract::Group grp,
NOX::Abstract::Vector result 
) const
virtual

◆ computeQuadraticModel()

double NOX::MeritFunction::SumOfSquares::computeQuadraticModel ( const NOX::Abstract::Vector dir,
const NOX::Abstract::Group grp 
) const
virtual

Computes the quadratic model, $ m(x,d) = f(x) + \nabla f(x)^T d + d^T \nabla^2 f(x) d $.

We approximate $ \nabla^2f(x) \approx J^TJ $:

\[
  m(d) = f(x) + (J(x)^T F)^T d + \frac{1}{2} d^T B d
\]

Implements NOX::MeritFunction::Generic.

References NOX::Abstract::Group::applyJacobian(), NOX::Abstract::Vector::clone(), and NOX::Abstract::Group::getF().

◆ computeSlope()

double NOX::MeritFunction::SumOfSquares::computeSlope ( const NOX::Abstract::Vector dir,
const NOX::Abstract::Group grp 
) const
virtual

Computes the slope, $ s(x,d) = d^T \nabla f(x) = d^T J(x)^T F(x) $.

If the Jacobian is not computed in the grp object, then the slope can be approximated using directional derivatives. More information can be found in the method computeSlopeWithoutJac.

Implements NOX::MeritFunction::Generic.

References NOX::Abstract::Vector::clone(), NOX::Abstract::Group::getF(), NOX::Abstract::Vector::innerProduct(), NOX::Abstract::Group::isGradient(), and NOX::Abstract::Group::isJacobian().

◆ name()

const std::string & NOX::MeritFunction::SumOfSquares::name ( ) const
virtual

Returns the name of the merit function.

Implements NOX::MeritFunction::Generic.


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