ROL
|
Provides the interface to evaluate trust-region model functions. More...
#include <ROL_TrustRegionModel_U.hpp>
Public Member Functions | |
virtual | ~TrustRegionModel_U () |
TrustRegionModel_U (ParameterList &list, const Ptr< Secant< Real >> &secant=nullPtr, ESecantMode mode=SECANTMODE_BOTH) | |
void | initialize (const Vector< Real > &x, const Vector< Real > &g) |
void | validate (Objective< Real > &obj, const Vector< Real > &x, const Vector< Real > &g, ETrustRegionU etr) |
virtual void | setData (Objective< Real > &obj, const Vector< Real > &x, const Vector< Real > &g, Real &tol) |
void | update (const Vector< Real > &x, const Vector< Real > &s, const Vector< Real > &gold, const Vector< Real > &gnew, const Real snorm, const int iter) |
virtual Real | value (const Vector< Real > &s, Real &tol) override |
Compute value. More... | |
virtual void | gradient (Vector< Real > &g, const Vector< Real > &s, Real &tol) override |
Compute gradient. More... | |
virtual void | hessVec (Vector< Real > &hv, const Vector< Real > &v, const Vector< Real > &s, Real &tol) override |
Apply Hessian approximation to vector. More... | |
virtual void | invHessVec (Vector< Real > &hv, const Vector< Real > &v, const Vector< Real > &s, Real &tol) override |
Apply inverse Hessian approximation to vector. More... | |
virtual void | precond (Vector< Real > &Pv, const Vector< Real > &v, const Vector< Real > &s, Real &tol) override |
Apply preconditioner to vector. More... | |
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 |
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 > ¶m) |
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::Objective< Real > | |
const std::vector< Real > | getParameter (void) const |
Private Attributes | |
Ptr< Objective< Real > > | obj_ |
Ptr< const Vector< Real > > | x_ |
Ptr< const Vector< Real > > | g_ |
Ptr< Vector< Real > > | dual_ |
Real | tol_ |
Ptr< Secant< Real > > | secant_ |
bool | useSecantPrecond_ |
bool | useSecantHessVec_ |
Provides the interface to evaluate trust-region model functions.
ROL::TrustRegionModel_U 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 32 of file ROL_TrustRegionModel_U.hpp.
|
inlinevirtual |
Definition at line 79 of file ROL_TrustRegionModel_U.hpp.
|
inline |
Definition at line 81 of file ROL_TrustRegionModel_U.hpp.
References ROL::TrustRegionModel_U< Real >::secant_, ROL::TrustRegionModel_U< Real >::useSecantHessVec_, and ROL::TrustRegionModel_U< Real >::useSecantPrecond_.
|
inlineprotected |
Definition at line 47 of file ROL_TrustRegionModel_U.hpp.
References ROL::TrustRegionModel_U< Real >::obj_, ROL::TrustRegionModel_U< Real >::secant_, ROL::TrustRegionModel_U< Real >::tol_, ROL::TrustRegionModel_U< Real >::useSecantHessVec_, and ROL::TrustRegionModel_U< Real >::x_.
Referenced by ROL::TrustRegionModel_U< Real >::gradient(), ROL::TrustRegionModel_U< Real >::hessVec(), and ROL::TrustRegionModel_U< Real >::value().
|
inlineprotected |
Definition at line 56 of file ROL_TrustRegionModel_U.hpp.
References ROL::TrustRegionModel_U< Real >::obj_, ROL::TrustRegionModel_U< Real >::secant_, ROL::TrustRegionModel_U< Real >::tol_, ROL::TrustRegionModel_U< Real >::useSecantHessVec_, and ROL::TrustRegionModel_U< Real >::x_.
Referenced by ROL::TrustRegionModel_U< Real >::invHessVec().
|
inlineprotected |
Definition at line 65 of file ROL_TrustRegionModel_U.hpp.
References ROL::TrustRegionModel_U< Real >::obj_, ROL::TrustRegionModel_U< Real >::secant_, ROL::TrustRegionModel_U< Real >::tol_, ROL::TrustRegionModel_U< Real >::useSecantPrecond_, and ROL::TrustRegionModel_U< Real >::x_.
Referenced by ROL::TrustRegionModel_U< Real >::precond().
|
inline |
Definition at line 91 of file ROL_TrustRegionModel_U.hpp.
References ROL::Vector< Real >::clone(), and ROL::TrustRegionModel_U< Real >::dual_.
|
inline |
Definition at line 99 of file ROL_TrustRegionModel_U.hpp.
References ROL::Vector< Real >::clone(), ROL::Objective< Real >::invHessVec(), ROL::TRUSTREGION_U_DOGLEG, ROL::TRUSTREGION_U_DOUBLEDOGLEG, and ROL::TrustRegionModel_U< Real >::useSecantHessVec_.
|
inlinevirtual |
Definition at line 117 of file ROL_TrustRegionModel_U.hpp.
References ROL::TrustRegionModel_U< Real >::g_, ROL::TrustRegionModel_U< Real >::obj_, ROL::TrustRegionModel_U< Real >::tol_, and ROL::TrustRegionModel_U< Real >::x_.
Referenced by ROL::TRUtils::initialRadius().
|
inline |
Definition at line 127 of file ROL_TrustRegionModel_U.hpp.
References ROL::TrustRegionModel_U< Real >::secant_, ROL::TrustRegionModel_U< Real >::useSecantHessVec_, and ROL::TrustRegionModel_U< Real >::useSecantPrecond_.
|
inlineoverridevirtual |
Compute value.
This function returns the objective function value.
[in] | x | is the current iterate. |
[in] | tol | is a tolerance for inexact objective function computation. |
Implements ROL::Objective< Real >.
Definition at line 138 of file ROL_TrustRegionModel_U.hpp.
References ROL::TrustRegionModel_U< Real >::applyHessian(), ROL::TrustRegionModel_U< Real >::dual_, and ROL::TrustRegionModel_U< Real >::g_.
|
inlineoverridevirtual |
Compute gradient.
This function returns the objective function gradient.
[out] | g | is the gradient. |
[in] | x | is the current iterate. |
[in] | tol | is 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::Objective< Real >.
Definition at line 145 of file ROL_TrustRegionModel_U.hpp.
References ROL::TrustRegionModel_U< Real >::applyHessian(), ROL::TrustRegionModel_U< Real >::g_, and ROL::Vector< Real >::plus().
|
inlineoverridevirtual |
Apply Hessian approximation to vector.
This function applies the Hessian of the objective function to the vector \(v\).
[out] | hv | is the the action of the Hessian on \(v\). |
[in] | v | is the direction vector. |
[in] | x | is the current iterate. |
[in] | tol | is a tolerance for inexact objective function computation. |
Reimplemented from ROL::Objective< Real >.
Definition at line 150 of file ROL_TrustRegionModel_U.hpp.
References ROL::TrustRegionModel_U< Real >::applyHessian().
Referenced by ROL::TypeB::KelleySachsAlgorithm< Real >::applyFreeHessian(), ROL::TypeB::LinMoreAlgorithm< Real >::applyFreeHessian(), ROL::TypeB::ColemanLiAlgorithm< Real >::applyHessian(), ROL::TypeB::TrustRegionSPGAlgorithm< Real >::dcauchy(), ROL::TypeB::LinMoreAlgorithm< Real >::dcauchy(), ROL::TypeP::TrustRegionAlgorithm< Real >::dcauchy(), ROL::TypeP::TrustRegionAlgorithm< Real >::dncg(), ROL::TypeB::LinMoreAlgorithm< Real >::dprsrch(), ROL::TypeB::TrustRegionSPGAlgorithm< Real >::dpsg(), ROL::TypeB::TrustRegionSPGAlgorithm< Real >::dpsg_simple(), ROL::TypeP::TrustRegionAlgorithm< Real >::dspg(), ROL::TypeP::TrustRegionAlgorithm< Real >::dspg2(), ROL::TRUtils::initialRadius(), ROL::CauchyPoint_U< Real >::solve(), ROL::DoubleDogLeg_U< Real >::solve(), ROL::DogLeg_U< Real >::solve(), ROL::TruncatedCG_U< Real >::solve(), and ROL::SPGTrustRegion_U< Real >::solve().
|
inlineoverridevirtual |
Apply inverse Hessian approximation to vector.
This function applies the inverse Hessian of the objective function to the vector \(v\).
[out] | hv | is the action of the inverse Hessian on \(v\). |
[in] | v | is the direction vector. |
[in] | x | is the current iterate. |
[in] | tol | is a tolerance for inexact objective function computation. |
Reimplemented from ROL::Objective< Real >.
Definition at line 154 of file ROL_TrustRegionModel_U.hpp.
References ROL::TrustRegionModel_U< Real >::applyInvHessian().
Referenced by ROL::DoubleDogLeg_U< Real >::solve(), and ROL::DogLeg_U< Real >::solve().
|
inlineoverridevirtual |
Apply preconditioner to vector.
This function applies a preconditioner for the Hessian of the objective function to the vector \(v\).
[out] | Pv | is the action of the Hessian preconditioner on \(v\). |
[in] | v | is the direction vector. |
[in] | x | is the current iterate. |
[in] | tol | is a tolerance for inexact objective function computation. |
Reimplemented from ROL::Objective< Real >.
Definition at line 158 of file ROL_TrustRegionModel_U.hpp.
References ROL::TrustRegionModel_U< Real >::applyPrecond().
Referenced by ROL::TypeB::KelleySachsAlgorithm< Real >::applyFreePrecond(), ROL::TypeB::LinMoreAlgorithm< Real >::applyFreePrecond(), ROL::TypeB::ColemanLiAlgorithm< Real >::applyPrecond(), and ROL::TruncatedCG_U< Real >::solve().
|
inlinevirtual |
Definition at line 168 of file ROL_TrustRegionModel_U.hpp.
References ROL::TrustRegionModel_U< Real >::g_.
Referenced by ROL::CauchyPoint_U< Real >::solve(), ROL::DoubleDogLeg_U< Real >::solve(), ROL::DogLeg_U< Real >::solve(), ROL::TruncatedCG_U< Real >::solve(), and ROL::SPGTrustRegion_U< Real >::solve().
|
inlinevirtual |
Definition at line 172 of file ROL_TrustRegionModel_U.hpp.
References ROL::TrustRegionModel_U< Real >::x_.
|
inlinevirtual |
Definition at line 176 of file ROL_TrustRegionModel_U.hpp.
References ROL::TrustRegionModel_U< Real >::obj_.
|
private |
Definition at line 34 of file ROL_TrustRegionModel_U.hpp.
Referenced by ROL::TrustRegionModel_U< Real >::applyHessian(), ROL::TrustRegionModel_U< Real >::applyInvHessian(), ROL::TrustRegionModel_U< Real >::applyPrecond(), ROL::TrustRegionModel_U< Real >::getObjective(), and ROL::TrustRegionModel_U< Real >::setData().
|
private |
Definition at line 35 of file ROL_TrustRegionModel_U.hpp.
Referenced by ROL::TrustRegionModel_U< Real >::applyHessian(), ROL::TrustRegionModel_U< Real >::applyInvHessian(), ROL::TrustRegionModel_U< Real >::applyPrecond(), ROL::TrustRegionModel_U< Real >::getIterate(), and ROL::TrustRegionModel_U< Real >::setData().
|
private |
Definition at line 35 of file ROL_TrustRegionModel_U.hpp.
Referenced by ROL::TrustRegionModel_U< Real >::getGradient(), ROL::TrustRegionModel_U< Real >::gradient(), ROL::TrustRegionModel_U< Real >::setData(), and ROL::TrustRegionModel_U< Real >::value().
|
private |
Definition at line 36 of file ROL_TrustRegionModel_U.hpp.
Referenced by ROL::TrustRegionModel_U< Real >::initialize(), and ROL::TrustRegionModel_U< Real >::value().
|
private |
Definition at line 37 of file ROL_TrustRegionModel_U.hpp.
Referenced by ROL::TrustRegionModel_U< Real >::applyHessian(), ROL::TrustRegionModel_U< Real >::applyInvHessian(), ROL::TrustRegionModel_U< Real >::applyPrecond(), and ROL::TrustRegionModel_U< Real >::setData().
|
private |
Definition at line 39 of file ROL_TrustRegionModel_U.hpp.
Referenced by ROL::TrustRegionModel_U< Real >::applyHessian(), ROL::TrustRegionModel_U< Real >::applyInvHessian(), ROL::TrustRegionModel_U< Real >::applyPrecond(), ROL::TrustRegionModel_U< Real >::TrustRegionModel_U(), and ROL::TrustRegionModel_U< Real >::update().
|
private |
Definition at line 40 of file ROL_TrustRegionModel_U.hpp.
Referenced by ROL::TrustRegionModel_U< Real >::applyPrecond(), ROL::TrustRegionModel_U< Real >::TrustRegionModel_U(), and ROL::TrustRegionModel_U< Real >::update().
|
private |
Definition at line 41 of file ROL_TrustRegionModel_U.hpp.
Referenced by ROL::TrustRegionModel_U< Real >::applyHessian(), ROL::TrustRegionModel_U< Real >::applyInvHessian(), ROL::TrustRegionModel_U< Real >::TrustRegionModel_U(), ROL::TrustRegionModel_U< Real >::update(), and ROL::TrustRegionModel_U< Real >::validate().