ROL
Public Member Functions | Private Member Functions | Private Attributes | List of all members
ROL::MoreauYosidaObjective< Real > Class Template Reference

Provides the interface to evaluate the Moreau-Yosida penalty function. More...

#include <ROL_MoreauYosidaObjective.hpp>

+ Inheritance diagram for ROL::MoreauYosidaObjective< Real >:

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 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. 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...
 
- Public Member Functions inherited from ROL::Objective< Real >
virtual ~Objective ()
 
 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 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)
 
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 > &param)
 

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

Detailed Description

template<class Real>
class ROL::MoreauYosidaObjective< Real >

Provides the interface to evaluate the Moreau-Yosida penalty function.


Definition at line 33 of file ROL_MoreauYosidaObjective.hpp.

Constructor & Destructor Documentation

template<class Real>
ROL::MoreauYosidaObjective< Real >::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 
)
inline
template<class Real>
ROL::MoreauYosidaObjective< Real >::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 
)
inline
template<class Real>
ROL::MoreauYosidaObjective< Real >::MoreauYosidaObjective ( const Ptr< Objective< Real >> &  obj,
const Ptr< BoundConstraint< Real >> &  bnd,
const Vector< Real > &  x,
const Vector< Real > &  g,
ParameterList &  parlist 
)
inline
template<class Real>
ROL::MoreauYosidaObjective< Real >::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 
)
inline

Member Function Documentation

template<class Real>
void ROL::MoreauYosidaObjective< Real >::computePenalty ( const Vector< Real > &  x)
inlineprivate
template<class Real>
void ROL::MoreauYosidaObjective< Real >::initialize ( const Vector< Real > &  x,
const Vector< Real > &  g 
)
inlineprivate
template<class Real>
void ROL::MoreauYosidaObjective< Real >::updateMultipliers ( Real  mu,
const Vector< Real > &  x 
)
inline
template<class Real>
void ROL::MoreauYosidaObjective< Real >::reset ( const Real  mu)
inline
template<class Real>
Real ROL::MoreauYosidaObjective< Real >::testComplementarity ( const Vector< Real > &  x)
inline
template<class Real>
Real ROL::MoreauYosidaObjective< Real >::getObjectiveValue ( const Vector< Real > &  x,
Real &  tol 
)
inline
template<class Real>
void ROL::MoreauYosidaObjective< Real >::getObjectiveGradient ( Vector< Real > &  g,
const Vector< Real > &  x,
Real &  tol 
)
inline
template<class Real>
int ROL::MoreauYosidaObjective< Real >::getNumberFunctionEvaluations ( void  )
inline
template<class Real>
int ROL::MoreauYosidaObjective< Real >::getNumberGradientEvaluations ( void  )
inline
template<class Real>
void ROL::MoreauYosidaObjective< Real >::update ( const Vector< Real > &  x,
UpdateType  type,
int  iter = -1 
)
inlinevirtual

Update Moreau-Yosida penalty function.

This function updates the Moreau-Yosida penalty function at new iterations.

Parameters
[in]xis the new iterate.
[in]flagis true if the iterate has changed.
[in]iteris the outer algorithm iterations count.

Reimplemented from ROL::Objective< Real >.

Definition at line 260 of file ROL_MoreauYosidaObjective.hpp.

References ROL::MoreauYosidaObjective< Real >::fval_, ROL::MoreauYosidaObjective< Real >::gradient_, ROL::MoreauYosidaObjective< Real >::isPenEvaluated_, and ROL::MoreauYosidaObjective< Real >::obj_.

Referenced by ROL::TypeB::MoreauYosidaAlgorithm< Real >::updateState(), and ROL::TypeG::MoreauYosidaAlgorithm< Real >::updateState().

template<class Real>
Real ROL::MoreauYosidaObjective< Real >::value ( const Vector< Real > &  x,
Real &  tol 
)
inlinevirtual

Compute value.

This function returns the Moreau-Yosida penalty value.

Parameters
[in]xis the current iterate.
[in]tolis a tolerance for inexact Moreau-Yosida penalty computation.

Implements ROL::Objective< Real >.

Definition at line 274 of file ROL_MoreauYosidaObjective.hpp.

References ROL::MoreauYosidaObjective< Real >::bnd_, ROL::MoreauYosidaObjective< Real >::computePenalty(), ROL::MoreauYosidaObjective< Real >::getObjectiveValue(), ROL::MoreauYosidaObjective< Real >::l1_, ROL::MoreauYosidaObjective< Real >::mu_, and ROL::MoreauYosidaObjective< Real >::u1_.

template<class Real>
void ROL::MoreauYosidaObjective< Real >::gradient ( Vector< Real > &  g,
const Vector< Real > &  x,
Real &  tol 
)
inlinevirtual

Compute gradient.

This function returns the Moreau-Yosida penalty gradient.

Parameters
[out]gis the gradient.
[in]xis the current iterate.
[in]tolis a tolerance for inexact Moreau-Yosida penalty computation.

Reimplemented from ROL::Objective< Real >.

Definition at line 293 of file ROL_MoreauYosidaObjective.hpp.

References ROL::Vector< Real >::axpy(), ROL::MoreauYosidaObjective< Real >::bnd_, ROL::MoreauYosidaObjective< Real >::computePenalty(), ROL::MoreauYosidaObjective< Real >::dl1_, ROL::MoreauYosidaObjective< Real >::du1_, ROL::MoreauYosidaObjective< Real >::getObjectiveGradient(), and ROL::MoreauYosidaObjective< Real >::mu_.

template<class Real>
void ROL::MoreauYosidaObjective< Real >::hessVec ( Vector< Real > &  hv,
const Vector< Real > &  v,
const Vector< Real > &  x,
Real &  tol 
)
inlinevirtual

Apply Hessian approximation to vector.

This function applies the Hessian of the Moreau-Yosida penalty to the vector \(v\).

Parameters
[out]hvis the the action of the Hessian on \(v\).
[in]vis the direction vector.
[in]xis the current iterate.
[in]tolis a tolerance for inexact Moreau-Yosida penalty computation.

Reimplemented from ROL::Objective< Real >.

Definition at line 312 of file ROL_MoreauYosidaObjective.hpp.

References ROL::Vector< Real >::axpy(), ROL::MoreauYosidaObjective< Real >::bnd_, ROL::MoreauYosidaObjective< Real >::computePenalty(), ROL::MoreauYosidaObjective< Real >::dv2_, ROL::MoreauYosidaObjective< Real >::dv_, ROL::MoreauYosidaObjective< Real >::mu_, ROL::MoreauYosidaObjective< Real >::obj_, ROL::MoreauYosidaObjective< Real >::v_, and ROL::MoreauYosidaObjective< Real >::xlam_.

Member Data Documentation

template<class Real>
const Ptr<Objective<Real> > ROL::MoreauYosidaObjective< Real >::obj_
private
template<class Real>
const Ptr<BoundConstraint<Real> > ROL::MoreauYosidaObjective< Real >::bnd_
private
template<class Real>
Ptr<Vector<Real> > ROL::MoreauYosidaObjective< Real >::l_
private
template<class Real>
Ptr<Vector<Real> > ROL::MoreauYosidaObjective< Real >::u_
private
template<class Real>
Ptr<Vector<Real> > ROL::MoreauYosidaObjective< Real >::l1_
private
template<class Real>
Ptr<Vector<Real> > ROL::MoreauYosidaObjective< Real >::u1_
private
template<class Real>
Ptr<Vector<Real> > ROL::MoreauYosidaObjective< Real >::dl1_
private
template<class Real>
Ptr<Vector<Real> > ROL::MoreauYosidaObjective< Real >::du1_
private
template<class Real>
Ptr<Vector<Real> > ROL::MoreauYosidaObjective< Real >::xlam_
private
template<class Real>
Ptr<Vector<Real> > ROL::MoreauYosidaObjective< Real >::v_
private
template<class Real>
Ptr<Vector<Real> > ROL::MoreauYosidaObjective< Real >::dv_
private
template<class Real>
Ptr<Vector<Real> > ROL::MoreauYosidaObjective< Real >::dv2_
private
template<class Real>
Ptr<Vector<Real> > ROL::MoreauYosidaObjective< Real >::lam_
private
template<class Real>
Ptr<Vector<Real> > ROL::MoreauYosidaObjective< Real >::tmp_
private
template<class Real>
Ptr<ScalarController<Real,int> > ROL::MoreauYosidaObjective< Real >::fval_
private
template<class Real>
Ptr<VectorController<Real,int> > ROL::MoreauYosidaObjective< Real >::gradient_
private
template<class Real>
Real ROL::MoreauYosidaObjective< Real >::mu_
private
template<class Real>
bool ROL::MoreauYosidaObjective< Real >::isPenEvaluated_
private
template<class Real>
int ROL::MoreauYosidaObjective< Real >::nfval_
private
template<class Real>
int ROL::MoreauYosidaObjective< Real >::ngrad_
private
template<class Real>
bool ROL::MoreauYosidaObjective< Real >::updateMultiplier_
private
template<class Real>
bool ROL::MoreauYosidaObjective< Real >::updatePenalty_
private

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