ROL
Public 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 >:

Public Member Functions

 KelleySachsModel (Objective< Real > &obj, BoundConstraint< Real > &bnd, const Vector< Real > &x, const Vector< Real > &g, const Real eps)
 
 KelleySachsModel (Objective< Real > &obj, BoundConstraint< Real > &bnd, const Vector< Real > &x, const Vector< Real > &g, const Real eps, const Teuchos::RCP< Secant< Real > > &secant, const bool useSecantPrecond, const bool useSecantHessVec)
 
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)
 
const Teuchos::RCP< BoundConstraint< Real > > getBoundConstraint (void) const
 
- Public Member Functions inherited from ROL::TrustRegionModel< Real >
virtual ~TrustRegionModel ()
 
 TrustRegionModel (Objective< Real > &obj, const Vector< Real > &x, const Vector< Real > &g, const bool init=true)
 
 TrustRegionModel (Objective< Real > &obj, const Vector< Real > &x, const Vector< Real > &g, const Teuchos::RCP< Secant< Real > > &secant, const bool useSecantPrecond, const bool useSecantHessVec)
 
virtual void updatePredictedReduction (Real &pred, const Vector< Real > &s)
 
virtual void updateActualReduction (Real &ared, const Vector< Real > &s)
 
virtual const Teuchos::RCP< const Vector< Real > > getGradient (void) const
 
virtual const Teuchos::RCP< const Vector< Real > > getIterate (void) const
 
virtual const Teuchos::RCP< Objective< Real > > getObjective (void) const
 
virtual void update (const Vector< Real > &x, bool flag=true, int iter=-1)
 Update objective function. More...
 
- Public Member Functions inherited from ROL::Objective< Real >
virtual ~Objective ()
 
virtual Real dirDeriv (const Vector< Real > &x, const Vector< Real > &d, Real &tol)
 Compute directional derivative. More...
 
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 Attributes

Teuchos::RCP< BoundConstraint< Real > > bnd_
 
Teuchos::RCP< Secant< Real > > secant_
 
Teuchos::RCP< Vector< Real > > dual_
 
Teuchos::RCP< Vector< Real > > prim_
 
const bool useSecantPrecond_
 
const bool useSecantHessVec_
 
Real eps_
 

Additional Inherited Members

- 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 61 of file ROL_KelleySachsModel.hpp.

Constructor & Destructor Documentation

◆ KelleySachsModel() [1/2]

template<class Real >
ROL::KelleySachsModel< Real >::KelleySachsModel ( Objective< Real > &  obj,
BoundConstraint< Real > &  bnd,
const Vector< Real > &  x,
const Vector< Real > &  g,
const Real  eps 
)
inline

◆ KelleySachsModel() [2/2]

template<class Real >
ROL::KelleySachsModel< Real >::KelleySachsModel ( Objective< Real > &  obj,
BoundConstraint< Real > &  bnd,
const Vector< Real > &  x,
const Vector< Real > &  g,
const Real  eps,
const Teuchos::RCP< Secant< Real > > &  secant,
const bool  useSecantPrecond,
const bool  useSecantHessVec 
)
inline

Member Function Documentation

◆ value()

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 94 of file ROL_KelleySachsModel.hpp.

References ROL::KelleySachsModel< Real >::bnd_, ROL::Vector< Real >::dual(), ROL::KelleySachsModel< Real >::dual_, ROL::KelleySachsModel< Real >::eps_, ROL::TrustRegionModel< Real >::getGradient(), ROL::TrustRegionModel< Real >::getIterate(), ROL::KelleySachsModel< Real >::hessVec(), and ROL::KelleySachsModel< Real >::prim_.

◆ gradient()

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 107 of file ROL_KelleySachsModel.hpp.

References ROL::KelleySachsModel< Real >::bnd_, ROL::KelleySachsModel< Real >::eps_, ROL::TrustRegionModel< Real >::getGradient(), ROL::TrustRegionModel< Real >::getIterate(), ROL::KelleySachsModel< Real >::hessVec(), ROL::Vector< Real >::plus(), and ROL::KelleySachsModel< Real >::prim_.

◆ hessVec()

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 119 of file ROL_KelleySachsModel.hpp.

References ROL::KelleySachsModel< Real >::bnd_, ROL::KelleySachsModel< Real >::dual_, ROL::KelleySachsModel< Real >::eps_, ROL::TrustRegionModel< Real >::getGradient(), ROL::TrustRegionModel< Real >::getIterate(), ROL::TrustRegionModel< Real >::getObjective(), ROL::Vector< Real >::plus(), ROL::KelleySachsModel< Real >::prim_, ROL::KelleySachsModel< Real >::secant_, and ROL::KelleySachsModel< Real >::useSecantHessVec_.

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

◆ invHessVec()

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 145 of file ROL_KelleySachsModel.hpp.

References ROL::KelleySachsModel< Real >::bnd_, ROL::KelleySachsModel< Real >::dual_, ROL::KelleySachsModel< Real >::eps_, ROL::TrustRegionModel< Real >::getGradient(), ROL::TrustRegionModel< Real >::getIterate(), ROL::TrustRegionModel< Real >::getObjective(), ROL::Vector< Real >::plus(), ROL::KelleySachsModel< Real >::prim_, ROL::KelleySachsModel< Real >::secant_, and ROL::KelleySachsModel< Real >::useSecantHessVec_.

◆ precond()

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 171 of file ROL_KelleySachsModel.hpp.

References ROL::KelleySachsModel< Real >::bnd_, ROL::KelleySachsModel< Real >::dual_, ROL::KelleySachsModel< Real >::eps_, ROL::TrustRegionModel< Real >::getGradient(), ROL::TrustRegionModel< Real >::getIterate(), ROL::TrustRegionModel< Real >::getObjective(), ROL::Vector< Real >::plus(), ROL::KelleySachsModel< Real >::prim_, ROL::KelleySachsModel< Real >::secant_, and ROL::KelleySachsModel< Real >::useSecantPrecond_.

◆ dualTransform()

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

◆ primalTransform()

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

◆ getBoundConstraint()

template<class Real >
const Teuchos::RCP<BoundConstraint<Real> > ROL::KelleySachsModel< Real >::getBoundConstraint ( void  ) const
inlinevirtual

Reimplemented from ROL::TrustRegionModel< Real >.

Definition at line 214 of file ROL_KelleySachsModel.hpp.

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

Member Data Documentation

◆ bnd_

template<class Real >
Teuchos::RCP<BoundConstraint<Real> > ROL::KelleySachsModel< Real >::bnd_
private

◆ secant_

template<class Real >
Teuchos::RCP<Secant<Real> > ROL::KelleySachsModel< Real >::secant_
private

◆ dual_

template<class Real >
Teuchos::RCP<Vector<Real> > ROL::KelleySachsModel< Real >::dual_
private

◆ prim_

template<class Real >
Teuchos::RCP<Vector<Real> > ROL::KelleySachsModel< Real >::prim_
private

◆ useSecantPrecond_

template<class Real >
const bool ROL::KelleySachsModel< Real >::useSecantPrecond_
private

Definition at line 67 of file ROL_KelleySachsModel.hpp.

Referenced by ROL::KelleySachsModel< Real >::precond().

◆ useSecantHessVec_

template<class Real >
const bool ROL::KelleySachsModel< Real >::useSecantHessVec_
private

◆ eps_

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

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