|
ROL
|
Provides the interface to evaluate the Moreau-Yosida penalty function. More...
#include <ROL_MoreauYosidaObjective.hpp>
Public Member Functions | |
| MoreauYosidaObjective (const Ptr< Objective< Real > > &obj, const Ptr< BoundConstraint< Real > > &bnd, const Vector< Real > &x, const Vector< Real > &g, const Real mu=1e1, const bool updateMultiplier=true, const bool updatePenalty=true) | |
| MoreauYosidaObjective (const Ptr< Objective< Real > > &obj, const Ptr< BoundConstraint< Real > > &bnd, const Vector< Real > &x, const Vector< Real > &g, const Vector< Real > &lam, const Real mu=1e1, const bool updateMultiplier=true, const bool updatePenalty=true) | |
| MoreauYosidaObjective (const Ptr< Objective< Real > > &obj, const Ptr< BoundConstraint< Real > > &bnd, const Vector< Real > &x, const Vector< Real > &g, ParameterList &parlist) | |
| MoreauYosidaObjective (const Ptr< Objective< Real > > &obj, const Ptr< BoundConstraint< Real > > &bnd, const Vector< Real > &x, const Vector< Real > &g, const Vector< Real > &lam, ParameterList &parlist) | |
| void | updateMultiplier (const Vector< Real > &x) |
| void | updatePenalty (Real mu) |
| void | updateMultipliers (Real mu, const Vector< Real > &x) |
| void | reset (const Real mu) |
| Real | testComplementarity (const Vector< Real > &x) |
| Real | getObjectiveValue (const Vector< Real > &x, Real &tol) |
| void | getObjectiveGradient (Vector< Real > &g, const Vector< Real > &x, Real &tol) |
| int | getNumberFunctionEvaluations (void) |
| int | getNumberGradientEvaluations (void) |
| void | update (const Vector< Real > &x, UpdateType type, int iter=-1) |
| Update Moreau-Yosida penalty function. | |
| Real | value (const Vector< Real > &x, Real &tol) |
| Compute value. | |
| void | gradient (Vector< Real > &g, const Vector< Real > &x, Real &tol) |
| Compute gradient. | |
| void | hessVec (Vector< Real > &hv, const Vector< Real > &v, const Vector< Real > &x, Real &tol) |
| Apply Hessian approximation to vector. | |
| 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 > ¶m) |
Private Member Functions | |
| void | computePenalty (const Vector< Real > &x) |
| void | initialize (const Vector< Real > &x, const Vector< Real > &g) |
Private Attributes | |
| const Ptr< Objective< Real > > | obj_ |
| const Ptr< BoundConstraint< Real > > | bnd_ |
| Ptr< Vector< Real > > | l_ |
| Ptr< Vector< Real > > | u_ |
| Ptr< Vector< Real > > | l1_ |
| Ptr< Vector< Real > > | u1_ |
| Ptr< Vector< Real > > | dl1_ |
| Ptr< Vector< Real > > | du1_ |
| Ptr< Vector< Real > > | xlam_ |
| Ptr< Vector< Real > > | v_ |
| Ptr< Vector< Real > > | dv_ |
| Ptr< Vector< Real > > | dv2_ |
| Ptr< Vector< Real > > | lam_ |
| Ptr< Vector< Real > > | tmp_ |
| Ptr< ScalarController< Real, int > > | fval_ |
| Ptr< VectorController< Real, int > > | gradient_ |
| Real | mu_ |
| bool | isPenEvaluated_ |
| int | nfval_ |
| int | ngrad_ |
| bool | updateMultiplier_ |
| bool | updatePenalty_ |
Additional Inherited Members | |
| Protected Member Functions inherited from ROL::ROL::Objective< Real > | |
| const std::vector< Real > | getParameter (void) const |
Provides the interface to evaluate the Moreau-Yosida penalty function.
Definition at line 33 of file ROL_MoreauYosidaObjective.hpp.
|
inline |
Definition at line 129 of file ROL_MoreauYosidaObjective.hpp.
References bnd_, initialize(), isPenEvaluated_, mu_, nfval_, ngrad_, obj_, ROL::ROL::Objective< Real >::Objective(), updateMultiplier(), updateMultiplier_, updatePenalty(), and updatePenalty_.
Referenced by MoreauYosidaObjective(), and MoreauYosidaObjective().
|
inline |
Definition at line 142 of file ROL_MoreauYosidaObjective.hpp.
References lam_, MoreauYosidaObjective(), ROL::ROL::Objective< Real >::Objective(), updateMultiplier(), and updatePenalty().
|
inline |
Definition at line 154 of file ROL_MoreauYosidaObjective.hpp.
References bnd_, initialize(), isPenEvaluated_, mu_, nfval_, ngrad_, obj_, ROL::ROL::Objective< Real >::Objective(), updateMultiplier_, and updatePenalty_.
|
inline |
Definition at line 168 of file ROL_MoreauYosidaObjective.hpp.
References lam_, MoreauYosidaObjective(), and ROL::ROL::Objective< Real >::Objective().
|
inlineprivate |
Definition at line 61 of file ROL_MoreauYosidaObjective.hpp.
References bnd_, dl1_, du1_, isPenEvaluated_, l1_, l_, lam_, mu_, tmp_, u1_, u_, and xlam_.
Referenced by gradient(), hessVec(), testComplementarity(), updateMultiplier(), and value().
|
inlineprivate |
Definition at line 101 of file ROL_MoreauYosidaObjective.hpp.
References bnd_, ROL::Vector< Real >::clone(), dl1_, du1_, dv2_, dv_, fval_, gradient_, l1_, l_, lam_, tmp_, u1_, u_, v_, and xlam_.
Referenced by MoreauYosidaObjective(), and MoreauYosidaObjective().
|
inline |
Definition at line 178 of file ROL_MoreauYosidaObjective.hpp.
References computePenalty(), isPenEvaluated_, l1_, lam_, mu_, and u1_.
Referenced by MoreauYosidaObjective(), MoreauYosidaObjective(), and updateMultipliers().
|
inline |
Definition at line 185 of file ROL_MoreauYosidaObjective.hpp.
References isPenEvaluated_, and mu_.
Referenced by MoreauYosidaObjective(), MoreauYosidaObjective(), and updateMultipliers().
|
inline |
Definition at line 190 of file ROL_MoreauYosidaObjective.hpp.
References bnd_, nfval_, ngrad_, updateMultiplier(), updateMultiplier_, updatePenalty(), and updatePenalty_.
Referenced by ROL::TypeB::MoreauYosidaAlgorithm< Real >::run(), and ROL::TypeG::MoreauYosidaAlgorithm< Real >::run().
|
inline |
Definition at line 209 of file ROL_MoreauYosidaObjective.hpp.
References isPenEvaluated_, lam_, mu_, nfval_, and ngrad_.
|
inline |
Definition at line 216 of file ROL_MoreauYosidaObjective.hpp.
References bnd_, computePenalty(), l1_, l_, mu_, tmp_, u1_, and u_.
Referenced by ROL::TypeB::MoreauYosidaAlgorithm< Real >::updateState(), and ROL::TypeG::MoreauYosidaAlgorithm< Real >::updateState().
|
inline |
Definition at line 239 of file ROL_MoreauYosidaObjective.hpp.
References fval_, nfval_, and obj_.
Referenced by ROL::TypeB::MoreauYosidaAlgorithm< Real >::updateState(), ROL::TypeG::MoreauYosidaAlgorithm< Real >::updateState(), and value().
|
inline |
Definition at line 250 of file ROL_MoreauYosidaObjective.hpp.
References gradient_, ngrad_, and obj_.
Referenced by gradient(), ROL::TypeB::MoreauYosidaAlgorithm< Real >::updateState(), and ROL::TypeG::MoreauYosidaAlgorithm< Real >::updateState().
|
inline |
Definition at line 259 of file ROL_MoreauYosidaObjective.hpp.
References nfval_.
Referenced by ROL::TypeB::MoreauYosidaAlgorithm< Real >::run().
|
inline |
Definition at line 263 of file ROL_MoreauYosidaObjective.hpp.
References ngrad_.
Referenced by ROL::TypeB::MoreauYosidaAlgorithm< Real >::run().
|
inline |
Update Moreau-Yosida penalty function.
This function updates the Moreau-Yosida penalty function at new iterations.
| [in] | x | is the new iterate. |
| [in] | flag | is true if the iterate has changed. |
| [in] | iter | is the outer algorithm iterations count. |
Definition at line 274 of file ROL_MoreauYosidaObjective.hpp.
References fval_, gradient_, isPenEvaluated_, and obj_.
Referenced by ROL::TypeB::MoreauYosidaAlgorithm< Real >::updateState(), and ROL::TypeG::MoreauYosidaAlgorithm< Real >::updateState().
|
inline |
Compute value.
This function returns the Moreau-Yosida penalty value.
| [in] | x | is the current iterate. |
| [in] | tol | is a tolerance for inexact Moreau-Yosida penalty computation. |
Definition at line 288 of file ROL_MoreauYosidaObjective.hpp.
References bnd_, computePenalty(), getObjectiveValue(), l1_, mu_, and u1_.
|
inline |
Compute gradient.
This function returns the Moreau-Yosida penalty gradient.
| [out] | g | is the gradient. |
| [in] | x | is the current iterate. |
| [in] | tol | is a tolerance for inexact Moreau-Yosida penalty computation. |
Definition at line 307 of file ROL_MoreauYosidaObjective.hpp.
References ROL::Vector< Real >::axpy(), bnd_, computePenalty(), dl1_, du1_, getObjectiveGradient(), and mu_.
|
inline |
Apply Hessian approximation to vector.
This function applies the Hessian of the Moreau-Yosida penalty 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 Moreau-Yosida penalty computation. |
Definition at line 326 of file ROL_MoreauYosidaObjective.hpp.
References ROL::Vector< Real >::axpy(), bnd_, computePenalty(), dv2_, dv_, mu_, obj_, v_, and xlam_.
|
private |
Definition at line 35 of file ROL_MoreauYosidaObjective.hpp.
Referenced by getObjectiveGradient(), getObjectiveValue(), hessVec(), MoreauYosidaObjective(), MoreauYosidaObjective(), and update().
|
private |
Definition at line 36 of file ROL_MoreauYosidaObjective.hpp.
Referenced by computePenalty(), gradient(), hessVec(), initialize(), MoreauYosidaObjective(), MoreauYosidaObjective(), testComplementarity(), updateMultipliers(), and value().
|
private |
Definition at line 38 of file ROL_MoreauYosidaObjective.hpp.
Referenced by computePenalty(), initialize(), and testComplementarity().
|
private |
Definition at line 39 of file ROL_MoreauYosidaObjective.hpp.
Referenced by computePenalty(), initialize(), and testComplementarity().
|
private |
Definition at line 40 of file ROL_MoreauYosidaObjective.hpp.
Referenced by computePenalty(), initialize(), testComplementarity(), updateMultiplier(), and value().
|
private |
Definition at line 41 of file ROL_MoreauYosidaObjective.hpp.
Referenced by computePenalty(), initialize(), testComplementarity(), updateMultiplier(), and value().
|
private |
Definition at line 42 of file ROL_MoreauYosidaObjective.hpp.
Referenced by computePenalty(), gradient(), and initialize().
|
private |
Definition at line 43 of file ROL_MoreauYosidaObjective.hpp.
Referenced by computePenalty(), gradient(), and initialize().
|
private |
Definition at line 44 of file ROL_MoreauYosidaObjective.hpp.
Referenced by computePenalty(), hessVec(), and initialize().
|
private |
Definition at line 45 of file ROL_MoreauYosidaObjective.hpp.
Referenced by hessVec(), and initialize().
|
private |
Definition at line 46 of file ROL_MoreauYosidaObjective.hpp.
Referenced by hessVec(), and initialize().
|
private |
Definition at line 47 of file ROL_MoreauYosidaObjective.hpp.
Referenced by hessVec(), and initialize().
|
private |
Definition at line 48 of file ROL_MoreauYosidaObjective.hpp.
Referenced by computePenalty(), initialize(), MoreauYosidaObjective(), MoreauYosidaObjective(), reset(), and updateMultiplier().
|
private |
Definition at line 49 of file ROL_MoreauYosidaObjective.hpp.
Referenced by computePenalty(), initialize(), and testComplementarity().
|
private |
Definition at line 51 of file ROL_MoreauYosidaObjective.hpp.
Referenced by getObjectiveValue(), initialize(), and update().
|
private |
Definition at line 52 of file ROL_MoreauYosidaObjective.hpp.
Referenced by getObjectiveGradient(), initialize(), and update().
|
private |
Definition at line 54 of file ROL_MoreauYosidaObjective.hpp.
Referenced by computePenalty(), gradient(), hessVec(), MoreauYosidaObjective(), MoreauYosidaObjective(), reset(), testComplementarity(), updateMultiplier(), updatePenalty(), and value().
|
private |
Definition at line 55 of file ROL_MoreauYosidaObjective.hpp.
Referenced by computePenalty(), MoreauYosidaObjective(), MoreauYosidaObjective(), reset(), update(), updateMultiplier(), and updatePenalty().
|
private |
Definition at line 56 of file ROL_MoreauYosidaObjective.hpp.
Referenced by getNumberFunctionEvaluations(), getObjectiveValue(), MoreauYosidaObjective(), MoreauYosidaObjective(), reset(), and updateMultipliers().
|
private |
Definition at line 57 of file ROL_MoreauYosidaObjective.hpp.
Referenced by getNumberGradientEvaluations(), getObjectiveGradient(), MoreauYosidaObjective(), MoreauYosidaObjective(), reset(), and updateMultipliers().
|
private |
Definition at line 58 of file ROL_MoreauYosidaObjective.hpp.
Referenced by MoreauYosidaObjective(), MoreauYosidaObjective(), and updateMultipliers().
|
private |
Definition at line 59 of file ROL_MoreauYosidaObjective.hpp.
Referenced by MoreauYosidaObjective(), MoreauYosidaObjective(), and updateMultipliers().