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

Create a penalty objective from upper and lower bound vectors. More...

#include <ROL_ObjectiveFromBoundConstraint.hpp>

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

Public Member Functions

 ObjectiveFromBoundConstraint (const BoundConstraint< Real > &bc, ROL::ParameterList &parlist)
 
 ObjectiveFromBoundConstraint (const BoundConstraint< Real > &bc)
 
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...
 
ROL::Ptr< Vector< Real > > getBarrierVector (void)
 
- Public Member Functions inherited from ROL::Objective< Real >
virtual ~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 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

enum  EBarrierType { BARRIER_LOGARITHM = 0, BARRIER_QUADRATIC, BARRIER_DOUBLEWELL, BARRIER_LAST }
 
typedef Vector< Real > V
 
typedef Elementwise::Fill< Real > Fill
 
typedef
Elementwise::Reciprocal< Real > 
Reciprocal
 
typedef Elementwise::Power< Real > Power
 
typedef Elementwise::Logarithm
< Real > 
Logarithm
 
typedef Elementwise::Multiply
< Real > 
Multiply
 
typedef Elementwise::Heaviside
< Real > 
Heaviside
 
typedef
Elementwise::ThresholdUpper
< Real > 
ThresholdUpper
 
typedef
Elementwise::ThresholdLower
< Real > 
ThresholdLower
 
typedef
Elementwise::ReductionSum
< Real > 
Sum
 
typedef
Elementwise::UnaryFunction
< Real > 
UnaryFunction
 

Private Member Functions

std::string EBarrierToString (EBarrierType type)
 
EBarrierType StringToEBarrierType (std::string s)
 

Private Attributes

enum
ROL::ObjectiveFromBoundConstraint::EBarrierType 
eBarrierType_
 
const ROL::Ptr< const Vlo_
 
const ROL::Ptr< const Vup_
 
ROL::Ptr< Va_
 
ROL::Ptr< Vb_
 
EBarrierType btype_
 
bool isLowerActivated_
 
bool isUpperActivated_
 

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::ObjectiveFromBoundConstraint< Real >

Create a penalty objective from upper and lower bound vectors.

Definition at line 52 of file ROL_ObjectiveFromBoundConstraint.hpp.

Member Typedef Documentation

template<class Real>
typedef Vector<Real> ROL::ObjectiveFromBoundConstraint< Real >::V
private

Definition at line 54 of file ROL_ObjectiveFromBoundConstraint.hpp.

template<class Real>
typedef Elementwise::Fill<Real> ROL::ObjectiveFromBoundConstraint< Real >::Fill
private

Definition at line 56 of file ROL_ObjectiveFromBoundConstraint.hpp.

template<class Real>
typedef Elementwise::Reciprocal<Real> ROL::ObjectiveFromBoundConstraint< Real >::Reciprocal
private

Definition at line 57 of file ROL_ObjectiveFromBoundConstraint.hpp.

template<class Real>
typedef Elementwise::Power<Real> ROL::ObjectiveFromBoundConstraint< Real >::Power
private

Definition at line 58 of file ROL_ObjectiveFromBoundConstraint.hpp.

template<class Real>
typedef Elementwise::Logarithm<Real> ROL::ObjectiveFromBoundConstraint< Real >::Logarithm
private

Definition at line 59 of file ROL_ObjectiveFromBoundConstraint.hpp.

template<class Real>
typedef Elementwise::Multiply<Real> ROL::ObjectiveFromBoundConstraint< Real >::Multiply
private

Definition at line 60 of file ROL_ObjectiveFromBoundConstraint.hpp.

template<class Real>
typedef Elementwise::Heaviside<Real> ROL::ObjectiveFromBoundConstraint< Real >::Heaviside
private

Definition at line 61 of file ROL_ObjectiveFromBoundConstraint.hpp.

template<class Real>
typedef Elementwise::ThresholdUpper<Real> ROL::ObjectiveFromBoundConstraint< Real >::ThresholdUpper
private

Definition at line 62 of file ROL_ObjectiveFromBoundConstraint.hpp.

template<class Real>
typedef Elementwise::ThresholdLower<Real> ROL::ObjectiveFromBoundConstraint< Real >::ThresholdLower
private

Definition at line 63 of file ROL_ObjectiveFromBoundConstraint.hpp.

template<class Real>
typedef Elementwise::ReductionSum<Real> ROL::ObjectiveFromBoundConstraint< Real >::Sum
private

Definition at line 64 of file ROL_ObjectiveFromBoundConstraint.hpp.

template<class Real>
typedef Elementwise::UnaryFunction<Real> ROL::ObjectiveFromBoundConstraint< Real >::UnaryFunction
private

Definition at line 65 of file ROL_ObjectiveFromBoundConstraint.hpp.

Member Enumeration Documentation

template<class Real>
enum ROL::ObjectiveFromBoundConstraint::EBarrierType
private
Enumerator
BARRIER_LOGARITHM 
BARRIER_QUADRATIC 
BARRIER_DOUBLEWELL 
BARRIER_LAST 

Definition at line 69 of file ROL_ObjectiveFromBoundConstraint.hpp.

Constructor & Destructor Documentation

template<class Real>
ROL::ObjectiveFromBoundConstraint< Real >::ObjectiveFromBoundConstraint ( const BoundConstraint< Real > &  bc,
ROL::ParameterList &  parlist 
)
inline
template<class Real>
ROL::ObjectiveFromBoundConstraint< Real >::ObjectiveFromBoundConstraint ( const BoundConstraint< Real > &  bc)
inline

Member Function Documentation

template<class Real>
std::string ROL::ObjectiveFromBoundConstraint< Real >::EBarrierToString ( EBarrierType  type)
inlineprivate
template<class Real>
EBarrierType ROL::ObjectiveFromBoundConstraint< Real >::StringToEBarrierType ( std::string  s)
inlineprivate
template<class Real>
Real ROL::ObjectiveFromBoundConstraint< Real >::value ( const Vector< Real > &  x,
Real &  tol 
)
inlinevirtual
template<class Real>
void ROL::ObjectiveFromBoundConstraint< 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 231 of file ROL_ObjectiveFromBoundConstraint.hpp.

References ROL::ObjectiveFromBoundConstraint< Real >::a_, ROL::ObjectiveFromBoundConstraint< Real >::b_, ROL::ObjectiveFromBoundConstraint< Real >::BARRIER_DOUBLEWELL, ROL::ObjectiveFromBoundConstraint< Real >::BARRIER_LOGARITHM, ROL::ObjectiveFromBoundConstraint< Real >::BARRIER_QUADRATIC, ROL::ObjectiveFromBoundConstraint< Real >::btype_, ROL::ObjectiveFromBoundConstraint< Real >::isLowerActivated_, ROL::ObjectiveFromBoundConstraint< Real >::isUpperActivated_, ROL::ObjectiveFromBoundConstraint< Real >::lo_, ROL::Vector< Real >::set(), ROL::ObjectiveFromBoundConstraint< Real >::up_, and zero.

Referenced by main().

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

Definition at line 399 of file ROL_ObjectiveFromBoundConstraint.hpp.

References ROL::ObjectiveFromBoundConstraint< Real >::b_.

Referenced by main().

Member Data Documentation

template<class Real>
enum ROL::ObjectiveFromBoundConstraint::EBarrierType ROL::ObjectiveFromBoundConstraint< Real >::eBarrierType_
private
template<class Real>
const ROL::Ptr<const V> ROL::ObjectiveFromBoundConstraint< Real >::lo_
private
template<class Real>
const ROL::Ptr<const V> ROL::ObjectiveFromBoundConstraint< Real >::up_
private
template<class Real>
ROL::Ptr<V> ROL::ObjectiveFromBoundConstraint< Real >::a_
private
template<class Real>
ROL::Ptr<V> ROL::ObjectiveFromBoundConstraint< Real >::b_
private
template<class Real>
EBarrierType ROL::ObjectiveFromBoundConstraint< Real >::btype_
private
template<class Real>
bool ROL::ObjectiveFromBoundConstraint< Real >::isLowerActivated_
private
template<class Real>
bool ROL::ObjectiveFromBoundConstraint< Real >::isUpperActivated_
private

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