ROL
|
Provides the interface to evaluate the Moreau-Yosida penalty function. More...
#include <ROL_MoreauYosidaPenalty.hpp>
Public Member Functions | |
~MoreauYosidaPenalty () | |
MoreauYosidaPenalty (const ROL::Ptr< Objective< Real > > &obj, const ROL::Ptr< BoundConstraint< Real > > &bnd, const ROL::Vector< Real > &x, const Real mu=1e1, const bool updateMultiplier=true, const bool updatePenalty=true) | |
MoreauYosidaPenalty (const ROL::Ptr< Objective< Real > > &obj, const ROL::Ptr< BoundConstraint< Real > > &bnd, const ROL::Vector< Real > &x, ROL::ParameterList &parlist) | |
MoreauYosidaPenalty (const ROL::Ptr< Objective< Real > > &obj, const ROL::Ptr< BoundConstraint< Real > > &bnd, const ROL::Vector< Real > &x, const ROL::Vector< Real > &lam, ROL::ParameterList &parlist) | |
void | updateMultipliers (Real mu, const ROL::Vector< Real > &x) |
void | reset (const Real mu) |
Real | testComplementarity (const ROL::Vector< Real > &x) |
Real | getObjectiveValue (void) const |
ROL::Ptr< Vector< Real > > | getGradient (void) const |
int | getNumberFunctionEvaluations (void) |
int | getNumberGradientEvaluations (void) |
void | update (const Vector< Real > &x, bool flag=true, int iter=-1) |
Update Moreau-Yosida penalty function. More... | |
Real | value (const Vector< Real > &x, Real &tol) |
Compute value. More... | |
void | gradient (Vector< Real > &g, const Vector< Real > &x, Real &tol) |
Compute gradient. More... | |
void | hessVec (Vector< Real > &hv, const Vector< Real > &v, const Vector< Real > &x, Real &tol) |
Apply Hessian approximation to vector. More... | |
void | setParameter (const std::vector< Real > ¶m) |
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 Real | dirDeriv (const Vector< Real > &x, const Vector< Real > &d, Real &tol) |
Compute directional derivative. More... | |
virtual void | invHessVec (Vector< Real > &hv, const Vector< Real > &v, const Vector< Real > &x, Real &tol) |
Apply inverse Hessian approximation to vector. More... | |
virtual void | precond (Vector< Real > &Pv, const Vector< Real > &v, const Vector< Real > &x, Real &tol) |
Apply preconditioner to vector. More... | |
virtual void | prox (Vector< Real > &Pv, const Vector< Real > &v, Real t, Real &tol) |
Compute the proximity operator. More... | |
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. 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 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. More... | |
Private Member Functions | |
void | computePenalty (const Vector< Real > &x) |
void | initialize (const ROL::Vector< Real > &x, const ROL::Ptr< ROL::BoundConstraint< Real > > &bnd) |
Private Attributes | |
const ROL::Ptr< Objective< Real > > | obj_ |
const ROL::Ptr < BoundConstraint< Real > > | bnd_ |
ROL::Ptr< Vector< Real > > | g_ |
ROL::Ptr< Vector< Real > > | l_ |
ROL::Ptr< Vector< Real > > | u_ |
ROL::Ptr< Vector< Real > > | l1_ |
ROL::Ptr< Vector< Real > > | u1_ |
ROL::Ptr< Vector< Real > > | dl1_ |
ROL::Ptr< Vector< Real > > | du1_ |
ROL::Ptr< Vector< Real > > | xlam_ |
ROL::Ptr< Vector< Real > > | v_ |
ROL::Ptr< Vector< Real > > | dv_ |
ROL::Ptr< Vector< Real > > | dv2_ |
ROL::Ptr< Vector< Real > > | lam_ |
ROL::Ptr< Vector< Real > > | tmp_ |
Real | mu_ |
Real | fval_ |
bool | isConEvaluated_ |
int | nfval_ |
int | ngval_ |
bool | updateMultiplier_ |
bool | updatePenalty_ |
Additional Inherited Members | |
Protected Member Functions inherited from ROL::Objective< Real > | |
const std::vector< Real > | getParameter (void) const |
Provides the interface to evaluate the Moreau-Yosida penalty function.
Definition at line 31 of file ROL_MoreauYosidaPenalty.hpp.
|
inline |
Definition at line 124 of file ROL_MoreauYosidaPenalty.hpp.
|
inline |
Definition at line 126 of file ROL_MoreauYosidaPenalty.hpp.
References ROL::MoreauYosidaPenalty< Real >::initialize().
|
inline |
|
inline |
Definition at line 151 of file ROL_MoreauYosidaPenalty.hpp.
References ROL::MoreauYosidaPenalty< Real >::initialize(), ROL::MoreauYosidaPenalty< Real >::lam_, ROL::MoreauYosidaPenalty< Real >::mu_, ROL::MoreauYosidaPenalty< Real >::updateMultiplier_, and ROL::MoreauYosidaPenalty< Real >::updatePenalty_.
|
inlineprivate |
Definition at line 58 of file ROL_MoreauYosidaPenalty.hpp.
References ROL::MoreauYosidaPenalty< Real >::bnd_, ROL::MoreauYosidaPenalty< Real >::dl1_, ROL::MoreauYosidaPenalty< Real >::du1_, ROL::MoreauYosidaPenalty< Real >::isConEvaluated_, ROL::MoreauYosidaPenalty< Real >::l1_, ROL::MoreauYosidaPenalty< Real >::l_, ROL::MoreauYosidaPenalty< Real >::lam_, ROL::MoreauYosidaPenalty< Real >::mu_, ROL::MoreauYosidaPenalty< Real >::tmp_, ROL::MoreauYosidaPenalty< Real >::u1_, ROL::MoreauYosidaPenalty< Real >::u_, and ROL::MoreauYosidaPenalty< Real >::xlam_.
Referenced by ROL::MoreauYosidaPenalty< Real >::gradient(), ROL::MoreauYosidaPenalty< Real >::hessVec(), ROL::MoreauYosidaPenalty< Real >::testComplementarity(), ROL::MoreauYosidaPenalty< Real >::updateMultipliers(), and ROL::MoreauYosidaPenalty< Real >::value().
|
inlineprivate |
Definition at line 98 of file ROL_MoreauYosidaPenalty.hpp.
References ROL::MoreauYosidaPenalty< Real >::bnd_, ROL::Vector< Real >::clone(), ROL::MoreauYosidaPenalty< Real >::dl1_, ROL::MoreauYosidaPenalty< Real >::du1_, ROL::Vector< Real >::dual(), ROL::MoreauYosidaPenalty< Real >::dv2_, ROL::MoreauYosidaPenalty< Real >::dv_, ROL::MoreauYosidaPenalty< Real >::g_, ROL::MoreauYosidaPenalty< Real >::l1_, ROL::MoreauYosidaPenalty< Real >::l_, ROL::MoreauYosidaPenalty< Real >::lam_, ROL::MoreauYosidaPenalty< Real >::tmp_, ROL::MoreauYosidaPenalty< Real >::u1_, ROL::MoreauYosidaPenalty< Real >::u_, ROL::MoreauYosidaPenalty< Real >::v_, and ROL::MoreauYosidaPenalty< Real >::xlam_.
Referenced by ROL::MoreauYosidaPenalty< Real >::MoreauYosidaPenalty().
|
inline |
Definition at line 166 of file ROL_MoreauYosidaPenalty.hpp.
References ROL::MoreauYosidaPenalty< Real >::bnd_, ROL::MoreauYosidaPenalty< Real >::computePenalty(), ROL::MoreauYosidaPenalty< Real >::isConEvaluated_, ROL::MoreauYosidaPenalty< Real >::l1_, ROL::MoreauYosidaPenalty< Real >::lam_, ROL::MoreauYosidaPenalty< Real >::mu_, ROL::MoreauYosidaPenalty< Real >::nfval_, ROL::MoreauYosidaPenalty< Real >::ngval_, ROL::MoreauYosidaPenalty< Real >::u1_, ROL::MoreauYosidaPenalty< Real >::updateMultiplier_, and ROL::MoreauYosidaPenalty< Real >::updatePenalty_.
Referenced by ROL::MoreauYosidaPenaltyStep< Real >::update().
|
inline |
|
inline |
Definition at line 190 of file ROL_MoreauYosidaPenalty.hpp.
References ROL::MoreauYosidaPenalty< Real >::bnd_, ROL::MoreauYosidaPenalty< Real >::computePenalty(), ROL::MoreauYosidaPenalty< Real >::l1_, ROL::MoreauYosidaPenalty< Real >::l_, ROL::MoreauYosidaPenalty< Real >::mu_, ROL::MoreauYosidaPenalty< Real >::tmp_, ROL::MoreauYosidaPenalty< Real >::u1_, and ROL::MoreauYosidaPenalty< Real >::u_.
Referenced by ROL::MoreauYosidaPenaltyStep< Real >::updateState().
|
inline |
Definition at line 213 of file ROL_MoreauYosidaPenalty.hpp.
References ROL::MoreauYosidaPenalty< Real >::fval_.
|
inline |
Definition at line 217 of file ROL_MoreauYosidaPenalty.hpp.
References ROL::MoreauYosidaPenalty< Real >::g_.
|
inline |
Definition at line 221 of file ROL_MoreauYosidaPenalty.hpp.
References ROL::MoreauYosidaPenalty< Real >::nfval_.
Referenced by ROL::MoreauYosidaPenaltyStep< Real >::update().
|
inline |
Definition at line 225 of file ROL_MoreauYosidaPenalty.hpp.
References ROL::MoreauYosidaPenalty< Real >::ngval_.
Referenced by ROL::MoreauYosidaPenaltyStep< Real >::update().
|
inlinevirtual |
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. |
Reimplemented from ROL::Objective< Real >.
Definition at line 236 of file ROL_MoreauYosidaPenalty.hpp.
References ROL::MoreauYosidaPenalty< Real >::isConEvaluated_, and ROL::MoreauYosidaPenalty< Real >::obj_.
Referenced by ROL::MoreauYosidaPenaltyStep< Real >::update(), and ROL::MoreauYosidaPenaltyStep< Real >::updateState().
|
inlinevirtual |
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. |
Implements ROL::Objective< Real >.
Definition at line 247 of file ROL_MoreauYosidaPenalty.hpp.
References ROL::MoreauYosidaPenalty< Real >::bnd_, ROL::MoreauYosidaPenalty< Real >::computePenalty(), ROL::MoreauYosidaPenalty< Real >::fval_, ROL::MoreauYosidaPenalty< Real >::l1_, ROL::MoreauYosidaPenalty< Real >::mu_, ROL::MoreauYosidaPenalty< Real >::nfval_, ROL::MoreauYosidaPenalty< Real >::obj_, and ROL::MoreauYosidaPenalty< Real >::u1_.
Referenced by ROL::MoreauYosidaPenaltyStep< Real >::updateState().
|
inlinevirtual |
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. |
Reimplemented from ROL::Objective< Real >.
Definition at line 268 of file ROL_MoreauYosidaPenalty.hpp.
References ROL::Vector< Real >::axpy(), ROL::MoreauYosidaPenalty< Real >::bnd_, ROL::MoreauYosidaPenalty< Real >::computePenalty(), ROL::MoreauYosidaPenalty< Real >::dl1_, ROL::MoreauYosidaPenalty< Real >::du1_, ROL::MoreauYosidaPenalty< Real >::g_, ROL::MoreauYosidaPenalty< Real >::mu_, ROL::MoreauYosidaPenalty< Real >::ngval_, ROL::MoreauYosidaPenalty< Real >::obj_, and ROL::Vector< Real >::set().
Referenced by ROL::MoreauYosidaPenaltyStep< Real >::updateState().
|
inlinevirtual |
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. |
Reimplemented from ROL::Objective< Real >.
Definition at line 289 of file ROL_MoreauYosidaPenalty.hpp.
References ROL::Vector< Real >::axpy(), ROL::MoreauYosidaPenalty< Real >::bnd_, ROL::MoreauYosidaPenalty< Real >::computePenalty(), ROL::MoreauYosidaPenalty< Real >::dv2_, ROL::MoreauYosidaPenalty< Real >::dv_, ROL::MoreauYosidaPenalty< Real >::mu_, ROL::MoreauYosidaPenalty< Real >::obj_, ROL::MoreauYosidaPenalty< Real >::v_, and ROL::MoreauYosidaPenalty< Real >::xlam_.
|
inlinevirtual |
Reimplemented from ROL::Objective< Real >.
Definition at line 323 of file ROL_MoreauYosidaPenalty.hpp.
References ROL::MoreauYosidaPenalty< Real >::obj_, and ROL::Objective< Real >::setParameter().
|
private |
Definition at line 33 of file ROL_MoreauYosidaPenalty.hpp.
Referenced by ROL::MoreauYosidaPenalty< Real >::gradient(), ROL::MoreauYosidaPenalty< Real >::hessVec(), ROL::MoreauYosidaPenalty< Real >::setParameter(), ROL::MoreauYosidaPenalty< Real >::update(), and ROL::MoreauYosidaPenalty< Real >::value().
|
private |
Definition at line 34 of file ROL_MoreauYosidaPenalty.hpp.
Referenced by ROL::MoreauYosidaPenalty< Real >::computePenalty(), ROL::MoreauYosidaPenalty< Real >::gradient(), ROL::MoreauYosidaPenalty< Real >::hessVec(), ROL::MoreauYosidaPenalty< Real >::initialize(), ROL::MoreauYosidaPenalty< Real >::testComplementarity(), ROL::MoreauYosidaPenalty< Real >::updateMultipliers(), and ROL::MoreauYosidaPenalty< Real >::value().
|
private |
Definition at line 36 of file ROL_MoreauYosidaPenalty.hpp.
Referenced by ROL::MoreauYosidaPenalty< Real >::getGradient(), ROL::MoreauYosidaPenalty< Real >::gradient(), and ROL::MoreauYosidaPenalty< Real >::initialize().
|
private |
Definition at line 37 of file ROL_MoreauYosidaPenalty.hpp.
Referenced by ROL::MoreauYosidaPenalty< Real >::computePenalty(), ROL::MoreauYosidaPenalty< Real >::initialize(), and ROL::MoreauYosidaPenalty< Real >::testComplementarity().
|
private |
Definition at line 38 of file ROL_MoreauYosidaPenalty.hpp.
Referenced by ROL::MoreauYosidaPenalty< Real >::computePenalty(), ROL::MoreauYosidaPenalty< Real >::initialize(), and ROL::MoreauYosidaPenalty< Real >::testComplementarity().
|
private |
Definition at line 39 of file ROL_MoreauYosidaPenalty.hpp.
Referenced by ROL::MoreauYosidaPenalty< Real >::computePenalty(), ROL::MoreauYosidaPenalty< Real >::initialize(), ROL::MoreauYosidaPenalty< Real >::testComplementarity(), ROL::MoreauYosidaPenalty< Real >::updateMultipliers(), and ROL::MoreauYosidaPenalty< Real >::value().
|
private |
Definition at line 40 of file ROL_MoreauYosidaPenalty.hpp.
Referenced by ROL::MoreauYosidaPenalty< Real >::computePenalty(), ROL::MoreauYosidaPenalty< Real >::initialize(), ROL::MoreauYosidaPenalty< Real >::testComplementarity(), ROL::MoreauYosidaPenalty< Real >::updateMultipliers(), and ROL::MoreauYosidaPenalty< Real >::value().
|
private |
Definition at line 41 of file ROL_MoreauYosidaPenalty.hpp.
Referenced by ROL::MoreauYosidaPenalty< Real >::computePenalty(), ROL::MoreauYosidaPenalty< Real >::gradient(), and ROL::MoreauYosidaPenalty< Real >::initialize().
|
private |
Definition at line 42 of file ROL_MoreauYosidaPenalty.hpp.
Referenced by ROL::MoreauYosidaPenalty< Real >::computePenalty(), ROL::MoreauYosidaPenalty< Real >::gradient(), and ROL::MoreauYosidaPenalty< Real >::initialize().
|
private |
Definition at line 43 of file ROL_MoreauYosidaPenalty.hpp.
Referenced by ROL::MoreauYosidaPenalty< Real >::computePenalty(), ROL::MoreauYosidaPenalty< Real >::hessVec(), and ROL::MoreauYosidaPenalty< Real >::initialize().
|
private |
Definition at line 44 of file ROL_MoreauYosidaPenalty.hpp.
Referenced by ROL::MoreauYosidaPenalty< Real >::hessVec(), and ROL::MoreauYosidaPenalty< Real >::initialize().
|
private |
Definition at line 45 of file ROL_MoreauYosidaPenalty.hpp.
Referenced by ROL::MoreauYosidaPenalty< Real >::hessVec(), and ROL::MoreauYosidaPenalty< Real >::initialize().
|
private |
Definition at line 46 of file ROL_MoreauYosidaPenalty.hpp.
Referenced by ROL::MoreauYosidaPenalty< Real >::hessVec(), and ROL::MoreauYosidaPenalty< Real >::initialize().
|
private |
Definition at line 47 of file ROL_MoreauYosidaPenalty.hpp.
Referenced by ROL::MoreauYosidaPenalty< Real >::computePenalty(), ROL::MoreauYosidaPenalty< Real >::initialize(), ROL::MoreauYosidaPenalty< Real >::MoreauYosidaPenalty(), ROL::MoreauYosidaPenalty< Real >::reset(), and ROL::MoreauYosidaPenalty< Real >::updateMultipliers().
|
private |
Definition at line 48 of file ROL_MoreauYosidaPenalty.hpp.
Referenced by ROL::MoreauYosidaPenalty< Real >::computePenalty(), ROL::MoreauYosidaPenalty< Real >::initialize(), and ROL::MoreauYosidaPenalty< Real >::testComplementarity().
|
private |
Definition at line 50 of file ROL_MoreauYosidaPenalty.hpp.
Referenced by ROL::MoreauYosidaPenalty< Real >::computePenalty(), ROL::MoreauYosidaPenalty< Real >::gradient(), ROL::MoreauYosidaPenalty< Real >::hessVec(), ROL::MoreauYosidaPenalty< Real >::MoreauYosidaPenalty(), ROL::MoreauYosidaPenalty< Real >::reset(), ROL::MoreauYosidaPenalty< Real >::testComplementarity(), ROL::MoreauYosidaPenalty< Real >::updateMultipliers(), and ROL::MoreauYosidaPenalty< Real >::value().
|
private |
Definition at line 51 of file ROL_MoreauYosidaPenalty.hpp.
Referenced by ROL::MoreauYosidaPenalty< Real >::getObjectiveValue(), and ROL::MoreauYosidaPenalty< Real >::value().
|
private |
Definition at line 52 of file ROL_MoreauYosidaPenalty.hpp.
Referenced by ROL::MoreauYosidaPenalty< Real >::computePenalty(), ROL::MoreauYosidaPenalty< Real >::reset(), ROL::MoreauYosidaPenalty< Real >::update(), and ROL::MoreauYosidaPenalty< Real >::updateMultipliers().
|
private |
|
private |
|
private |
Definition at line 55 of file ROL_MoreauYosidaPenalty.hpp.
Referenced by ROL::MoreauYosidaPenalty< Real >::MoreauYosidaPenalty(), and ROL::MoreauYosidaPenalty< Real >::updateMultipliers().
|
private |
Definition at line 56 of file ROL_MoreauYosidaPenalty.hpp.
Referenced by ROL::MoreauYosidaPenalty< Real >::MoreauYosidaPenalty(), and ROL::MoreauYosidaPenalty< Real >::updateMultipliers().