|
NOX Development
|
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>

Public Member Functions | |
| Generic () | |
| Default Constructor. | |
| virtual | ~Generic () |
| Destructor. | |
| virtual double | computef (const NOX::Abstract::Group &grp) const =0 |
| Computes the merit function, | |
| virtual void | computeGradient (const NOX::Abstract::Group &group, NOX::Abstract::Vector &result) const =0 |
Computes the gradient of the merit function, 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, | |
| 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. | |
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:
Create a merit function that derives from NOX::Parameter::MeritFunction. For example, the merit function Foo might be defined as shown below.
Create the appropriate entries in the parameter list, as follows.
|
pure virtual |
Computes the merit function, 
Implemented in NOX::Thyra::WeightedMeritFunction, and NOX::MeritFunction::SumOfSquares.
|
pure virtual |
Computes the gradient of the merit function, 
result vector.
Implemented in NOX::Thyra::WeightedMeritFunction, and NOX::MeritFunction::SumOfSquares.
|
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
\]](form_185.png)
where 

The result vector should be computed as:
![\[
result = -\frac{\nabla f^T \nabla f}{\nabla f^T B \nabla f} \nabla f
\]](form_188.png)
Implemented in NOX::Thyra::WeightedMeritFunction, and NOX::MeritFunction::SumOfSquares.
|
pure virtual |
Compute the quadratic model, 
Computes and returns 
![\[
m(d) = f(x) + \nabla f(x)^T d + d^T \nabla^2 f(x) d + d^T \mathbf{B} d
\]](form_185.png)
Here 
dir. 

Implemented in NOX::Thyra::WeightedMeritFunction, and NOX::MeritFunction::SumOfSquares.
|
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 = \nabla f(x)^T d
\]](form_183.png)
Here 
dir and 
Implemented in NOX::Thyra::WeightedMeritFunction, and NOX::MeritFunction::SumOfSquares.
|
pure virtual |
Returns the name of the merit function.
Implemented in NOX::Thyra::WeightedMeritFunction, and NOX::MeritFunction::SumOfSquares.