NOX Development
Public Member Functions
NOX::Thyra::WeightedMeritFunction Class Reference

Implementation of merit function for implicitly weighted norm. More...

#include <NOX_MeritFunction_Weighted.hpp>

Inheritance diagram for NOX::Thyra::WeightedMeritFunction:
Inheritance graph
[legend]
Collaboration diagram for NOX::Thyra::WeightedMeritFunction:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 WeightedMeritFunction (const Teuchos::RCP< const ::Thyra::VectorBase< double > > weights, bool optimizeSlopeCalc=true)
 Constructor.
 WeightedMeritFunction (const WeightedMeritFunction &source)
 Copy constructor.
 ~WeightedMeritFunction ()
 Destructor.
virtual const string & name () const
 Returns the name of the merit function.
virtual ostream & print (ostream &os, int indent=0) const
virtual double computef (const NOX::Abstract::Group &group) const
 Computes the merit function, $ f(x) $.
virtual void computeGradient (const NOX::Abstract::Group &group, NOX::Abstract::Vector &result) const
 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 &group) const
 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 &group) const
 Compute the quadratic model, $ m(d) $, for the given merit function.
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 bool computeSteepestDescentDir (const NOX::Abstract::Group &group, NOX::Abstract::Vector &result) const

Detailed Description

Implementation of merit function for implicitly weighted norm.

NOTE: The nox vectors in this object are always unweighted (we always apply the weights explicitly)! Be careful about using norms and innerProducts from incoming nox objects as these will have the implicit weighting attached.


Member Function Documentation

void NOX::Thyra::WeightedMeritFunction::computeQuadraticMinimizer ( const NOX::Abstract::Group grp,
NOX::Abstract::Vector result 
) const [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 \]

Implements NOX::MeritFunction::Generic.

References TEUCHOS_TEST_FOR_EXCEPTION.

double NOX::Thyra::WeightedMeritFunction::computeQuadraticModel ( const NOX::Abstract::Vector dir,
const NOX::Abstract::Group grp 
) const [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).

Implements NOX::MeritFunction::Generic.

References NOX::Abstract::Group::applyJacobian().

double NOX::Thyra::WeightedMeritFunction::computeSlope ( const NOX::Abstract::Vector dir,
const NOX::Abstract::Group grp 
) const [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.

Implements NOX::MeritFunction::Generic.

References NOX::Abstract::Group::applyJacobian(), NOX::Abstract::Group::clone(), NOX::Abstract::Group::getF(), NOX::Abstract::Group::getX(), NOX::Abstract::Vector::innerProduct(), is_null(), NOX::Abstract::Vector::norm(), NOX::Abstract::Vector::scale(), NOX::ShapeCopy, and NOX::Abstract::Vector::update().


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