|
ROL
|
#include <ROL_Constraint_SerialSimOpt.hpp>
Public Member Functions | |
| virtual | ~Objective () |
| Objective () | |
| virtual void | update (const Vector< Real > &x, UpdateType type, int iter=-1) |
| Update objective function. | |
| virtual void | update (const Vector< Real > &x, bool flag=true, int iter=-1) |
| Update objective function. | |
| virtual Real | value (const Vector< Real > &x, Real &tol)=0 |
| Compute value. | |
| virtual void | gradient (Vector< Real > &g, const Vector< Real > &x, Real &tol) |
| Compute gradient. | |
| virtual Real | dirDeriv (const Vector< Real > &x, const Vector< Real > &d, Real &tol) |
| Compute directional derivative. | |
| virtual void | hessVec (Vector< Real > &hv, const Vector< Real > &v, const Vector< Real > &x, Real &tol) |
| Apply Hessian approximation to vector. | |
| virtual void | invHessVec (Vector< Real > &hv, const Vector< Real > &v, const Vector< Real > &x, Real &tol) |
| Apply inverse Hessian approximation to vector. | |
| virtual void | precond (Vector< Real > &Pv, const Vector< Real > &v, const Vector< Real > &x, Real &tol) |
| Apply preconditioner to vector. | |
| virtual void | prox (Vector< Real > &Pv, const Vector< Real > &v, Real t, Real &tol) |
| Compute the proximity operator. | |
| virtual void | proxJacVec (Vector< Real > &Jv, const Vector< Real > &v, const Vector< Real > &x, Real t, Real &tol) |
| Apply the Jacobian of the proximity operator. | |
| 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. | |
| 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. | |
| 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. | |
| 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. | |
| 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. | |
| 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. | |
| 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. | |
| 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. | |
| 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. | |
| 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. | |
| virtual std::vector< std::vector< Real > > | checkProxJacVec (const Vector< Real > &x, const Vector< Real > &v, Real t=Real(1), bool printToStream=true, std::ostream &outStream=std::cout, int numSteps=ROL_NUM_CHECKDERIV_STEPS) |
| Finite-difference proximity operator Jacobian-applied-to-vector check. | |
| virtual void | setParameter (const std::vector< Real > ¶m) |
Protected Member Functions | |
| const std::vector< Real > | getParameter (void) const |
Private Attributes | |
| Ptr< Vector< Real > > | prim_ |
| Ptr< Vector< Real > > | dual_ |
| Ptr< Vector< Real > > | basis_ |
| std::vector< Real > | param_ |
Definition at line 44 of file ROL_Constraint_SerialSimOpt.hpp.
|
inlinevirtual |
Definition at line 51 of file ROL_Constraint_SerialSimOpt.hpp.
|
inline |
Definition at line 53 of file ROL_Constraint_SerialSimOpt.hpp.
Referenced by ROL::AffineTransformObjective< Real >::AffineTransformObjective(), ROL::AffineTransformObjective< Real >::AffineTransformObjective(), ROL::AffineTransformObjective< Real >::AffineTransformObjective(), ROL::ROL::AffineTransformObjective< Real >::AffineTransformObjective(), ROL::ROL::AffineTransformObjective< Real >::AffineTransformObjective(), ROL::ROL::AffineTransformObjective< Real >::AffineTransformObjective(), ROL::AugmentedLagrangian< Real >::AugmentedLagrangian(), ROL::AugmentedLagrangian< Real >::AugmentedLagrangian(), ROL::AugmentedLagrangianObjective< Real >::AugmentedLagrangianObjective(), ROL::AugmentedLagrangianObjective< Real >::AugmentedLagrangianObjective(), ROL::CDFObjective< Real >::CDFObjective(), ROL::ChainRuleObjective< Real >::ChainRuleObjective(), ROL::CompositeObjective< Real >::CompositeObjective(), ROL::ElasticObjective< Real >::ElasticObjective(), ROL::ElasticObjective< Real >::ElasticObjective(), ROL::FletcherBase< Real >::FletcherBase(), ROL::FletcherObjectiveBase< Real >::FletcherObjectiveBase(), ROL::InteriorPointObjective< Real >::InteriorPointObjective(), ROL::InteriorPointObjective< Real >::InteriorPointObjective(), ROL::InteriorPointPenalty< Real >::InteriorPointPenalty(), ROL::LinearCombinationObjective< Real >::LinearCombinationObjective(), ROL::LinearCombinationObjective< Real >::LinearCombinationObjective(), ROL::MeanValueObjective< Real >::MeanValueObjective(), ROL::MomentObjective< Real >::MomentObjective(), ROL::MomentObjective< Real >::MomentObjective(), ROL::MoreauYosidaObjective< Real >::MoreauYosidaObjective(), ROL::MoreauYosidaObjective< Real >::MoreauYosidaObjective(), ROL::MoreauYosidaObjective< Real >::MoreauYosidaObjective(), ROL::MoreauYosidaObjective< Real >::MoreauYosidaObjective(), ROL::MoreauYosidaPenalty< Real >::MoreauYosidaPenalty(), ROL::MoreauYosidaPenalty< Real >::MoreauYosidaPenalty(), ROL::MoreauYosidaPenalty< Real >::MoreauYosidaPenalty(), ROL::TypeP::InexactNewtonAlgorithm< Real >::NewtonObj::NewtonObj(), ROL::ObjectiveMMA< Real >::ObjectiveMMA(), ROL::InteriorPoint::PenalizedObjective< Real >::PenalizedObjective(), ROL::PH_bPOEObjective< Real >::PH_bPOEObjective(), ROL::PH_DeviationObjective< Real >::PH_DeviationObjective(), ROL::PH_ErrorObjective< Real >::PH_ErrorObjective(), ROL::PH_Objective< Real >::PH_Objective(), ROL::PH_ProbObjective< Real >::PH_ProbObjective(), ROL::PH_RegretObjective< Real >::PH_RegretObjective(), ROL::PH_RiskObjective< Real >::PH_RiskObjective(), ROL::PointwiseCDFObjective< Real >::PointwiseCDFObjective(), ROL::ProjectedObjective< Real >::ProjectedObjective(), ROL::RiskLessObjective< Real >::RiskLessObjective(), ROL::RiskNeutralObjective< Real >::RiskNeutralObjective(), ROL::RiskNeutralObjective< Real >::RiskNeutralObjective(), ROL::RiskNeutralObjective< Real >::RiskNeutralObjective(), ROL::ScaledObjective< Real >::ScaledObjective(), ROL::TrustRegionModel_U< Real >::setData(), ROL::SlacklessObjective< Real >::SlacklessObjective(), ROL::StochasticObjective< Real >::StochasticObjective(), ROL::StochasticObjective< Real >::StochasticObjective(), ROL::StochasticObjective< Real >::StochasticObjective(), ROL::StochasticObjective< Real >::StochasticObjective(), ROL::StochasticObjective< Real >::StochasticObjective(), ROL::StochasticObjective< Real >::StochasticObjective(), ROL::TrustRegionModel< Real >::TrustRegionModel(), ROL::TrustRegionModel< Real >::update(), ROL::TrustRegionModel_U< Real >::validate(), and ROL::StdObjective< Real >::value().
|
inlinevirtual |
Update objective function.
This function updates the objective function at new iterations.
| [in] | x | is the new iterate. |
| [in] | type | is the type of update requested. |
| [in] | iter | is the outer algorithm iterations count. |
Reimplemented in ROL::ROL::AffineTransformObjective< Real >, and ROL::ROL::NonlinearLeastSquaresObjective< Real >.
Definition at line 62 of file ROL_Constraint_SerialSimOpt.hpp.
|
inlinevirtual |
Update objective function.
This function updates the objective function at new iterations.
| [in] | x | is the new iterate. |
| [in] | flag | is true if the iterate has changed. |
| [in] | iter | is the outer algorithm iterations count. |
Reimplemented in ROL::ROL::AffineTransformObjective< Real >, and ROL::ROL::NonlinearLeastSquaresObjective< Real >.
Definition at line 75 of file ROL_Constraint_SerialSimOpt.hpp.
|
pure virtual |
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. |
Implemented in ROL::ROL::AffineTransformObjective< Real >, ROL::ROL::NonlinearLeastSquaresObjective< Real >, ROL::ROL::Objective_FSsolver< Real >, and ROL::ROL::TrustRegionModel_U< Real >.
Referenced by ROL::FletcherStep< Real >::update().
|
virtual |
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 in ROL::ROL::AffineTransformObjective< Real >, ROL::ROL::NonlinearLeastSquaresObjective< Real >, ROL::ROL::Objective_FSsolver< Real >, and ROL::ROL::TrustRegionModel_U< Real >.
Definition at line 40 of file ROL_ObjectiveDef.hpp.
References ROL::ROL::Vector< Real >::axpy(), ROL::ROL::Vector< Real >::basis(), basis_, ROL::ROL::Vector< Real >::clone(), ROL::ROL::Vector< Real >::dimension(), ROL::ROL::Vector< Real >::dot(), prim_, ROL::ROL::Revert, ROL::ROL::ROL_EPSILON(), ROL::ROL::Temp, update(), ROL::value(), ROL::ROL::Vector< Real >::zero(), and zero.
Referenced by checkGradient(), checkHessVec(), dirDeriv(), ROL::FletcherBase< Real >::getGradient(), ROL::FletcherObjectiveBase< Real >::getGradient(), hessVec(), and ROL::FletcherStep< Real >::update().
|
virtual |
Compute directional derivative.
This function returns the directional derivative of the objective function in the \(d\) direction.
| [in] | x | is the current iterate. |
| [in] | d | is the direction. |
| [in] | tol | is a tolerance for inexact objective function computation. |
Definition at line 20 of file ROL_ObjectiveDef.hpp.
References ROL::ROL::Vector< Real >::apply(), ROL::ROL::Vector< Real >::clone(), ROL::ROL::Vector< Real >::dual(), dual_, and gradient().
|
virtual |
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 in ROL::ROL::AffineTransformObjective< Real >, ROL::ROL::NonlinearLeastSquaresObjective< Real >, ROL::ROL::Objective_FSsolver< Real >, and ROL::ROL::TrustRegionModel_U< Real >.
Definition at line 61 of file ROL_ObjectiveDef.hpp.
References ROL::ROL::Vector< Real >::axpy(), ROL::ROL::Vector< Real >::clone(), dual_, gradient(), ROL::ROL::Vector< Real >::norm(), prim_, ROL::ROL::Revert, ROL::ROL::Vector< Real >::scale(), ROL::ROL::Temp, update(), ROL::ROL::Vector< Real >::zero(), and zero.
Referenced by checkHessSym(), checkHessVec(), ROL::ZOO::Objective_DiodeCircuit< Real >::hessVec(), and main().
|
inlinevirtual |
Apply inverse Hessian approximation to vector.
This function applies the inverse Hessian of the objective function to the vector \(v\).
| [out] | hv | is the action of the inverse 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 in ROL::ROL::TrustRegionModel_U< Real >.
Definition at line 131 of file ROL_Constraint_SerialSimOpt.hpp.
|
inlinevirtual |
Apply preconditioner to vector.
This function applies a preconditioner for the Hessian of the objective function to the vector \(v\).
| [out] | Pv | is the action of the Hessian preconditioner 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 in ROL::ROL::NonlinearLeastSquaresObjective< Real >, and ROL::ROL::TrustRegionModel_U< Real >.
Definition at line 149 of file ROL_Constraint_SerialSimOpt.hpp.
|
inlinevirtual |
Compute the proximity operator.
This function returns the proximity operator.
| [out] | Pv | is the proximity operator applied to \(v\) (primal optimization vector). |
| [in] | v | is the input to the proximity operator (primal optimization vector). |
| [in] | t | is the proximity operator parameter (positive scalar). |
| [in] | tol | is a tolerance for inexact objective function computation. |
Definition at line 163 of file ROL_Constraint_SerialSimOpt.hpp.
Referenced by checkProxJacVec(), and proxJacVec().
|
virtual |
Apply the Jacobian of the proximity operator.
This function applies the Jacobian of the proximity operator.
| [out] | Jv | is the Jacobian of the proximity operator at \(x\) applied to \(v\) (primal optimization vector). |
| [in] | v | is the direction vector (primal optimization vector). |
| [in] | x | is the input to the proximity operator (primal optimization vector). |
| [in] | t | is the proximity operator parameter (positive scalar). |
| [in] | tol | is a tolerance for inexact objective function computation. |
Definition at line 85 of file ROL_ObjectiveDef.hpp.
References ROL::ROL::Vector< Real >::axpy(), ROL::ROL::Vector< Real >::clone(), ROL::ROL::Vector< Real >::norm(), prim_, prox(), ROL::ROL::Vector< Real >::scale(), ROL::ROL::Vector< Real >::zero(), and zero.
Referenced by checkProxJacVec().
|
inlinevirtual |
Finite-difference gradient check.
This function computes a sequence of one-sided finite-difference checks for the gradient.
At each step of the sequence, the finite difference step size is decreased. The output compares the error
\[ \left| \frac{f(x+td) - f(x)}{t} - \langle \nabla f(x),d\rangle_{\mathcal{X}^*,\mathcal{X}}\right|. \]
if the approximation is first order. More generally, difference approximation is
\[ \frac{1}{t} \sum\limits_{i=1}^m w_i f(x+t c_i d) \]
where m = order+1, \(w_i\) are the difference weights and \(c_i\) are the difference steps
| [in] | x | is an optimization variable. |
| [in] | d | is a direction vector. |
| [in] | printToStream | is a flag that turns on/off output. |
| [out] | outStream | is the output stream. |
| [in] | numSteps | is a parameter which dictates the number of finite difference steps. |
| [in] | order | is the order of the finite difference approximation (1,2,3,4) |
Definition at line 204 of file ROL_Constraint_SerialSimOpt.hpp.
Referenced by checkGradient(), and main().
|
virtual |
Finite-difference gradient check.
This function computes a sequence of one-sided finite-difference checks for the gradient.
At each step of the sequence, the finite difference step size is decreased. The output compares the error
\[ \left| \frac{f(x+td) - f(x)}{t} - \langle \nabla f(x),d\rangle_{\mathcal{X}^*,\mathcal{X}}\right|. \]
if the approximation is first order. More generally, difference approximation is
\[ \frac{1}{t} \sum\limits_{i=1}^m w_i f(x+t c_i d) \]
where m = order+1, \(w_i\) are the difference weights and \(c_i\) are the difference steps
| [in] | x | is an optimization variable. |
| [in] | g | is used to create a temporary gradient vector. |
| [in] | d | is a direction vector. |
| [in] | printToStream | is a flag that turns on/off output. |
| [out] | outStream | is the output stream. |
| [in] | numSteps | is a parameter which dictates the number of finite difference steps. |
| [in] | order | is the order of the finite difference approximation (1,2,3,4) |
Definition at line 107 of file ROL_ObjectiveDef.hpp.
References checkGradient().
|
inlinevirtual |
Finite-difference gradient check with specified step sizes.
This function computes a sequence of one-sided finite-difference checks for the gradient.
At each step of the sequence, the finite difference step size is decreased. The output compares the error
\[ \left| \frac{f(x+td) - f(x)}{t} - \langle \nabla f(x),d\rangle_{\mathcal{X}^*,\mathcal{X}}\right|. \]
if the approximation is first order. More generally, difference approximation is
\[ \frac{1}{t} \sum\limits_{i=1}^m w_i f(x+t c_i d) \]
where m = order+1, \(w_i\) are the difference weights and \(c_i\) are the difference steps
| [in] | x | is an optimization variable. |
| [in] | d | is a direction vector. |
| [in] | steps | is vector of steps of user-specified size. |
| [in] | printToStream | is a flag that turns on/off output. |
| [out] | outStream | is the output stream. |
| [in] | order | is the order of the finite difference approximation (1,2,3,4) |
Definition at line 264 of file ROL_Constraint_SerialSimOpt.hpp.
|
virtual |
Finite-difference gradient check with specified step sizes.
This function computes a sequence of one-sided finite-difference checks for the gradient.
At each step of the sequence, the finite difference step size is decreased. The output compares the error
\[ \left| \frac{f(x+td) - f(x)}{t} - \langle \nabla f(x),d\rangle_{\mathcal{X}^*,\mathcal{X}}\right|. \]
if the approximation is first order. More generally, difference approximation is
\[ \frac{1}{t} \sum\limits_{i=1}^m w_i f(x+t c_i d) \]
where m = order+1, \(w_i\) are the difference weights and \(c_i\) are the difference steps
| [in] | x | is an optimization variable. |
| [in] | g | is used to create a temporary gradient vector. |
| [in] | d | is a direction vector. |
| [in] | steps | is vector of steps of user-specified size. |
| [in] | printToStream | is a flag that turns on/off output. |
| [out] | outStream | is the output stream. |
| [in] | order | is the order of the finite difference approximation (1,2,3,4) |
Definition at line 126 of file ROL_ObjectiveDef.hpp.
References ROL::ROL::Vector< Real >::apply(), ROL::ROL::Vector< Real >::clone(), gradient(), ROL::ROL::ROL_EPSILON(), ROL::ROL::Finite_Difference_Arrays::shifts, ROL::ROL::Temp, update(), ROL::value(), and ROL::ROL::Finite_Difference_Arrays::weights.
|
inlinevirtual |
Finite-difference Hessian-applied-to-vector check.
This function computes a sequence of one-sided finite-difference checks for the Hessian.
At each step of the sequence, the finite difference step size is decreased. The output compares the error
\[ \left\| \frac{\nabla f(x+tv) - \nabla f(x)}{t} - \nabla^2 f(x)v\right\|_{\mathcal{X}^*}, \]
if the approximation is first order. More generally, difference approximation is
\[ \frac{1}{t} \sum\limits_{i=1}^m w_i \nabla f(x+t c_i v), \]
where m = order+1, \(w_i\) are the difference weights and \(c_i\) are the difference steps
| [in] | x | is an optimization variable. |
| [in] | v | is a direction vector. |
| [in] | printToStream | is a flag that turns on/off output. |
| [out] | outStream | is the output stream. |
| [in] | numSteps | is a parameter which dictates the number of finite difference steps. |
| [in] | order | is the order of the finite difference approximation (1,2,3,4) |
Definition at line 326 of file ROL_Constraint_SerialSimOpt.hpp.
Referenced by checkHessVec(), and main().
|
virtual |
Finite-difference Hessian-applied-to-vector check.
This function computes a sequence of one-sided finite-difference checks for the Hessian.
At each step of the sequence, the finite difference step size is decreased. The output compares the error
\[ \left\| \frac{\nabla f(x+tv) - \nabla f(x)}{t} - \nabla^2 f(x)v\right\|_{\mathcal{X}^*}, \]
if the approximation is first order. More generally, difference approximation is
\[ \frac{1}{t} \sum\limits_{i=1}^m w_i \nabla f(x+t c_i v), \]
where m = order+1, \(w_i\) are the difference weights and \(c_i\) are the difference steps
| [in] | x | is an optimization variable. |
| [in] | hv | is used to create temporary gradient and Hessian-times-vector vectors. |
| [in] | v | is a direction vector. |
| [in] | printToStream | is a flag that turns on/off output. |
| [out] | outStream | is the output stream. |
| [in] | numSteps | is a parameter which dictates the number of finite difference steps. |
| [in] | order | is the order of the finite difference approximation (1,2,3,4) |
Definition at line 222 of file ROL_ObjectiveDef.hpp.
References checkHessVec().
|
inlinevirtual |
Finite-difference Hessian-applied-to-vector check with specified step sizes.
This function computes a sequence of one-sided finite-difference checks for the Hessian.
At each step of the sequence, the finite difference step size is decreased. The output compares the error
\[ \left\| \frac{\nabla f(x+tv) - \nabla f(x)}{t} - \nabla^2 f(x)v\right\|_{\mathcal{X}^*}, \]
if the approximation is first order. More generally, difference approximation is
\[ \frac{1}{t} \sum\limits_{i=1}^m w_i \nabla f(x+t c_i v), \]
where m = order+1, \(w_i\) are the difference weights and \(c_i\) are the difference steps
| [in] | x | is an optimization variable. |
| [in] | v | is a direction vector. |
| [in] | steps | is vector of steps of user-specified size. |
| [in] | printToStream | is a flag that turns on/off output. |
| [out] | outStream | is the output stream. |
| [in] | order | is the order of the finite difference approximation (1,2,3,4) |
Definition at line 387 of file ROL_Constraint_SerialSimOpt.hpp.
|
virtual |
Finite-difference Hessian-applied-to-vector check with specified step sizes.
This function computes a sequence of one-sided finite-difference checks for the Hessian.
At each step of the sequence, the finite difference step size is decreased. The output compares the error
\[ \left\| \frac{\nabla f(x+tv) - \nabla f(x)}{t} - \nabla^2 f(x)v\right\|_{\mathcal{X}^*}, \]
if the approximation is first order. More generally, difference approximation is
\[ \frac{1}{t} \sum\limits_{i=1}^m w_i \nabla f(x+t c_i v), \]
where m = order+1, \(w_i\) are the difference weights and \(c_i\) are the difference steps
| [in] | x | is an optimization variable. |
| [in] | hv | is used to create temporary gradient and Hessian-times-vector vectors. |
| [in] | v | is a direction vector. |
| [in] | steps | is vector of steps of user-specified size. |
| [in] | printToStream | is a flag that turns on/off output. |
| [out] | outStream | is the output stream. |
| [in] | order | is the order of the finite difference approximation (1,2,3,4) |
Definition at line 241 of file ROL_ObjectiveDef.hpp.
References ROL::ROL::Vector< Real >::clone(), gradient(), hessVec(), ROL::ROL::ROL_EPSILON(), ROL::ROL::Finite_Difference_Arrays::shifts, ROL::ROL::Temp, update(), and ROL::ROL::Finite_Difference_Arrays::weights.
|
inlinevirtual |
Hessian symmetry check.
This function checks the symmetry of the Hessian by comparing
\[ \langle \nabla^2f(x)v,w\rangle_{\mathcal{X}^*,\mathcal{X}} \quad\text{and}\quad \langle \nabla^2f(x)w,v\rangle_{\mathcal{X}^*,\mathcal{X}}. \]
| [in] | x | is an optimization variable. |
| [in] | v | is a direction vector. |
| [in] | w | is a direction vector. |
| [in] | printToStream | is a flag that turns on/off output. |
| [out] | outStream | is the output stream. |
Definition at line 442 of file ROL_Constraint_SerialSimOpt.hpp.
Referenced by main().
|
virtual |
Hessian symmetry check.
This function checks the symmetry of the Hessian by comparing
\[ \langle \nabla^2f(x)v,w\rangle_{\mathcal{X}^*,\mathcal{X}} \quad\text{and}\quad \langle \nabla^2f(x)w,v\rangle_{\mathcal{X}^*,\mathcal{X}}. \]
| [in] | x | is an optimization variable. |
| [in] | hv | is used to create temporary Hessian-times-vector vectors. |
| [in] | v | is a direction vector. |
| [in] | w | is a direction vector. |
| [in] | printToStream | is a flag that turns on/off output. |
| [out] | outStream | is the output stream. |
Definition at line 338 of file ROL_ObjectiveDef.hpp.
References ROL::ROL::Vector< Real >::apply(), ROL::ROL::Vector< Real >::clone(), hessVec(), ROL::ROL::ROL_EPSILON(), ROL::ROL::Temp, and update().
|
virtual |
Finite-difference proximity operator Jacobian-applied-to-vector check.
This function computes a sequence of one-sided finite-difference checks for the proximity operator Jacobian.
At each step of the sequence, the finite difference step size is decreased. The output compares the error
\[ \left\| \frac{\mathrm{prox}_{t f}(x+tv) - \mathrm{prox}_{t f}(x)}{t} - J_{t f}(x+tv)v\right\|_{\mathcal{X}}, \]
if the approximation is first order. Note that in some cases the proximity operator is semismooth, which motivates the evaluation of \(J_{t f}\) at \(x+tv\).
| [in] | x | is an optimization vector. |
| [in] | v | is a direction vector. |
| [in] | t | is the proximity operator parameter. |
| [in] | printToStream | is a flag that turns on/off output. |
| [out] | outStream | is the output stream. |
| [in] | numSteps | is a parameter which dictates the number of finite difference steps. |
Definition at line 389 of file ROL_ObjectiveDef.hpp.
References ROL::ROL::Vector< Real >::clone(), prox(), proxJacVec(), and ROL::ROL::ROL_EPSILON().
|
inlineprotected |
Definition at line 504 of file ROL_Constraint_SerialSimOpt.hpp.
Referenced by DiffusionObjective< Real >::gradient_1(), DiffusionObjective< Real >::hessVec_11(), ROL::ROL::AffineTransformObjective< Real >::transform(), and DiffusionObjective< Real >::value().
|
inlinevirtual |
Reimplemented in ROL::AffineTransformObjective< Real >, ROL::CompositeObjective< Real >, ROL::CompositeObjective_SimOpt< Real >, ROL::LinearCombinationObjective< Real >, ROL::LinearCombinationObjective_SimOpt< Real >, ROL::MoreauYosidaPenalty< Real >, ROL::NonlinearLeastSquaresObjective< Real >, ROL::PH_bPOEObjective< Real >, ROL::PH_DeviationObjective< Real >, ROL::PH_ErrorObjective< Real >, ROL::PH_Objective< Real >, ROL::PH_ProbObjective< Real >, ROL::PH_RegretObjective< Real >, ROL::PH_RiskObjective< Real >, ROL::Reduced_AugmentedLagrangian_SimOpt< Real >, ROL::Reduced_Objective_SimOpt< Real >, ROL::RiskLessObjective< Real >, ROL::ROL::AffineTransformObjective< Real >, ROL::ROL::NonlinearLeastSquaresObjective< Real >, ROL::ScaledObjective< Real >, and ROL::SlacklessObjective< Real >.
Definition at line 509 of file ROL_Constraint_SerialSimOpt.hpp.
Referenced by ROL::CompositeObjective_SimOpt< Real >::setParameter(), ROL::LinearCombinationObjective_SimOpt< Real >::setParameter(), and ROL::Reduced_AugmentedLagrangian_SimOpt< Real >::setParameter().
|
private |
Definition at line 47 of file ROL_Constraint_SerialSimOpt.hpp.
Referenced by gradient(), hessVec(), and proxJacVec().
|
private |
Definition at line 47 of file ROL_Constraint_SerialSimOpt.hpp.
Referenced by dirDeriv(), and hessVec().
|
private |
Definition at line 47 of file ROL_Constraint_SerialSimOpt.hpp.
Referenced by gradient().
|
private |
Definition at line 501 of file ROL_Constraint_SerialSimOpt.hpp.