NOX Development
Public Member Functions
NOX::MeritFunction::Generic Class Reference

Base class to support a user defined merit function that can be passed to line searches and directions through the parameter list. More...

#include <NOX_MeritFunction_Generic.H>

Inheritance diagram for NOX::MeritFunction::Generic:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 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 string & name () const =0
 Returns the name of the merit function.

Detailed Description

Base class to support a user defined merit function that can be passed to line searches and directions through the parameter list.

This class allows the user to define their own merit function for use in a line search. Each line search type will specify in it's input parameter list if it supports this functionality.

To create and use a user defined merit function:

  1. Create a merit function that derives from NOX::Parameter::MeritFunction. For example, the merit function Foo might be defined as shown below.

    class Foo : public NOX::Parameter::MeritFunction {
    // Insert class definition here
    }
    

  2. Create the appropriate entries in the parameter list, as follows.

    Foo foo();
    params.sublist("Solver Options").set("User Defined Merit Function", foo);
    


Member Function Documentation

virtual void NOX::MeritFunction::Generic::computeQuadraticMinimizer ( const NOX::Abstract::Group grp,
NOX::Abstract::Vector result 
) const [pure virtual]

Computes the vector in the steepest descent direction that minimizes the quadratic model.

The quadratic model is defined as:

\[ m(d) = f(x) + \nabla f(x)^T d + d^T \nabla^2 f(x) d + d^T \mathbf{B} d \]

where $ B $ is ideally the Hessian of the merit function, $\nabla^2 f(x)$, but can be approximated with the restriction that it is a symmetric and has uniform boundedness in the iterate sequence (see J. Nocedal and S. J. Wright, "Numerical Optimization", Springer, 1999. Chapters 4 and 6).

The result vector should be computed as:

\[ result = -\frac{\nabla f^T \nabla f}{\nabla f^T B \nabla f} \nabla f \]

Implemented in NOX::MeritFunction::SumOfSquares, and NOX::Thyra::WeightedMeritFunction.

virtual double NOX::MeritFunction::Generic::computeQuadraticModel ( const NOX::Abstract::Vector dir,
const NOX::Abstract::Group grp 
) const [pure virtual]

Compute the quadratic model, $ m(d) $, for the given merit function.

Computes and returns $ m(d) $:

\[ m(d) = f(x) + \nabla f(x)^T d + d^T \nabla^2 f(x) d + d^T \mathbf{B} d \]

Here $d$ represents the input parameter dir. $ B $ is the Hessian of the merit function, $\nabla^2 f(x)$, but can be approximated with the restriction that it is a symmetric and has uniform boundedness in the iterate sequence (see J. Nocedal and S. J. Wright, "Numerical Optimization", Springer, 1999. Chapters 4 and 6).

Implemented in NOX::MeritFunction::SumOfSquares, and NOX::Thyra::WeightedMeritFunction.

virtual double NOX::MeritFunction::Generic::computeSlope ( const NOX::Abstract::Vector dir,
const NOX::Abstract::Group grp 
) const [pure virtual]

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.

Calculates and returns $ \zeta $:

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

Here $d$ represents the input parameter dir and $\nabla f(x)$ is the gradient of the merit function.

Implemented in NOX::MeritFunction::SumOfSquares, and NOX::Thyra::WeightedMeritFunction.


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