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...
 

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
 

Detailed Description

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

Definition at line 57 of file ROL_InteriorPoint.hpp.

Member Typedef Documentation

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

Definition at line 60 of file ROL_InteriorPoint.hpp.

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

Definition at line 61 of file ROL_InteriorPoint.hpp.

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

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
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

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

Definition at line 123 of file ROL_InteriorPoint.hpp.

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

Definition at line 135 of file ROL_InteriorPoint.hpp.

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::PartitionedVector< Real >::get().

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

Compute value.

This function returns the barrier objective value.

Parameters
[in]xis the current iterate.
[in]tolis a tolerance.

Implements ROL::Objective< Real >.

Definition at line 169 of file ROL_InteriorPoint.hpp.

References ROL::PartitionedVector< Real >::get(), and ROL::InteriorPoint::PenalizedObjective< Real >::nfval_.

template<class Real >
Real ROL::InteriorPoint::PenalizedObjective< Real >::getObjectiveValue ( )
inline
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 barrier penalized objective gradient.

Parameters
[out]gis the gradient.
[in]xis the current iterate.
[in]tolis a tolerance.

Reimplemented from ROL::Objective< Real >.

Definition at line 206 of file ROL_InteriorPoint.hpp.

References ROL::PartitionedVector< Real >::get(), ROL::InteriorPoint::PenalizedObjective< Real >::ngval_, and ROL::Vector< Real >::norm().

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

Definition at line 238 of file ROL_InteriorPoint.hpp.

template<class Real >
Real ROL::InteriorPoint::PenalizedObjective< Real >::getGradientNorm ( )
inline
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::PartitionedVector< Real >::get().

Member Data Documentation

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

Definition at line 64 of file ROL_InteriorPoint.hpp.

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

Definition at line 65 of file ROL_InteriorPoint.hpp.

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

Definition at line 67 of file ROL_InteriorPoint.hpp.

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

Definition at line 68 of file ROL_InteriorPoint.hpp.

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

Definition at line 69 of file ROL_InteriorPoint.hpp.

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

Definition at line 70 of file ROL_InteriorPoint.hpp.

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

Definition at line 71 of file ROL_InteriorPoint.hpp.

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

Definition at line 72 of file ROL_InteriorPoint.hpp.

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

Definition at line 75 of file ROL_InteriorPoint.hpp.

template<class Real >
int ROL::InteriorPoint::PenalizedObjective< Real >::nfval_
private
template<class Real >
int ROL::InteriorPoint::PenalizedObjective< Real >::ngval_
private
template<class Real >
Real ROL::InteriorPoint::PenalizedObjective< Real >::fval_
private
template<class Real >
Real ROL::InteriorPoint::PenalizedObjective< Real >::gnorm_
private
template<class Real >
bool ROL::InteriorPoint::PenalizedObjective< Real >::hasBoundConstraint_
private

Definition at line 80 of file ROL_InteriorPoint.hpp.


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