ROL
|
#include <ROL_FletcherObjectiveE.hpp>
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 > ¶m) |
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_ |
Definition at line 18 of file ROL_FletcherObjectiveE.hpp.
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 | ||
) |
Definition at line 16 of file ROL_FletcherObjectiveE_Def.hpp.
References ROL::Vector< Real >::clone(), ROL::FletcherObjectiveE< Real >::czeros_, ROL::FletcherObjectiveE< Real >::Tv_, ROL::FletcherObjectiveE< Real >::v_, ROL::FletcherObjectiveE< Real >::vg_, ROL::FletcherObjectiveE< Real >::w_, ROL::FletcherObjectiveE< Real >::wdual_, ROL::FletcherObjectiveE< Real >::wg_, and ROL::FletcherObjectiveE< Real >::xzeros_.
|
overridevirtual |
Compute value.
This function returns the objective function value.
[in] | x | is the current iterate. |
[in] | tol | is 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().
|
overridevirtual |
Compute gradient.
This function returns the objective function gradient.
[out] | g | is the gradient. |
[in] | x | is the current iterate. |
[in] | tol | is 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().
|
overridevirtual |
Apply Hessian approximation to vector.
This function applies the Hessian of the objective function to the vector \(v\).
[out] | hv | is the the action of the Hessian on \(v\). |
[in] | v | is the direction vector. |
[in] | x | is the current iterate. |
[in] | tol | is 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().
|
overrideprotectedvirtual |
Implements ROL::FletcherObjectiveBase< Real >.
Definition at line 147 of file ROL_FletcherObjectiveE_Def.hpp.
References ROL::Vector< Real >::plus(), and ROL::Vector< Real >::set().
|
private |
Definition at line 21 of file ROL_FletcherObjectiveE.hpp.
Referenced by ROL::FletcherObjectiveE< Real >::FletcherObjectiveE().
|
private |
Definition at line 22 of file ROL_FletcherObjectiveE.hpp.
Referenced by ROL::FletcherObjectiveE< Real >::FletcherObjectiveE().
|
private |
Definition at line 23 of file ROL_FletcherObjectiveE.hpp.
Referenced by ROL::FletcherObjectiveE< Real >::FletcherObjectiveE().
|
private |
Definition at line 24 of file ROL_FletcherObjectiveE.hpp.
Referenced by ROL::FletcherObjectiveE< Real >::FletcherObjectiveE().
|
private |
Definition at line 25 of file ROL_FletcherObjectiveE.hpp.
Referenced by ROL::FletcherObjectiveE< Real >::FletcherObjectiveE().
|
private |
Definition at line 26 of file ROL_FletcherObjectiveE.hpp.
Referenced by ROL::FletcherObjectiveE< Real >::FletcherObjectiveE().
|
private |
Definition at line 27 of file ROL_FletcherObjectiveE.hpp.
Referenced by ROL::FletcherObjectiveE< Real >::FletcherObjectiveE().
|
private |
Definition at line 28 of file ROL_FletcherObjectiveE.hpp.
Referenced by ROL::FletcherObjectiveE< Real >::FletcherObjectiveE().