ROL
ROL::TrustRegionModel< Real > Class Template Reference

Provides the interface to evaluate trust-region model functions. More...

#include <ROL_TrustRegionModel.hpp>

Inheritance diagram for ROL::TrustRegionModel< Real >:

Public Member Functions

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 Real value (const Vector< Real > &s, Real &tol)
virtual void gradient (Vector< Real > &g, const Vector< Real > &s, Real &tol)
virtual void hessVec (Vector< Real > &hv, const Vector< Real > &v, const Vector< Real > &s, Real &tol)
virtual void invHessVec (Vector< Real > &hv, const Vector< Real > &v, const Vector< Real > &s, Real &tol)
virtual void precond (Vector< Real > &Pv, const Vector< Real > &v, const Vector< Real > &s, Real &tol)
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 dualTransform (Vector< Real > &tv, const Vector< Real > &v)
virtual void primalTransform (Vector< Real > &tv, const Vector< Real > &v)
virtual void updatePredictedReduction (Real &pred, const Vector< Real > &s)
virtual void updateActualReduction (Real &ared, const Vector< Real > &s)
Public Member Functions inherited from ROL::ROL::Objective< Real >
virtual ~Objective ()
 Objective ()
virtual void update (const Vector< Real > &x, UpdateType type, int iter=-1)
 Update objective function.
virtual void update (const Vector< Real > &x, bool flag=true, int iter=-1)
 Update objective function.
virtual Real value (const Vector< Real > &x, Real &tol)=0
 Compute value.
virtual void gradient (Vector< Real > &g, const Vector< Real > &x, Real &tol)
 Compute gradient.
virtual Real dirDeriv (const Vector< Real > &x, const Vector< Real > &d, Real &tol)
 Compute directional derivative.
virtual void hessVec (Vector< Real > &hv, const Vector< Real > &v, const Vector< Real > &x, Real &tol)
 Apply Hessian approximation to vector.
virtual void invHessVec (Vector< Real > &hv, const Vector< Real > &v, const Vector< Real > &x, Real &tol)
 Apply inverse Hessian approximation to vector.
virtual void precond (Vector< Real > &Pv, const Vector< Real > &v, const Vector< Real > &x, Real &tol)
 Apply preconditioner to vector.
virtual void prox (Vector< Real > &Pv, const Vector< Real > &v, Real t, Real &tol)
 Compute the proximity operator.
virtual void proxJacVec (Vector< Real > &Jv, const Vector< Real > &v, const Vector< Real > &x, Real t, Real &tol)
 Apply the Jacobian of the proximity operator.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
virtual std::vector< std::vector< Real > > checkProxJacVec (const Vector< Real > &x, const Vector< Real > &v, Real t=Real(1), bool printToStream=true, std::ostream &outStream=std::cout, int numSteps=ROL_NUM_CHECKDERIV_STEPS)
 Finite-difference proximity operator Jacobian-applied-to-vector check.
virtual void setParameter (const std::vector< Real > &param)

Protected Member Functions

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::ROL::Objective< Real >
const std::vector< Real > getParameter (void) const

Private Member Functions

void initialize (const Vector< Real > &s)

Private Attributes

Ptr< Objective< Real > > obj_
Ptr< BoundConstraint< Real > > bnd_
Ptr< const Vector< Real > > x_
Ptr< const Vector< Real > > g_
Ptr< Vector< Real > > dual_
Ptr< Secant< Real > > secant_
const bool useSecantPrecond_
const bool useSecantHessVec_
bool init_

Detailed Description

template<class Real>
class ROL::TrustRegionModel< Real >

Provides the interface to evaluate trust-region model functions.

ROL::TrustRegionModel provides the interface to implement a number of trust-region models for unconstrained and constrained optimization. The default implementation is the standard quadratic trust region model for unconstrained optimization.


Definition at line 33 of file ROL_TrustRegionModel.hpp.

Constructor & Destructor Documentation

◆ ~TrustRegionModel()

template<class Real>
virtual ROL::TrustRegionModel< Real >::~TrustRegionModel ( )
inlinevirtual

Definition at line 89 of file ROL_TrustRegionModel.hpp.

◆ TrustRegionModel()

template<class Real>
ROL::TrustRegionModel< Real >::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 )
inline

Member Function Documentation

◆ initialize()

template<class Real>
void ROL::TrustRegionModel< Real >::initialize ( const Vector< Real > & s)
inlineprivate

Definition at line 46 of file ROL_TrustRegionModel.hpp.

References ROL::Vector< Real >::clone(), ROL::Vector< Real >::dual(), dual_, and init_.

Referenced by value().

◆ applyHessian()

template<class Real>
void ROL::TrustRegionModel< Real >::applyHessian ( Vector< Real > & hv,
const Vector< Real > & v,
Real & tol )
inlineprotected

◆ applyInvHessian()

template<class Real>
void ROL::TrustRegionModel< Real >::applyInvHessian ( Vector< Real > & hv,
const Vector< Real > & v,
Real & tol )
inlineprotected

Definition at line 66 of file ROL_TrustRegionModel.hpp.

References obj_, secant_, useSecantHessVec_, and x_.

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

◆ applyPrecond()

template<class Real>
void ROL::TrustRegionModel< Real >::applyPrecond ( Vector< Real > & Pv,
const Vector< Real > & v,
Real & tol )
inlineprotected

◆ update()

template<class Real>
virtual void ROL::TrustRegionModel< Real >::update ( Objective< Real > & obj,
BoundConstraint< Real > & bnd,
const Vector< Real > & x,
const Vector< Real > & g,
const Ptr< Secant< Real > > & secant = nullPtr )
inlinevirtual

◆ value()

template<class Real>
virtual Real ROL::TrustRegionModel< Real >::value ( const Vector< Real > & s,
Real & tol )
inlinevirtual

◆ gradient()

template<class Real>
virtual void ROL::TrustRegionModel< Real >::gradient ( Vector< Real > & g,
const Vector< Real > & s,
Real & tol )
inlinevirtual

◆ hessVec()

template<class Real>
virtual void ROL::TrustRegionModel< Real >::hessVec ( Vector< Real > & hv,
const Vector< Real > & v,
const Vector< Real > & s,
Real & tol )
inlinevirtual

◆ invHessVec()

template<class Real>
virtual void ROL::TrustRegionModel< Real >::invHessVec ( Vector< Real > & hv,
const Vector< Real > & v,
const Vector< Real > & s,
Real & tol )
inlinevirtual

◆ precond()

template<class Real>
virtual void ROL::TrustRegionModel< Real >::precond ( Vector< Real > & Pv,
const Vector< Real > & v,
const Vector< Real > & s,
Real & tol )
inlinevirtual

Reimplemented in ROL::KelleySachsModel< Real >.

Definition at line 138 of file ROL_TrustRegionModel.hpp.

References applyPrecond().

Referenced by ROL::TruncatedCG< Real >::run().

◆ getGradient()

◆ getIterate()

◆ getObjective()

template<class Real>
virtual const Ptr< Objective< Real > > ROL::TrustRegionModel< Real >::getObjective ( void ) const
inlinevirtual

Definition at line 156 of file ROL_TrustRegionModel.hpp.

References obj_.

◆ getBoundConstraint()

◆ dualTransform()

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

◆ primalTransform()

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

◆ updatePredictedReduction()

template<class Real>
virtual void ROL::TrustRegionModel< Real >::updatePredictedReduction ( Real & pred,
const Vector< Real > & s )
inlinevirtual

Reimplemented in ROL::ColemanLiModel< Real >.

Definition at line 178 of file ROL_TrustRegionModel.hpp.

Referenced by ROL::TrustRegion< Real >::update().

◆ updateActualReduction()

template<class Real>
virtual void ROL::TrustRegionModel< Real >::updateActualReduction ( Real & ared,
const Vector< Real > & s )
inlinevirtual

Reimplemented in ROL::ColemanLiModel< Real >.

Definition at line 180 of file ROL_TrustRegionModel.hpp.

Referenced by ROL::TrustRegion< Real >::update().

Member Data Documentation

◆ obj_

template<class Real>
Ptr<Objective<Real> > ROL::TrustRegionModel< Real >::obj_
private

◆ bnd_

template<class Real>
Ptr<BoundConstraint<Real> > ROL::TrustRegionModel< Real >::bnd_
private

Definition at line 36 of file ROL_TrustRegionModel.hpp.

Referenced by getBoundConstraint(), TrustRegionModel(), and update().

◆ x_

template<class Real>
Ptr<const Vector<Real> > ROL::TrustRegionModel< Real >::x_
private

◆ g_

template<class Real>
Ptr<const Vector<Real> > ROL::TrustRegionModel< Real >::g_
private

Definition at line 37 of file ROL_TrustRegionModel.hpp.

Referenced by getGradient(), gradient(), TrustRegionModel(), update(), and value().

◆ dual_

template<class Real>
Ptr<Vector<Real> > ROL::TrustRegionModel< Real >::dual_
private

Definition at line 38 of file ROL_TrustRegionModel.hpp.

Referenced by initialize(), and value().

◆ secant_

template<class Real>
Ptr<Secant<Real> > ROL::TrustRegionModel< Real >::secant_
private

◆ useSecantPrecond_

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

Definition at line 41 of file ROL_TrustRegionModel.hpp.

Referenced by applyPrecond(), and TrustRegionModel().

◆ useSecantHessVec_

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

Definition at line 42 of file ROL_TrustRegionModel.hpp.

Referenced by applyHessian(), applyInvHessian(), and TrustRegionModel().

◆ init_

template<class Real>
bool ROL::TrustRegionModel< Real >::init_
private

Definition at line 44 of file ROL_TrustRegionModel.hpp.

Referenced by initialize(), and TrustRegionModel().


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