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

#include <ROL_InteriorPoint.hpp>

+ Inheritance diagram for ROL::InteriorPoint::PenalizedObjective< Real >:

Public Member Functions

 PenalizedObjective (const ROL::Ptr< Objective< Real > > &obj, const ROL::Ptr< BoundConstraint< Real > > &bnd, const Vector< Real > &x, ROL::ParameterList &parlist)
 
void updatePenalty (Real mu)
 
int getNumberFunctionEvaluations (void)
 
int getNumberGradientEvaluations (void)
 
void reset (void)
 
void update (const Vector< Real > &x, bool flag=true, int iter=-1)
 Update objective function.
 
Real value (const Vector< Real > &x, Real &tol)
 Compute value.
 
Real getObjectiveValue (void)
 
void gradient (Vector< Real > &g, const Vector< Real > &x, Real &tol)
 Compute gradient.
 
void getObjectiveGradient (Vector< Real > &g)
 
Real getGradientNorm ()
 
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::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 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 void setParameter (const std::vector< Real > &param)
 

Private Types

typedef PartitionedVector< Real >::size_type size_type
 

Private Attributes

ROL::Ptr< Objective< Real > > obj_
 
ROL::Ptr< Objective< Real > > barrier_
 
ROL::Ptr< Vector< Real > > x_
 
ROL::Ptr< Vector< Real > > g_
 
ROL::Ptr< Vector< Real > > scratch_
 
Real mu_
 
Real fval_
 
Real gnorm_
 
int nfval_
 
int ngval_
 

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::InteriorPoint::PenalizedObjective< Real >

Definition at line 57 of file ROL_InteriorPoint.hpp.

Member Typedef Documentation

◆ size_type

template<class Real >
typedef PartitionedVector<Real>::size_type ROL::InteriorPoint::PenalizedObjective< Real >::size_type
private

Definition at line 59 of file ROL_InteriorPoint.hpp.

Constructor & Destructor Documentation

◆ PenalizedObjective()

template<class Real >
ROL::InteriorPoint::PenalizedObjective< Real >::PenalizedObjective ( const ROL::Ptr< Objective< Real > > &  obj,
const ROL::Ptr< BoundConstraint< Real > > &  bnd,
const Vector< Real > &  x,
ROL::ParameterList &  parlist 
)
inline

Member Function Documentation

◆ updatePenalty()

template<class Real >
void ROL::InteriorPoint::PenalizedObjective< Real >::updatePenalty ( Real  mu)
inline

◆ getNumberFunctionEvaluations()

template<class Real >
int ROL::InteriorPoint::PenalizedObjective< Real >::getNumberFunctionEvaluations ( void  )
inline

◆ getNumberGradientEvaluations()

template<class Real >
int ROL::InteriorPoint::PenalizedObjective< Real >::getNumberGradientEvaluations ( void  )
inline

◆ reset()

template<class Real >
void ROL::InteriorPoint::PenalizedObjective< Real >::reset ( void  )
inline

◆ update()

template<class Real >
void ROL::InteriorPoint::PenalizedObjective< Real >::update ( const Vector< Real > &  x,
bool  flag = true,
int  iter = -1 
)
inlinevirtual

Update objective function.

This function updates the objective 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 105 of file ROL_InteriorPoint.hpp.

References ROL::InteriorPoint::PenalizedObjective< Real >::barrier_, and ROL::InteriorPoint::PenalizedObjective< Real >::obj_.

◆ value()

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

Compute value.

This function returns the objective function value.

Parameters
[in]xis the current iterate.
[in]tolis a tolerance for inexact objective function computation.

Implements ROL::Objective< Real >.

Definition at line 111 of file ROL_InteriorPoint.hpp.

References ROL::InteriorPoint::PenalizedObjective< Real >::barrier_, ROL::InteriorPoint::PenalizedObjective< Real >::fval_, ROL::InteriorPoint::PenalizedObjective< Real >::mu_, ROL::InteriorPoint::PenalizedObjective< Real >::nfval_, and ROL::InteriorPoint::PenalizedObjective< Real >::obj_.

◆ getObjectiveValue()

template<class Real >
Real ROL::InteriorPoint::PenalizedObjective< Real >::getObjectiveValue ( void  )
inline

◆ gradient()

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

Compute gradient.

This function returns the objective function gradient.

Parameters
[out]gis the gradient.
[in]xis the current iterate.
[in]tolis 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 126 of file ROL_InteriorPoint.hpp.

References ROL::InteriorPoint::PenalizedObjective< Real >::barrier_, ROL::InteriorPoint::PenalizedObjective< Real >::g_, ROL::InteriorPoint::PenalizedObjective< Real >::gnorm_, ROL::InteriorPoint::PenalizedObjective< Real >::mu_, ROL::InteriorPoint::PenalizedObjective< Real >::ngval_, ROL::Vector< Real >::norm(), ROL::InteriorPoint::PenalizedObjective< Real >::obj_, ROL::Vector< Real >::plus(), and ROL::InteriorPoint::PenalizedObjective< Real >::scratch_.

◆ getObjectiveGradient()

template<class Real >
void ROL::InteriorPoint::PenalizedObjective< Real >::getObjectiveGradient ( Vector< Real > &  g)
inline

◆ getGradientNorm()

template<class Real >
Real ROL::InteriorPoint::PenalizedObjective< Real >::getGradientNorm ( )
inline

◆ hessVec()

template<class Real >
void ROL::InteriorPoint::PenalizedObjective< 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 objective function 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 objective function computation.

Reimplemented from ROL::Objective< Real >.

Definition at line 146 of file ROL_InteriorPoint.hpp.

References ROL::InteriorPoint::PenalizedObjective< Real >::barrier_, ROL::InteriorPoint::PenalizedObjective< Real >::mu_, ROL::InteriorPoint::PenalizedObjective< Real >::obj_, ROL::Vector< Real >::plus(), and ROL::InteriorPoint::PenalizedObjective< Real >::scratch_.

Member Data Documentation

◆ obj_

template<class Real >
ROL::Ptr<Objective<Real> > ROL::InteriorPoint::PenalizedObjective< Real >::obj_
private

◆ barrier_

template<class Real >
ROL::Ptr<Objective<Real> > ROL::InteriorPoint::PenalizedObjective< Real >::barrier_
private

◆ x_

template<class Real >
ROL::Ptr<Vector<Real> > ROL::InteriorPoint::PenalizedObjective< Real >::x_
private

◆ g_

template<class Real >
ROL::Ptr<Vector<Real> > ROL::InteriorPoint::PenalizedObjective< Real >::g_
private

◆ scratch_

template<class Real >
ROL::Ptr<Vector<Real> > ROL::InteriorPoint::PenalizedObjective< Real >::scratch_
private

◆ mu_

template<class Real >
Real ROL::InteriorPoint::PenalizedObjective< Real >::mu_
private

◆ fval_

template<class Real >
Real ROL::InteriorPoint::PenalizedObjective< Real >::fval_
private

◆ gnorm_

template<class Real >
Real ROL::InteriorPoint::PenalizedObjective< Real >::gnorm_
private

◆ nfval_

template<class Real >
int ROL::InteriorPoint::PenalizedObjective< Real >::nfval_
private

◆ ngval_

template<class Real >
int ROL::InteriorPoint::PenalizedObjective< Real >::ngval_
private

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