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

#include <ROL_FletcherObjectiveE.hpp>

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

Classes

class  AugSystem
 
class  AugSystemPrecond
 

Public Member Functions

 FletcherObjectiveE (const ROL::Ptr< Objective< Real >> &obj, const ROL::Ptr< Constraint< Real >> &con, const Vector< Real > &xprim, const Vector< Real > &xdual, const Vector< Real > &cprim, const Vector< Real > &cdual, ROL::ParameterList &parlist)
 
Real value (const Vector< Real > &x, Real &tol) override
 Compute value. More...
 
void gradient (Vector< Real > &g, const Vector< Real > &x, Real &tol) override
 Compute gradient. More...
 
void hessVec (Vector< Real > &hv, const Vector< Real > &v, const Vector< Real > &x, Real &tol) override
 Apply Hessian approximation to vector. More...
 
- Public Member Functions inherited from ROL::FletcherObjectiveBase< Real >
 FletcherObjectiveBase (const Ptr< Objective< Real >> &obj, const Ptr< Constraint< Real >> &con, const Vector< Real > &xprim, const Vector< Real > &xdual, const Vector< Real > &cprim, const Vector< Real > &cdual, ParameterList &parlist)
 
virtual void update (const Vector< Real > &x, UpdateType type, int iter=-1) override
 Update objective function. More...
 
Ptr< const Vector< Real > > getLagrangianGradient (const Vector< Real > &x)
 
Ptr< const Vector< Real > > getConstraintVec (const Vector< Real > &x)
 
Ptr< const Vector< Real > > getMultiplierVec (const Vector< Real > &x)
 
Ptr< const Vector< Real > > getGradient (const Vector< Real > &x)
 
Real getObjectiveValue (const Vector< Real > &x)
 
int getNumberFunctionEvaluations () const
 
int getNumberGradientEvaluations () const
 
int getNumberConstraintEvaluations () const
 
void reset (Real sigma, Real delta)
 
- 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)
 

Protected Member Functions

void solveAugmentedSystem (Vector< Real > &v1, Vector< Real > &v2, const Vector< Real > &b1, const Vector< Real > &b2, const Vector< Real > &x, Real &tol, bool refine=false) override
 
- Protected Member Functions inherited from ROL::FletcherObjectiveBase< Real >
Real objValue (const Vector< Real > &x, Real &tol)
 
void objGrad (Vector< Real > &g, const Vector< Real > &x, Real &tol)
 
void conValue (Vector< Real > &c, const Vector< Real > &x, Real &tol)
 
void computeMultipliers (Vector< Real > &y, Vector< Real > &gL, const Vector< Real > &x, Vector< Real > &g, Vector< Real > &c, Real tol)
 
- Protected Member Functions inherited from ROL::Objective< Real >
const std::vector< Real > getParameter (void) const
 

Private Attributes

Ptr< Vector< Real > > Tv_
 
Ptr< Vector< Real > > w_
 
Ptr< Vector< Real > > v_
 
Ptr< Vector< Real > > wdual_
 
Ptr< Vector< Real > > wg_
 
Ptr< Vector< Real > > vg_
 
Ptr< Vector< Real > > xzeros_
 
Ptr< Vector< Real > > czeros_
 

Additional Inherited Members

- Protected Attributes inherited from ROL::FletcherObjectiveBase< Real >
const Ptr< Objective< Real > > obj_
 
const Ptr< Constraint< Real > > con_
 
Real sigma_
 
Real delta_
 
Real quadPenaltyParameter_
 
bool useInexact_
 
int HessianApprox_
 
int nfval_
 
int ngval_
 
int ncval_
 
Ptr< ScalarController< Real,
int > > 
fPhi_
 
Ptr< VectorController< Real,
int > > 
gPhi_
 
Ptr< VectorController< Real,
int > > 
y_
 
Ptr< ScalarController< Real,
int > > 
fval_
 
Ptr< VectorController< Real,
int > > 
g_
 
Ptr< VectorController< Real,
int > > 
c_
 
Ptr< Vector< Real > > scaledc_
 
Ptr< Vector< Real > > gL_
 
Ptr< Vector< Real > > gLdual_
 
Ptr< Vector< Real > > xprim_
 
Ptr< Vector< Real > > xdual_
 
Ptr< Vector< Real > > cprim_
 
Ptr< Vector< Real > > cdual_
 
Real cnorm_
 
Real multSolverError_
 
Real gradSolveError_
 
Ptr< Krylov< Real > > krylov_
 
int iterKrylov_
 
int flagKrylov_
 
Ptr< Vector< Real > > v1_
 
Ptr< Vector< Real > > v2_
 
Ptr< Vector< Real > > b1_
 
Ptr< Vector< Real > > b2_
 
Ptr< Vector< Real > > w1_
 
Ptr< Vector< Real > > w2_
 
Ptr< PartitionedVector< Real > > vv_
 
Ptr< PartitionedVector< Real > > bb_
 
Ptr< PartitionedVector< Real > > ww_
 

Detailed Description

template<typename Real>
class ROL::FletcherObjectiveE< Real >

Definition at line 18 of file ROL_FletcherObjectiveE.hpp.

Constructor & Destructor Documentation

template<typename Real >
ROL::FletcherObjectiveE< Real >::FletcherObjectiveE ( const ROL::Ptr< Objective< Real >> &  obj,
const ROL::Ptr< Constraint< Real >> &  con,
const Vector< Real > &  xprim,
const Vector< Real > &  xdual,
const Vector< Real > &  cprim,
const Vector< Real > &  cdual,
ROL::ParameterList &  parlist 
)

Member Function Documentation

template<typename Real >
Real ROL::FletcherObjectiveE< Real >::value ( const Vector< Real > &  x,
Real &  tol 
)
overridevirtual

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 36 of file ROL_FletcherObjectiveE_Def.hpp.

References ROL::FletcherObjectiveBase< Real >::computeMultipliers(), and ROL::FletcherObjectiveBase< Real >::objValue().

Referenced by ROL::TypeE::FletcherAlgorithm< Real >::initialize(), and ROL::TypeE::FletcherAlgorithm< Real >::run().

template<typename Real >
void ROL::FletcherObjectiveE< Real >::gradient ( Vector< Real > &  g,
const Vector< Real > &  x,
Real &  tol 
)
overridevirtual

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 63 of file ROL_FletcherObjectiveE_Def.hpp.

References ROL::Vector< Real >::axpy(), ROL::FletcherObjectiveBase< Real >::computeMultipliers(), obj_, and ROL::Vector< Real >::plus().

Referenced by ROL::TypeE::FletcherAlgorithm< Real >::initialize(), and ROL::TypeE::FletcherAlgorithm< Real >::run().

template<typename Real >
void ROL::FletcherObjectiveE< Real >::hessVec ( Vector< Real > &  hv,
const Vector< Real > &  v,
const Vector< Real > &  x,
Real &  tol 
)
overridevirtual

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 99 of file ROL_FletcherObjectiveE_Def.hpp.

References ROL::Vector< Real >::axpy(), ROL::FletcherObjectiveBase< Real >::computeMultipliers(), ROL::Vector< Real >::dual(), obj_, ROL::Vector< Real >::plus(), and ROL::Vector< Real >::scale().

template<typename Real >
void ROL::FletcherObjectiveE< Real >::solveAugmentedSystem ( Vector< Real > &  v1,
Vector< Real > &  v2,
const Vector< Real > &  b1,
const Vector< Real > &  b2,
const Vector< Real > &  x,
Real &  tol,
bool  refine = false 
)
overrideprotectedvirtual

Member Data Documentation

template<typename Real>
Ptr<Vector<Real> > ROL::FletcherObjectiveE< Real >::Tv_
private
template<typename Real>
Ptr<Vector<Real> > ROL::FletcherObjectiveE< Real >::w_
private
template<typename Real>
Ptr<Vector<Real> > ROL::FletcherObjectiveE< Real >::v_
private
template<typename Real>
Ptr<Vector<Real> > ROL::FletcherObjectiveE< Real >::wdual_
private
template<typename Real>
Ptr<Vector<Real> > ROL::FletcherObjectiveE< Real >::wg_
private
template<typename Real>
Ptr<Vector<Real> > ROL::FletcherObjectiveE< Real >::vg_
private
template<typename Real>
Ptr<Vector<Real> > ROL::FletcherObjectiveE< Real >::xzeros_
private
template<typename Real>
Ptr<Vector<Real> > ROL::FletcherObjectiveE< Real >::czeros_
private

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