NOX Development
|
Implementation of merit function for implicitly weighted norm. More...
#include <NOX_MeritFunction_Weighted.hpp>
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 std::string & | name () const |
Returns the name of the merit function. | |
virtual std::ostream & | print (std::ostream &os, int indent=0) const |
virtual double | computef (const NOX::Abstract::Group &group) const |
Computes the merit function, ![]() | |
virtual void | computeGradient (const NOX::Abstract::Group &group, NOX::Abstract::Vector &result) const |
Computes the gradient of the merit function, ![]() 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, ![]() | |
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 |
![]() | |
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. | |
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.
|
virtual |
Computes the merit function,
Implements NOX::MeritFunction::Generic.
References NOX::Abstract::Group::getFPtr(), and NOX::Abstract::Group::isF().
|
virtual |
Computes the gradient of the merit function, result
vector.
Implements NOX::MeritFunction::Generic.
References NOX::Abstract::Group::applyJacobianTranspose(), NOX::Abstract::Group::getF(), NOX::Thyra::Vector::getThyraVector(), NOX::Abstract::Group::isF(), NOX::Abstract::Group::isJacobian(), and NOX::Abstract::Group::Ok.
|
virtual |
Computes the vector in the steepest descent direction that minimizes the quadratic model.
The quadratic model is defined as:
where
The result
vector should be computed as:
Implements NOX::MeritFunction::Generic.
|
virtual |
Compute the quadratic model,
Computes and returns
Here dir
.
Implements NOX::MeritFunction::Generic.
References NOX::Abstract::Group::applyJacobian().
|
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 dir
and
Implements NOX::MeritFunction::Generic.
References NOX::Abstract::Group::applyJacobian(), NOX::Abstract::Group::clone(), NOX::Abstract::Group::getF(), NOX::Abstract::Group::getX(), NOX::Abstract::Vector::norm(), NOX::Abstract::Vector::scale(), NOX::ShapeCopy, and NOX::Abstract::Vector::update().
|
virtual |
Returns the name of the merit function.
Implements NOX::MeritFunction::Generic.