ROL
Classes | Public Member Functions | Private Member Functions | Private Attributes | List of all members
ROL::KelleySachsModel< Real > Class Template Reference

Provides the interface to evaluate projected trust-region model functions from the Kelley-Sachs bound constrained trust-region algorithm. More...

#include <ROL_KelleySachsModel.hpp>

+ Inheritance diagram for ROL::KelleySachsModel< Real >:

Classes

class  LowerBinding
 
class  PruneBinding
 
class  PruneNonbinding
 
class  UpperBinding
 

Public Member Functions

 KelleySachsModel (Objective< Real > &obj, BoundConstraint< Real > &bnd, const Vector< Real > &x, const Vector< Real > &g, const Ptr< Secant< Real >> &secant=nullPtr, const bool useSecantPrecond=false, const bool useSecantHessVec=false)
 
void setEpsilon (const Real eps)
 
Real value (const Vector< Real > &s, Real &tol)
 Compute value. More...
 
void gradient (Vector< Real > &g, const Vector< Real > &s, Real &tol)
 Compute gradient. More...
 
void hessVec (Vector< Real > &Hv, const Vector< Real > &v, const Vector< Real > &s, Real &tol)
 Apply Hessian approximation to vector. More...
 
void invHessVec (Vector< Real > &Hv, const Vector< Real > &v, const Vector< Real > &s, Real &tol)
 Apply inverse Hessian approximation to vector. More...
 
void precond (Vector< Real > &Mv, const Vector< Real > &v, const Vector< Real > &x, Real &tol)
 Apply preconditioner to vector. More...
 
void dualTransform (Vector< Real > &tv, const Vector< Real > &v)
 
void primalTransform (Vector< Real > &tv, const Vector< Real > &v)
 
- Public Member Functions inherited from ROL::TrustRegionModel< Real >
virtual ~TrustRegionModel ()
 
 TrustRegionModel (Objective< Real > &obj, BoundConstraint< Real > &bnd, const Vector< Real > &x, const Vector< Real > &g, const Ptr< Secant< Real >> &secant=nullPtr, const bool useSecantPrecond=false, const bool useSecantHessVec=false)
 
virtual void update (Objective< Real > &obj, BoundConstraint< Real > &bnd, const Vector< Real > &x, const Vector< Real > &g, const Ptr< Secant< Real >> &secant=nullPtr)
 
virtual const Ptr< const
Vector< Real > > 
getGradient (void) const
 
virtual const Ptr< const
Vector< Real > > 
getIterate (void) const
 
virtual const Ptr< Objective
< Real > > 
getObjective (void) const
 
virtual const Ptr
< BoundConstraint< Real > > 
getBoundConstraint (void) const
 
virtual void updatePredictedReduction (Real &pred, const Vector< Real > &s)
 
virtual void updateActualReduction (Real &ared, const Vector< Real > &s)
 
- Public Member Functions inherited from ROL::Objective< Real >
virtual ~Objective ()
 
 Objective ()
 
virtual void update (const Vector< Real > &x, UpdateType type, int iter=-1)
 Update objective function. More...
 
virtual void update (const Vector< Real > &x, bool flag=true, int iter=-1)
 Update objective function. More...
 
virtual Real dirDeriv (const Vector< Real > &x, const Vector< Real > &d, Real &tol)
 Compute directional derivative. More...
 
virtual void prox (Vector< Real > &Pv, const Vector< Real > &v, Real t, Real &tol)
 
virtual std::vector
< std::vector< Real > > 
checkGradient (const Vector< Real > &x, const Vector< Real > &d, const bool printToStream=true, std::ostream &outStream=std::cout, const int numSteps=ROL_NUM_CHECKDERIV_STEPS, const int order=1)
 Finite-difference gradient check. More...
 
virtual std::vector
< std::vector< Real > > 
checkGradient (const Vector< Real > &x, const Vector< Real > &g, const Vector< Real > &d, const bool printToStream=true, std::ostream &outStream=std::cout, const int numSteps=ROL_NUM_CHECKDERIV_STEPS, const int order=1)
 Finite-difference gradient check. More...
 
virtual std::vector
< std::vector< Real > > 
checkGradient (const Vector< Real > &x, const Vector< Real > &d, const std::vector< Real > &steps, const bool printToStream=true, std::ostream &outStream=std::cout, const int order=1)
 Finite-difference gradient check with specified step sizes. More...
 
virtual std::vector
< std::vector< Real > > 
checkGradient (const Vector< Real > &x, const Vector< Real > &g, const Vector< Real > &d, const std::vector< Real > &steps, const bool printToStream=true, std::ostream &outStream=std::cout, const int order=1)
 Finite-difference gradient check with specified step sizes. More...
 
virtual std::vector
< std::vector< Real > > 
checkHessVec (const Vector< Real > &x, const Vector< Real > &v, const bool printToStream=true, std::ostream &outStream=std::cout, const int numSteps=ROL_NUM_CHECKDERIV_STEPS, const int order=1)
 Finite-difference Hessian-applied-to-vector check. More...
 
virtual std::vector
< std::vector< Real > > 
checkHessVec (const Vector< Real > &x, const Vector< Real > &hv, const Vector< Real > &v, const bool printToStream=true, std::ostream &outStream=std::cout, const int numSteps=ROL_NUM_CHECKDERIV_STEPS, const int order=1)
 Finite-difference Hessian-applied-to-vector check. More...
 
virtual std::vector
< std::vector< Real > > 
checkHessVec (const Vector< Real > &x, const Vector< Real > &v, const std::vector< Real > &steps, const bool printToStream=true, std::ostream &outStream=std::cout, const int order=1)
 Finite-difference Hessian-applied-to-vector check with specified step sizes. More...
 
virtual std::vector
< std::vector< Real > > 
checkHessVec (const Vector< Real > &x, const Vector< Real > &hv, const Vector< Real > &v, const std::vector< Real > &steps, const bool printToStream=true, std::ostream &outStream=std::cout, const int order=1)
 Finite-difference Hessian-applied-to-vector check with specified step sizes. More...
 
virtual std::vector< Real > checkHessSym (const Vector< Real > &x, const Vector< Real > &v, const Vector< Real > &w, const bool printToStream=true, std::ostream &outStream=std::cout)
 Hessian symmetry check. More...
 
virtual std::vector< Real > checkHessSym (const Vector< Real > &x, const Vector< Real > &hv, const Vector< Real > &v, const Vector< Real > &w, const bool printToStream=true, std::ostream &outStream=std::cout)
 Hessian symmetry check. More...
 
virtual void setParameter (const std::vector< Real > &param)
 

Private Member Functions

void pruneBindingConstraints (Vector< Real > &v)
 
void pruneNonbindingConstraints (Vector< Real > &v)
 

Private Attributes

Ptr< Vector< Real > > dual_
 
Ptr< Vector< Real > > prim_
 
Ptr< Vector< Real > > prim2_
 
Real eps_
 
ROL::KelleySachsModel::PruneBinding binding_
 
ROL::KelleySachsModel::PruneNonbinding nonbinding_
 

Additional Inherited Members

- Protected Member Functions inherited from ROL::TrustRegionModel< Real >
void applyHessian (Vector< Real > &hv, const Vector< Real > &v, Real &tol)
 
void applyInvHessian (Vector< Real > &hv, const Vector< Real > &v, Real &tol)
 
void applyPrecond (Vector< Real > &Pv, const Vector< Real > &v, Real &tol)
 
- Protected Member Functions inherited from ROL::Objective< Real >
const std::vector< Real > getParameter (void) const
 

Detailed Description

template<class Real>
class ROL::KelleySachsModel< Real >

Provides the interface to evaluate projected trust-region model functions from the Kelley-Sachs bound constrained trust-region algorithm.


Definition at line 27 of file ROL_KelleySachsModel.hpp.

Constructor & Destructor Documentation

template<class Real >
ROL::KelleySachsModel< Real >::KelleySachsModel ( Objective< Real > &  obj,
BoundConstraint< Real > &  bnd,
const Vector< Real > &  x,
const Vector< Real > &  g,
const Ptr< Secant< Real >> &  secant = nullPtr,
const bool  useSecantPrecond = false,
const bool  useSecantHessVec = false 
)
inline

Member Function Documentation

template<class Real >
void ROL::KelleySachsModel< Real >::pruneBindingConstraints ( Vector< Real > &  v)
inlineprivate
template<class Real >
void ROL::KelleySachsModel< Real >::pruneNonbindingConstraints ( Vector< Real > &  v)
inlineprivate
template<class Real >
void ROL::KelleySachsModel< Real >::setEpsilon ( const Real  eps)
inline

Definition at line 125 of file ROL_KelleySachsModel.hpp.

References ROL::KelleySachsModel< Real >::eps_.

template<class Real >
Real ROL::KelleySachsModel< Real >::value ( const Vector< Real > &  x,
Real &  tol 
)
inlinevirtual

Compute value.

This function returns the objective function value.

Parameters
[in]xis the current iterate.
[in]tolis a tolerance for inexact objective function computation.

Reimplemented from ROL::TrustRegionModel< Real >.

Definition at line 132 of file ROL_KelleySachsModel.hpp.

References ROL::Vector< Real >::dual(), ROL::KelleySachsModel< Real >::dual_, ROL::KelleySachsModel< Real >::hessVec(), ROL::KelleySachsModel< Real >::prim_, and ROL::KelleySachsModel< Real >::pruneBindingConstraints().

template<class Real >
void ROL::KelleySachsModel< Real >::gradient ( Vector< Real > &  g,
const Vector< Real > &  x,
Real &  tol 
)
inlinevirtual

Compute gradient.

This function returns the objective function gradient.

Parameters
[out]gis the gradient.
[in]xis the current iterate.
[in]tolis a tolerance for inexact objective function computation.

The default implementation is a finite-difference approximation based on the function value. This requires the definition of a basis \(\{\phi_i\}\) for the optimization vectors x and the definition of a basis \(\{\psi_j\}\) for the dual optimization vectors (gradient vectors g). The bases must be related through the Riesz map, i.e., \( R \{\phi_i\} = \{\psi_j\}\), and this must be reflected in the implementation of the ROL::Vector::dual() method.

Reimplemented from ROL::TrustRegionModel< Real >.

Definition at line 143 of file ROL_KelleySachsModel.hpp.

References ROL::KelleySachsModel< Real >::hessVec(), ROL::Vector< Real >::plus(), ROL::KelleySachsModel< Real >::prim_, and ROL::KelleySachsModel< Real >::pruneBindingConstraints().

template<class Real >
void ROL::KelleySachsModel< Real >::hessVec ( Vector< Real > &  hv,
const Vector< Real > &  v,
const Vector< Real > &  x,
Real &  tol 
)
inlinevirtual

Apply Hessian approximation to vector.

This function applies the Hessian of the objective function to the vector \(v\).

Parameters
[out]hvis the the action of the Hessian on \(v\).
[in]vis the direction vector.
[in]xis the current iterate.
[in]tolis a tolerance for inexact objective function computation.

Reimplemented from ROL::TrustRegionModel< Real >.

Definition at line 153 of file ROL_KelleySachsModel.hpp.

References ROL::TrustRegionModel< Real >::applyHessian(), ROL::KelleySachsModel< Real >::dual_, ROL::Vector< Real >::plus(), ROL::KelleySachsModel< Real >::prim_, ROL::KelleySachsModel< Real >::pruneBindingConstraints(), and ROL::KelleySachsModel< Real >::pruneNonbindingConstraints().

Referenced by ROL::KelleySachsModel< Real >::gradient(), and ROL::KelleySachsModel< Real >::value().

template<class Real >
void ROL::KelleySachsModel< Real >::invHessVec ( Vector< Real > &  hv,
const Vector< Real > &  v,
const Vector< Real > &  x,
Real &  tol 
)
inlinevirtual

Apply inverse Hessian approximation to vector.

This function applies the inverse Hessian of the objective function to the vector \(v\).

Parameters
[out]hvis the action of the inverse Hessian on \(v\).
[in]vis the direction vector.
[in]xis the current iterate.
[in]tolis a tolerance for inexact objective function computation.

Reimplemented from ROL::TrustRegionModel< Real >.

Definition at line 172 of file ROL_KelleySachsModel.hpp.

References ROL::TrustRegionModel< Real >::applyInvHessian(), ROL::KelleySachsModel< Real >::dual_, ROL::Vector< Real >::plus(), ROL::KelleySachsModel< Real >::prim_, ROL::KelleySachsModel< Real >::pruneBindingConstraints(), and ROL::KelleySachsModel< Real >::pruneNonbindingConstraints().

template<class Real >
void ROL::KelleySachsModel< Real >::precond ( Vector< Real > &  Pv,
const Vector< Real > &  v,
const Vector< Real > &  x,
Real &  tol 
)
inlinevirtual

Apply preconditioner to vector.

This function applies a preconditioner for the Hessian of the objective function to the vector \(v\).

Parameters
[out]Pvis the action of the Hessian preconditioner on \(v\).
[in]vis the direction vector.
[in]xis the current iterate.
[in]tolis a tolerance for inexact objective function computation.

Reimplemented from ROL::TrustRegionModel< Real >.

Definition at line 191 of file ROL_KelleySachsModel.hpp.

References ROL::TrustRegionModel< Real >::applyPrecond(), ROL::KelleySachsModel< Real >::dual_, ROL::Vector< Real >::plus(), ROL::KelleySachsModel< Real >::prim_, ROL::KelleySachsModel< Real >::pruneBindingConstraints(), and ROL::KelleySachsModel< Real >::pruneNonbindingConstraints().

template<class Real >
void ROL::KelleySachsModel< Real >::dualTransform ( Vector< Real > &  tv,
const Vector< Real > &  v 
)
inlinevirtual
template<class Real >
void ROL::KelleySachsModel< Real >::primalTransform ( Vector< Real > &  tv,
const Vector< Real > &  v 
)
inlinevirtual

Member Data Documentation

template<class Real >
Ptr<Vector<Real> > ROL::KelleySachsModel< Real >::dual_
private
template<class Real >
Ptr<Vector<Real> > ROL::KelleySachsModel< Real >::prim_
private
template<class Real >
Ptr<Vector<Real> > ROL::KelleySachsModel< Real >::prim2_
private
template<class Real >
Real ROL::KelleySachsModel< Real >::eps_
private
template<class Real >
ROL::KelleySachsModel::PruneBinding ROL::KelleySachsModel< Real >::binding_
private
template<class Real >
ROL::KelleySachsModel::PruneNonbinding ROL::KelleySachsModel< Real >::nonbinding_
private

The documentation for this class was generated from the following file: