#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 string & | name () const =0 |
Returns the name of the merit function. |
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:
Foo
might be defined as shown below.
class Foo : public NOX::Parameter::MeritFunction { // Insert class definition here }
Foo foo(); params.sublist("Solver Options").set("User Defined Merit Function", foo);
Definition at line 87 of file NOX_MeritFunction_Generic.H.
NOX::MeritFunction::Generic::Generic | ( | ) | [inline] |
virtual NOX::MeritFunction::Generic::~Generic | ( | ) | [inline, virtual] |
virtual double NOX::MeritFunction::Generic::computef | ( | const NOX::Abstract::Group & | grp | ) | const [pure virtual] |
virtual void NOX::MeritFunction::Generic::computeGradient | ( | const NOX::Abstract::Group & | group, | |
NOX::Abstract::Vector & | result | |||
) | const [pure virtual] |
Computes the gradient of the merit function, , and returns the result in the
result
vector.
Implemented in NOX::MeritFunction::SumOfSquares.
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 :
Here represents the input parameter
dir
and is the gradient of the merit function.
Implemented in NOX::MeritFunction::SumOfSquares.
virtual double NOX::MeritFunction::Generic::computeQuadraticModel | ( | const NOX::Abstract::Vector & | dir, | |
const NOX::Abstract::Group & | grp | |||
) | const [pure virtual] |
Compute the quadratic model,, for the given merit function.
Computes and returns :
Here represents the input parameter
dir
. is the Hessian of the merit function,
, 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.
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:
where is ideally the Hessian of the merit function,
, 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:
Implemented in NOX::MeritFunction::SumOfSquares.
virtual const string& NOX::MeritFunction::Generic::name | ( | ) | const [pure virtual] |