ROL
|
Provides the interface to evaluate projected trust-region model functions from the Kelley-Sachs bound constrained trust-region algorithm. More...
#include <ROL_KelleySachsModel.hpp>
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 () |
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 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) |
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 |
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.
|
inline |
Definition at line 148 of file ROL_KelleySachsModel.hpp.
References ROL::Vector< Real >::clone(), ROL::KelleySachsModel< Real >::dual_, ROL::KelleySachsModel< Real >::prim2_, and ROL::KelleySachsModel< Real >::prim_.
|
inlineprivate |
Definition at line 104 of file ROL_KelleySachsModel.hpp.
References ROL::KelleySachsModel< Real >::eps_, ROL::TrustRegionModel< Real >::getBoundConstraint(), ROL::TrustRegionModel< Real >::getGradient(), and ROL::TrustRegionModel< Real >::getIterate().
Referenced by ROL::KelleySachsModel< Real >::dualTransform(), ROL::KelleySachsModel< Real >::gradient(), ROL::KelleySachsModel< Real >::hessVec(), ROL::KelleySachsModel< Real >::invHessVec(), ROL::KelleySachsModel< Real >::precond(), and ROL::KelleySachsModel< Real >::value().
|
inlineprivate |
Definition at line 125 of file ROL_KelleySachsModel.hpp.
References ROL::KelleySachsModel< Real >::eps_, ROL::TrustRegionModel< Real >::getBoundConstraint(), ROL::TrustRegionModel< Real >::getGradient(), and ROL::TrustRegionModel< Real >::getIterate().
Referenced by ROL::KelleySachsModel< Real >::hessVec(), ROL::KelleySachsModel< Real >::invHessVec(), and ROL::KelleySachsModel< Real >::precond().
|
inline |
Definition at line 159 of file ROL_KelleySachsModel.hpp.
References ROL::KelleySachsModel< Real >::eps_.
|
inlinevirtual |
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. |
Reimplemented from ROL::TrustRegionModel< Real >.
Definition at line 166 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().
|
inlinevirtual |
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::TrustRegionModel< Real >.
Definition at line 177 of file ROL_KelleySachsModel.hpp.
References ROL::KelleySachsModel< Real >::hessVec(), ROL::Vector< Real >::plus(), ROL::KelleySachsModel< Real >::prim_, and ROL::KelleySachsModel< Real >::pruneBindingConstraints().
|
inlinevirtual |
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::TrustRegionModel< Real >.
Definition at line 187 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().
|
inlinevirtual |
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::TrustRegionModel< Real >.
Definition at line 206 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().
|
inlinevirtual |
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::TrustRegionModel< Real >.
Definition at line 225 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().
|
inlinevirtual |
Reimplemented from ROL::TrustRegionModel< Real >.
Definition at line 247 of file ROL_KelleySachsModel.hpp.
References ROL::KelleySachsModel< Real >::pruneBindingConstraints(), and ROL::Vector< Real >::set().
|
inlinevirtual |
Reimplemented from ROL::TrustRegionModel< Real >.
Definition at line 253 of file ROL_KelleySachsModel.hpp.
References ROL::Vector< Real >::axpy(), ROL::TrustRegionModel< Real >::getBoundConstraint(), ROL::TrustRegionModel< Real >::getIterate(), ROL::Vector< Real >::plus(), and ROL::Vector< Real >::set().
|
private |
|
private |
Definition at line 63 of file ROL_KelleySachsModel.hpp.
Referenced by ROL::KelleySachsModel< Real >::gradient(), ROL::KelleySachsModel< Real >::hessVec(), ROL::KelleySachsModel< Real >::invHessVec(), ROL::KelleySachsModel< Real >::KelleySachsModel(), ROL::KelleySachsModel< Real >::precond(), and ROL::KelleySachsModel< Real >::value().
|
private |
Definition at line 63 of file ROL_KelleySachsModel.hpp.
Referenced by ROL::KelleySachsModel< Real >::KelleySachsModel().
|
private |
Definition at line 64 of file ROL_KelleySachsModel.hpp.
Referenced by ROL::KelleySachsModel< Real >::pruneBindingConstraints(), ROL::KelleySachsModel< Real >::pruneNonbindingConstraints(), and ROL::KelleySachsModel< Real >::setEpsilon().
|
private |
|
private |