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

#include <ROL_Fletcher.hpp>

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

Classes

class  AugSystem
 
class  AugSystemPrecond
 

Public Member Functions

 Fletcher (const ROL::Ptr< Objective< Real > > &obj, const ROL::Ptr< Constraint< Real > > &con, const Vector< Real > &optVec, const Vector< Real > &conVec, ROL::ParameterList &parlist)
 
void update (const Vector< Real > &x, bool flag=true, int iter=-1)
 Update objective function. More...
 
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...
 
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)
 
void computeMultipliers (const Vector< Real > &x, const Real tol)
 
- Public Member Functions inherited from ROL::FletcherBase< Real >
 FletcherBase (const ROL::Ptr< Objective< Real > > &obj, const ROL::Ptr< Constraint< Real > > &con)
 
const Ptr< Vector< Real > > getLagrangianGradient (const Vector< Real > &x)
 
const Ptr< Vector< Real > > getConstraintVec (const Vector< Real > &x)
 
const Ptr< Vector< Real > > getMultiplierVec (const Vector< Real > &x)
 
const Ptr< Vector< Real > > getGradient (const Vector< Real > &x)
 
Real getObjectiveValue (const Vector< Real > &x)
 
int getNumberFunctionEvaluations () const
 
int getNumberGradientEvaluations () const
 
int getNumberConstraintEvaluations () const
 
void setDelta (Real delta)
 
void setPenaltyParameter (Real sigma)
 
- 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 Attributes

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

Additional Inherited Members

- Protected Member Functions inherited from ROL::FletcherBase< Real >
void objValue (const Vector< Real > &x, Real &tol)
 
void objGrad (const Vector< Real > &x, Real &tol)
 
void conValue (const Vector< Real > &x, Real &tol)
 
- Protected Member Functions inherited from ROL::Objective< Real >
const std::vector< Real > getParameter (void) const
 
- Protected Attributes inherited from ROL::FletcherBase< Real >
const Ptr< Objective< Real > > obj_
 
const Ptr< Constraint< Real > > con_
 
Real penaltyParameter_
 
Real quadPenaltyParameter_
 
int nfval_
 
int ngval_
 
int ncval_
 
Real fPhi_
 
Ptr< Vector< Real > > gPhi_
 
Ptr< Vector< Real > > y_
 
Real fval_
 
Ptr< Vector< Real > > g_
 
Ptr< Vector< Real > > c_
 
Ptr< Vector< Real > > scaledc_
 
Ptr< Vector< Real > > gL_
 
Real cnorm_
 
bool isValueComputed_
 
bool isGradientComputed_
 
bool isMultiplierComputed_
 
bool isObjValueComputed_
 
bool isObjGradComputed_
 
bool isConValueComputed_
 
Real multSolverError_
 
Real gradSolveError_
 
Real delta_
 
bool useInexact_
 
Ptr< Krylov< Real > > krylov_
 
int iterKrylov_
 
int flagKrylov_
 
Ptr< Vector< Real > > v1_
 
Ptr< Vector< Real > > v2_
 
Ptr< PartitionedVector< Real > > vv_
 
Ptr< Vector< Real > > b1_
 
Ptr< Vector< Real > > b2_
 
Ptr< PartitionedVector< Real > > bb_
 
Ptr< Vector< Real > > w1_
 
Ptr< Vector< Real > > w2_
 
Ptr< PartitionedVector< Real > > ww_
 

Detailed Description

template<class Real>
class ROL::Fletcher< Real >

Definition at line 61 of file ROL_Fletcher.hpp.

Constructor & Destructor Documentation

template<class Real >
ROL::Fletcher< Real >::Fletcher ( const ROL::Ptr< Objective< Real > > &  obj,
const ROL::Ptr< Constraint< Real > > &  con,
const Vector< Real > &  optVec,
const Vector< Real > &  conVec,
ROL::ParameterList &  parlist 
)
inline

Member Function Documentation

template<class Real >
void ROL::Fletcher< 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 229 of file ROL_Fletcher.hpp.

References ROL::FletcherBase< Real >::con_, ROL::FletcherBase< Real >::isConValueComputed_, ROL::FletcherBase< Real >::isGradientComputed_, ROL::FletcherBase< Real >::isMultiplierComputed_, ROL::FletcherBase< Real >::isObjGradComputed_, ROL::FletcherBase< Real >::isObjValueComputed_, ROL::FletcherBase< Real >::isValueComputed_, and ROL::FletcherBase< Real >::obj_.

template<class Real >
Real ROL::Fletcher< Real >::value ( const Vector< Real > &  x,
Real &  tol 
)
inlinevirtual
template<class Real >
void ROL::Fletcher< 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 268 of file ROL_Fletcher.hpp.

References ROL::FletcherBase< Real >::c_, ROL::Fletcher< Real >::computeMultipliers(), ROL::FletcherBase< Real >::con_, ROL::FletcherBase< Real >::gL_, ROL::FletcherBase< Real >::gPhi_, ROL::FletcherBase< Real >::gradSolveError_, ROL::FletcherBase< Real >::isGradientComputed_, ROL::FletcherBase< Real >::multSolverError_, ROL::FletcherBase< Real >::obj_, ROL::FletcherBase< Real >::penaltyParameter_, ROL::FletcherBase< Real >::quadPenaltyParameter_, ROL::Vector< Real >::set(), ROL::Fletcher< Real >::solveAugmentedSystem(), ROL::Fletcher< Real >::Tv_, ROL::Fletcher< Real >::vg_, ROL::Fletcher< Real >::wg_, ROL::Fletcher< Real >::xzeros_, ROL::FletcherBase< Real >::y_, and zero.

template<class Real >
void ROL::Fletcher< Real >::hessVec ( Vector< Real > &  hv,
const Vector< Real > &  v,
const Vector< Real > &  x,
Real &  tol 
)
inlinevirtual
template<class Real >
void ROL::Fletcher< 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 
)
inline
template<class Real >
void ROL::Fletcher< Real >::computeMultipliers ( const Vector< Real > &  x,
const Real  tol 
)
inlinevirtual

Member Data Documentation

template<class Real >
int ROL::Fletcher< Real >::HessianApprox_
private

Definition at line 97 of file ROL_Fletcher.hpp.

Referenced by ROL::Fletcher< Real >::Fletcher().

template<class Real >
Ptr<Vector<Real> > ROL::Fletcher< Real >::Tv_
private
template<class Real >
Ptr<Vector<Real> > ROL::Fletcher< Real >::w_
private
template<class Real >
Ptr<Vector<Real> > ROL::Fletcher< Real >::v_
private
template<class Real >
Ptr<Vector<Real> > ROL::Fletcher< Real >::wg_
private
template<class Real >
Ptr<Vector<Real> > ROL::Fletcher< Real >::vg_
private
template<class Real >
Ptr<Vector<Real> > ROL::Fletcher< Real >::xzeros_
private
template<class Real >
Ptr<Vector<Real> > ROL::Fletcher< Real >::czeros_
private

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