ROL
Public Member Functions | Private Types | Private Attributes | Static 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 Teuchos::RCP< Objective< Real > > &obj, const Teuchos::RCP< Objective< Real > > &slack_barrier, const Vector< Real > &x, Real mu)
 
 PenalizedObjective (const Teuchos::RCP< Objective< Real > > &obj, const Teuchos::RCP< Objective< Real > > &slack_barrier, const Teuchos::RCP< Objective< Real > > &bc_barrier, const Vector< Real > &x, Real mu)
 
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 barrier penalized objective function. More...
 
Real value (const Vector< Real > &x, Real &tol)
 Compute value. More...
 
Real getObjectiveValue ()
 
void gradient (Vector< Real > &g, const Vector< Real > &x, Real &tol)
 Compute gradient. More...
 
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. More...
 
- Public Member Functions inherited from ROL::Objective< Real >
virtual ~Objective ()
 
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 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 Types

typedef Vector< Real > V
 
typedef PartitionedVector< Real > PV
 
typedef PV::size_type size_type
 

Private Attributes

Teuchos::RCP< Objective< Real > > obj_
 
Teuchos::RCP< Objective< Real > > slack_barrier_
 
Teuchos::RCP< Objective< Real > > bc_barrier_
 
Teuchos::RCP< PVx_
 
Teuchos::RCP< PVg_
 
Teuchos::RCP< Vscratch_
 
Real mu_
 
int nfval_
 
int ngval_
 
Real fval_
 
Real gnorm_
 
bool hasBoundConstraint_
 

Static Private Attributes

static const size_type OPT = 0
 
static const size_type SLACK = 1
 

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

◆ V

template<class Real >
typedef Vector<Real> ROL::InteriorPoint::PenalizedObjective< Real >::V
private

Definition at line 60 of file ROL_InteriorPoint.hpp.

◆ PV

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

Definition at line 61 of file ROL_InteriorPoint.hpp.

◆ size_type

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

Definition at line 62 of file ROL_InteriorPoint.hpp.

Constructor & Destructor Documentation

◆ PenalizedObjective() [1/2]

template<class Real >
ROL::InteriorPoint::PenalizedObjective< Real >::PenalizedObjective ( const Teuchos::RCP< Objective< Real > > &  obj,
const Teuchos::RCP< Objective< Real > > &  slack_barrier,
const Vector< Real > &  x,
Real  mu 
)
inline

◆ PenalizedObjective() [2/2]

template<class Real >
ROL::InteriorPoint::PenalizedObjective< Real >::PenalizedObjective ( const Teuchos::RCP< Objective< Real > > &  obj,
const Teuchos::RCP< Objective< Real > > &  slack_barrier,
const Teuchos::RCP< Objective< Real > > &  bc_barrier,
const Vector< Real > &  x,
Real  mu 
)
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 barrier penalized objective function.

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

References ROL::InteriorPoint::PenalizedObjective< Real >::bc_barrier_, ROL::PartitionedVector< Real >::get(), ROL::InteriorPoint::PenalizedObjective< Real >::hasBoundConstraint_, ROL::InteriorPoint::PenalizedObjective< Real >::obj_, ROL::InteriorPoint::PenalizedObjective< Real >::OPT, ROL::InteriorPoint::PenalizedObjective< Real >::SLACK, and ROL::InteriorPoint::PenalizedObjective< Real >::slack_barrier_.

◆ value()

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

◆ getObjectiveValue()

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

◆ gradient()

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

◆ getObjectiveGradient()

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

Definition at line 238 of file ROL_InteriorPoint.hpp.

◆ 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 barrier penalized objective 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.

Reimplemented from ROL::Objective< Real >.

Definition at line 255 of file ROL_InteriorPoint.hpp.

References ROL::InteriorPoint::PenalizedObjective< Real >::bc_barrier_, ROL::PartitionedVector< Real >::get(), ROL::InteriorPoint::PenalizedObjective< Real >::hasBoundConstraint_, ROL::InteriorPoint::PenalizedObjective< Real >::mu_, ROL::InteriorPoint::PenalizedObjective< Real >::obj_, ROL::InteriorPoint::PenalizedObjective< Real >::OPT, ROL::InteriorPoint::PenalizedObjective< Real >::scratch_, ROL::InteriorPoint::PenalizedObjective< Real >::SLACK, and ROL::InteriorPoint::PenalizedObjective< Real >::slack_barrier_.

Member Data Documentation

◆ OPT

template<class Real >
const size_type ROL::InteriorPoint::PenalizedObjective< Real >::OPT = 0
staticprivate

◆ SLACK

template<class Real >
const size_type ROL::InteriorPoint::PenalizedObjective< Real >::SLACK = 1
staticprivate

◆ obj_

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

◆ slack_barrier_

template<class Real >
Teuchos::RCP<Objective<Real> > ROL::InteriorPoint::PenalizedObjective< Real >::slack_barrier_
private

◆ bc_barrier_

template<class Real >
Teuchos::RCP<Objective<Real> > ROL::InteriorPoint::PenalizedObjective< Real >::bc_barrier_
private

◆ x_

template<class Real >
Teuchos::RCP<PV> ROL::InteriorPoint::PenalizedObjective< Real >::x_
private

◆ g_

template<class Real >
Teuchos::RCP<PV> ROL::InteriorPoint::PenalizedObjective< Real >::g_
private

◆ scratch_

template<class Real >
Teuchos::RCP<V> ROL::InteriorPoint::PenalizedObjective< Real >::scratch_
private

◆ mu_

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

◆ nfval_

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

◆ ngval_

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

◆ fval_

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

◆ gnorm_

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

◆ hasBoundConstraint_

template<class Real >
bool ROL::InteriorPoint::PenalizedObjective< Real >::hasBoundConstraint_
private

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