ROL
|
Provides the interface to evaluate objective functions. More...
#include <ROL_Objective.hpp>
Public Member Functions | |
virtual | ~Objective () |
virtual void | update (const Vector< Real > &x, bool flag=true, int iter=-1) |
Update objective function. More... | |
virtual Real | value (const Vector< Real > &x, Real &tol)=0 |
Compute value. More... | |
virtual void | gradient (Vector< Real > &g, const Vector< Real > &x, Real &tol) |
Compute gradient. More... | |
virtual Real | dirDeriv (const Vector< Real > &x, const Vector< Real > &d, Real &tol) |
Compute directional derivative. More... | |
virtual void | hessVec (Vector< Real > &hv, const Vector< Real > &v, const Vector< Real > &x, Real &tol) |
Apply Hessian approximation to vector. 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 > ¶m) |
Protected Member Functions | |
const std::vector< Real > | getParameter (void) const |
Private Attributes | |
std::vector< Real > | param_ |
Provides the interface to evaluate objective functions.
Provides the definition of the objective function interface.
ROL's objective function interface is designed for Fr$eacute;chet differentiable functionals \(f:\mathcal{X}\to\mathbb{R}\), where \(\mathcal{X}\) is a Banach space. The basic operator interace, to be implemented by the user, requires:
It is strongly recommended that the user additionally overload:
The user may also overload:
Definition at line 77 of file ROL_Objective.hpp.
|
inlinevirtual |
Definition at line 80 of file ROL_Objective.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::BoundFletcher< Real >, ROL::Reduced_Objective_SimOpt< Real >, Objective_PoissonInversion< Real >, ROL::ProjectedObjective< Real >, ROL::MoreauYosidaPenalty< Real >, ROL::ReducedDynamicObjective< Real >, ROL::Fletcher< Real >, ROL::InteriorPointPenalty< Real >, ROL::StochasticObjective< Real >, CLExactModel< Real >, ROL::PH_bPOEObjective< Real >, ROL::AugmentedLagrangian< Real >, ROL::PH_RiskObjective< Real >, ROL::RiskNeutralObjective< Real >, ROL::PH_DeviationObjective< Real >, ROL::QuadraticPenalty< Real >, ROL::Reduced_AugmentedLagrangian_SimOpt< Real >, ROL::CompositeObjective< Real >, ROL::PH_ErrorObjective< Real >, ROL::PH_Objective< Real >, ROL::PH_RegretObjective< Real >, ROL::PH_ProbObjective< Real >, ROL::NonlinearLeastSquaresObjective_Dynamic< Real >, ROL::ROL::NonlinearLeastSquaresObjective_SimOpt< Real >, ROL::InteriorPoint::PenalizedObjective< Real >, ROL::ObjectiveMMA< Real >, ROL::NonlinearLeastSquaresObjective_SimOpt< Real >, ROL::AffineTransformObjective< Real >, ROL::NonlinearLeastSquaresObjective< Real >, ROL::ConicApproximationModel< Real >, ROL::SlacklessObjective< Real >, ROL::ObjectiveFromConstraint< Real >, ROL::LinearCombinationObjective< Real >, ROL::SimulatedObjectiveCVaR< Real >, ROL::StdObjective< Real >, ROL::Objective_SimOpt< Real >, ROL::SimulatedObjective< Real >, and ROL::RiskLessObjective< Real >.
Definition at line 89 of file ROL_Objective.hpp.
References ROL_UNUSED.
Referenced by ROL::CompositeStep< Real >::accept(), ROL::BundleStep< Real >::compute(), ROL::LineSearch< Real >::getInitialAlpha(), ROL::Step< Real >::initialize(), ROL::InteriorPointStep< Real >::initialize(), ROL::CompositeStep< Real >::initialize(), ROL::PrimalDualActiveSetStep< Real >::initialize(), ROL::TrustRegionStep< Real >::initialize(), ROL::IterationScaling< Real >::run(), ROL::CubicInterp< Real >::run(), ROL::BackTracking< Real >::run(), ROL::GoldenSection< Real >::run(), ROL::Bisection< Real >::run(), ROL::PathBasedTargetLevel< Real >::run(), ROL::LineSearch< Real >::status(), ROL::NewtonStep< Real >::update(), ROL::GradientStep< Real >::update(), ROL::NonlinearCGStep< Real >::update(), ROL::ProjectedNewtonStep< Real >::update(), ROL::SecantStep< Real >::update(), ROL::ProjectedSecantStep< Real >::update(), ROL::TrustRegion< Real >::update(), ROL::NewtonKrylovStep< Real >::update(), ROL::ProjectedNewtonKrylovStep< Real >::update(), ROL::CompositeStep< Real >::update(), ROL::AugmentedLagrangianStep< Real >::update(), and ROL::PrimalDualActiveSetStep< Real >::update().
|
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 Objective_GrossPitaevskii< Real >, ROL::ZOO::Objective_PoissonInversion< Real >, ROL::BoundFletcher< Real >, Objective_BurgersControl< Real >, Objective_PoissonInversion< Real >, ROL::Reduced_Objective_SimOpt< Real >, ROL::MoreauYosidaPenalty< Real >, ROL::ProjectedObjective< Real >, ROL::ReducedDynamicObjective< Real >, ROL::ColemanLiModel< Real >, ROL::Fletcher< Real >, ROL::InteriorPointPenalty< Real >, CLExactModel< Real >, ROL::CDFObjective< Real >, ROL::ZOO::Objective_DiodeCircuit< Real >, ROL::StochasticObjective< Real >, ROL::AugmentedLagrangian< Real >, ROL::RiskNeutralObjective< Real >, ROL::MomentObjective< Real >, ROL::PH_bPOEObjective< Real >, ROL::KelleySachsModel< Real >, ROL::PH_RiskObjective< Real >, Objective_GrossPitaevskii< Real >, ROL::PH_DeviationObjective< Real >, ROL::TrustRegionModel< Real >, ROL::InteriorPoint::MeritFunction< Real >, ROL::ObjectiveFromBoundConstraint< Real >, ROL::QuadraticPenalty< Real >, ROL::ZOO::Objective_PoissonControl< Real >, Zakharov_Sacado_Objective< Real >, ROL::CompositeObjective< Real >, ROL::Reduced_AugmentedLagrangian_SimOpt< Real >, ROL::ObjectiveMMA< Real >, ROL::PH_ErrorObjective< Real >, ROL::PH_RegretObjective< Real >, ROL::PH_Objective< Real >, ROL::PH_ProbObjective< Real >, ROL::NonlinearLeastSquaresObjective_Dynamic< Real >, ROL::PointwiseCDFObjective< Real >, ROL::ROL::NonlinearLeastSquaresObjective_SimOpt< Real >, ROL::NonlinearLeastSquaresObjective_SimOpt< Real >, ROL::InteriorPoint::PenalizedObjective< Real >, ROL::NonlinearLeastSquaresObjective< Real >, ROL::AffineTransformObjective< Real >, ROL::ZOO::Objective_Zakharov< Real >, ROL::ConicApproximationModel< Real >, ROL::ZOO::Objective_HS45< Real >, ROL::ZOO::Objective_ParaboloidCircle< Real, XPrim, XDual >, ROL::ZOO::Objective_Rosenbrock< Real, XPrim, XDual >, ROL::ZOO::Objective_SimpleEqConstrained< Real, XPrim, XDual >, ROL::SlacklessObjective< Real >, ROL::ZOO::Objective_HS2< Real >, ROL::ZOO::Objective_HS3< Real >, ROL::ZOO::Objective_HS38< Real >, ROL::ZOO::Objective_HS4< Real >, ROL::ZOO::Objective_HS5< Real >, ROL::QuadraticObjective< Real >, ROL::ZOO::Objective_HS25< Real >, ROL::ObjectiveFromConstraint< Real >, ROL::LinearCombinationObjective< Real >, ROL::Objective_SimOpt< Real >, ROL::ZOO::Objective_HS29< Real >, ROL::StdObjective< Real >, ROL::ZOO::Objective_HS32< Real >, ROL::ZOO::Objective_HS39< Real >, CLTestObjective< Real >, ROL::ZOO::Objective_Beale< Real >, ROL::SimulatedObjectiveCVaR< Real >, ROL::ZOO::Objective_BVP< Real >, ROL::ZOO::Minimax3< Real >, ROL::LinearObjective< Real >, ROL::ZOO::Minimax1< Real >, ROL::ZOO::Minimax2< Real >, ROL::ZOO::Objective_HS24< Real >, ROL::ZOO::Objective_HS1< Real >, ROL::ZOO::Objective_LeastSquares< Real >, ROL::ZOO::Objective_Powell< Real >, ROL::ZOO::Objective_FreudensteinRoth< Real >, ROL::SimulatedObjective< Real >, ROL::ZOO::Objective_SumOfSquares< Real >, ROL::RiskLessObjective< Real >, NullObjective< Real >, ROL::Objective_FSsolver< Real >, and ROL::LogBarrierObjective< Real >.
Referenced by ROL::CompositeStep< Real >::accept(), ROL::BundleStep< Real >::compute(), ROL::CompositeStep< Real >::compute(), ROL::RandVarFunctional< Real >::computeValue(), ROL::LineSearch< Real >::getInitialAlpha(), ROL::Step< Real >::initialize(), ROL::InteriorPointStep< Real >::initialize(), ROL::CompositeStep< Real >::initialize(), ROL::PrimalDualActiveSetStep< Real >::initialize(), ROL::TrustRegionStep< Real >::initialize(), ROL::IterationScaling< Real >::run(), ROL::CubicInterp< Real >::run(), ROL::BackTracking< Real >::run(), ROL::Bisection< Real >::run(), ROL::GoldenSection< Real >::run(), ROL::PathBasedTargetLevel< Real >::run(), ROL::NewtonStep< Real >::update(), ROL::GradientStep< Real >::update(), ROL::NonlinearCGStep< Real >::update(), ROL::ProjectedNewtonStep< Real >::update(), ROL::SecantStep< Real >::update(), ROL::ProjectedSecantStep< Real >::update(), ROL::TrustRegion< Real >::update(), ROL::NewtonKrylovStep< Real >::update(), ROL::FletcherStep< Real >::update(), ROL::ProjectedNewtonKrylovStep< Real >::update(), ROL::CompositeStep< Real >::update(), and ROL::PrimalDualActiveSetStep< 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 Objective_GrossPitaevskii< Real >, ROL::ZOO::Objective_PoissonInversion< Real >, ROL::BoundFletcher< Real >, Objective_BurgersControl< Real >, Objective_PoissonInversion< Real >, ROL::Reduced_Objective_SimOpt< Real >, ROL::ReducedDynamicObjective< Real >, ROL::MoreauYosidaPenalty< Real >, ROL::InteriorPointPenalty< Real >, ROL::ProjectedObjective< Real >, ROL::Fletcher< Real >, ROL::ColemanLiModel< Real >, ROL::ObjectiveFromBoundConstraint< Real >, CLExactModel< Real >, ROL::CDFObjective< Real >, ROL::ZOO::Objective_DiodeCircuit< Real >, ROL::StochasticObjective< Real >, ROL::RiskNeutralObjective< Real >, ROL::ZOO::Objective_PoissonControl< Real >, ROL::AugmentedLagrangian< Real >, Objective_GrossPitaevskii< Real >, ROL::MomentObjective< Real >, ROL::KelleySachsModel< Real >, ROL::PH_bPOEObjective< Real >, ROL::PH_RiskObjective< Real >, ROL::PH_DeviationObjective< Real >, ROL::QuadraticPenalty< Real >, ROL::ObjectiveMMA< Real >, ROL::TrustRegionModel< Real >, Zakharov_Sacado_Objective< Real >, ROL::CompositeObjective< Real >, ROL::Reduced_AugmentedLagrangian_SimOpt< Real >, ROL::PH_Objective< Real >, ROL::PH_ProbObjective< Real >, ROL::PH_ErrorObjective< Real >, ROL::PH_RegretObjective< Real >, ROL::PointwiseCDFObjective< Real >, ROL::Objective_SimOpt< Real >, ROL::InteriorPoint::PenalizedObjective< Real >, ROL::NonlinearLeastSquaresObjective_Dynamic< Real >, ROL::ROL::NonlinearLeastSquaresObjective_SimOpt< Real >, ROL::NonlinearLeastSquaresObjective_SimOpt< Real >, ROL::ZOO::Objective_Zakharov< Real >, ROL::ZOO::Objective_Rosenbrock< Real, XPrim, XDual >, ROL::ZOO::Objective_SimpleEqConstrained< Real, XPrim, XDual >, ROL::NonlinearLeastSquaresObjective< Real >, ROL::ZOO::Objective_ParaboloidCircle< Real, XPrim, XDual >, ROL::AffineTransformObjective< Real >, ROL::SimulatedObjectiveCVaR< Real >, ROL::ZOO::Objective_HS45< Real >, ROL::ConicApproximationModel< Real >, ROL::StdObjective< Real >, ROL::ZOO::Objective_HS25< Real >, ROL::ZOO::Objective_HS38< Real >, ROL::ZOO::Objective_HS2< Real >, ROL::ZOO::Objective_HS3< Real >, ROL::ZOO::Objective_HS4< Real >, ROL::ZOO::Objective_HS5< Real >, ROL::QuadraticObjective< Real >, ROL::ZOO::Objective_LeastSquares< Real >, ROL::ZOO::Minimax3< Real >, ROL::SlacklessObjective< Real >, ROL::SimulatedObjective< Real >, ROL::ZOO::Objective_BVP< Real >, ROL::ObjectiveFromConstraint< Real >, ROL::ZOO::Objective_HS29< Real >, ROL::LinearCombinationObjective< Real >, ROL::ZOO::Objective_Beale< Real >, ROL::ZOO::Objective_HS32< Real >, ROL::ZOO::Objective_HS39< Real >, CLTestObjective< Real >, ROL::ZOO::Minimax1< Real >, ROL::ZOO::Minimax2< Real >, ROL::ZOO::Objective_HS24< Real >, ROL::ZOO::Objective_Powell< Real >, ROL::LinearObjective< Real >, ROL::ZOO::Objective_FreudensteinRoth< Real >, ROL::ZOO::Objective_HS1< Real >, ROL::RiskLessObjective< Real >, ROL::LogBarrierObjective< Real >, ROL::ZOO::Objective_SumOfSquares< Real >, NullObjective< Real >, and ROL::Objective_FSsolver< Real >.
Definition at line 71 of file ROL_ObjectiveDef.hpp.
References ROL::Vector< Real >::axpy(), ROL::Vector< Real >::basis(), ROL::Vector< Real >::clone(), ROL::Vector< Real >::dimension(), ROL::Vector< Real >::dot(), ROL::update(), ROL::value, zero, and ROL::Vector< Real >::zero().
Referenced by ROL::CompositeStep< Real >::accept(), ROL::BundleStep< Real >::compute(), ROL::CompositeStep< Real >::compute(), ROL::PrimalDualActiveSetStep< Real >::computeCriticalityMeasure(), ROL::RandVarFunctional< Real >::computeGradient(), ROL::FletcherBase< Real >::getGradient(), ROL::Step< Real >::initialize(), ROL::InteriorPointStep< Real >::initialize(), ROL::CompositeStep< Real >::initialize(), ROL::LineSearch< Real >::status(), ROL::NewtonStep< Real >::update(), ROL::GradientStep< Real >::update(), ROL::ProjectedNewtonStep< Real >::update(), ROL::NonlinearCGStep< Real >::update(), ROL::SecantStep< Real >::update(), ROL::ProjectedSecantStep< Real >::update(), ROL::TrustRegion< Real >::update(), ROL::NewtonKrylovStep< Real >::update(), ROL::FletcherStep< Real >::update(), ROL::ProjectedNewtonKrylovStep< Real >::update(), ROL::CompositeStep< Real >::update(), and ROL::TrustRegionStep< Real >::updateGradient().
|
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. |
Reimplemented in ROL::ProjectedObjective< Real >, ROL::ZOO::Objective_Zakharov< Real >, ROL::StdObjective< Real >, ROL::SlacklessObjective< Real >, and ROL::LogBarrierObjective< Real >.
Definition at line 54 of file ROL_ObjectiveDef.hpp.
References ROL::Vector< Real >::clone(), ROL::Vector< Real >::norm(), ROL::update(), ROL::value, and zero.
Referenced by ROL::StdObjective< Real >::dirDeriv().
|
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 Objective_GrossPitaevskii< Real >, ROL::BoundFletcher< Real >, Objective_BurgersControl< Real >, ROL::ReducedDynamicObjective< Real >, Objective_PoissonInversion< Real >, ROL::Reduced_Objective_SimOpt< Real >, ROL::InteriorPointPenalty< Real >, ROL::MoreauYosidaPenalty< Real >, ROL::ObjectiveFromBoundConstraint< Real >, ROL::Fletcher< Real >, ROL::ProjectedObjective< Real >, ROL::ColemanLiModel< Real >, ROL::ZOO::Objective_DiodeCircuit< Real >, ROL::CDFObjective< Real >, ROL::Objective_SimOpt< Real >, CLExactModel< Real >, ROL::RiskNeutralObjective< Real >, ROL::MomentObjective< Real >, ROL::StochasticObjective< Real >, Objective_GrossPitaevskii< Real >, ROL::AugmentedLagrangian< Real >, ROL::PH_bPOEObjective< Real >, ROL::KelleySachsModel< Real >, ROL::PH_RiskObjective< Real >, ROL::ObjectiveMMA< Real >, ROL::QuadraticPenalty< Real >, ROL::PH_DeviationObjective< Real >, Zakharov_Sacado_Objective< Real >, ROL::TrustRegionModel< Real >, ROL::CompositeObjective< Real >, ROL::Reduced_AugmentedLagrangian_SimOpt< Real >, ROL::PH_ProbObjective< Real >, ROL::InteriorPoint::PenalizedObjective< Real >, ROL::PH_Objective< Real >, ROL::PH_ErrorObjective< Real >, ROL::PH_RegretObjective< Real >, ROL::ZOO::Objective_SimpleEqConstrained< Real, XPrim, XDual >, ROL::ZOO::Objective_ParaboloidCircle< Real, XPrim, XDual >, ROL::StdObjective< Real >, ROL::SimulatedObjective< Real >, ROL::NonlinearLeastSquaresObjective_Dynamic< Real >, ROL::ROL::NonlinearLeastSquaresObjective_SimOpt< Real >, ROL::NonlinearLeastSquaresObjective_SimOpt< Real >, ROL::ConicApproximationModel< Real >, ROL::NonlinearLeastSquaresObjective< Real >, ROL::AffineTransformObjective< Real >, ROL::ZOO::Objective_HS29< Real >, ROL::LinearCombinationObjective< Real >, ROL::SlacklessObjective< Real >, ROL::LogBarrierObjective< Real >, ROL::QuadraticObjective< Real >, ROL::ZOO::Objective_HS32< Real >, ROL::ZOO::Objective_HS39< Real >, ROL::ObjectiveFromConstraint< Real >, CLTestObjective< Real >, ROL::ZOO::Objective_HS24< Real >, ROL::LinearObjective< Real >, ROL::RiskLessObjective< Real >, NullObjective< Real >, and ROL::Objective_FSsolver< Real >.
Definition at line 90 of file ROL_ObjectiveDef.hpp.
References ROL::Vector< Real >::axpy(), ROL::Vector< Real >::clone(), ROL::Vector< Real >::norm(), ROL::Vector< Real >::scale(), ROL::update(), zero, and ROL::Vector< Real >::zero().
Referenced by ROL::CompositeStep< Real >::accept(), ROL::PrimalDualActiveSetStep< Real >::compute(), ROL::computeDenseHessian(), ROL::RandVarFunctional< Real >::computeHessVec(), ROL::computeScaledDenseHessian(), ROL::StdObjective< Real >::hessVec(), ROL::ZOO::Objective_DiodeCircuit< Real >::hessVec(), ROL::Reduced_Objective_SimOpt< Real >::hessVec(), ROL::ReducedDynamicObjective< Real >::hessVec(), ROL::TrustRegionStep< Real >::initialize(), main(), and ROL::CompositeStep< Real >::solveTangentialSubproblem().
|
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::ZOO::Objective_PoissonInversion< Real >, ROL::ProjectedObjective< Real >, ROL::KelleySachsModel< Real >, ROL::ObjectiveMMA< Real >, ROL::TrustRegionModel< Real >, ROL::ZOO::Objective_Zakharov< Real >, ROL::StdObjective< Real >, ROL::ZOO::Objective_Rosenbrock< Real, XPrim, XDual >, ROL::ZOO::Objective_Beale< Real >, ROL::ConicApproximationModel< Real >, ROL::ZOO::Objective_Powell< Real >, ROL::ZOO::Objective_HS2< Real >, ROL::ZOO::Objective_FreudensteinRoth< Real >, ROL::ZOO::Objective_HS5< Real >, ROL::ZOO::Objective_HS3< Real >, ROL::SlacklessObjective< Real >, ROL::ZOO::Objective_HS1< Real >, ROL::QuadraticObjective< Real >, and ROL::ZOO::Objective_SumOfSquares< Real >.
Definition at line 145 of file ROL_Objective.hpp.
References ROL_UNUSED.
Referenced by ROL::NewtonStep< Real >::compute(), ROL::ProjectedNewtonStep< Real >::compute(), and ROL::TrustRegionStep< Real >::initialize().
|
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::Reduced_Objective_SimOpt< Real >, ROL::ProjectedObjective< Real >, ROL::StochasticObjective< Real >, ROL::RiskNeutralObjective< Real >, ROL::KelleySachsModel< Real >, ROL::TrustRegionModel< Real >, ROL::StdObjective< Real >, ROL::ConicApproximationModel< Real >, ROL::NonlinearLeastSquaresObjective_Dynamic< Real >, ROL::ROL::NonlinearLeastSquaresObjective_SimOpt< Real >, ROL::NonlinearLeastSquaresObjective_SimOpt< Real >, ROL::SlacklessObjective< Real >, and ROL::RiskLessObjective< Real >.
Definition at line 163 of file ROL_Objective.hpp.
References ROL::Vector< Real >::dual(), ROL_UNUSED, and ROL::Vector< Real >::set().
|
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 189 of file ROL_Objective.hpp.
References ROL::Vector< Real >::dual().
Referenced by ROL::Objective< Real >::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 127 of file ROL_ObjectiveDef.hpp.
|
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 249 of file ROL_Objective.hpp.
References ROL::Objective< Real >::checkGradient(), and ROL::Vector< Real >::dual().
|
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 147 of file ROL_ObjectiveDef.hpp.
References ROL::Vector< Real >::clone(), ROL::Vector< Real >::dot(), ROL::Finite_Difference_Arrays::shifts, ROL::update(), ROL::value, and 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 311 of file ROL_Objective.hpp.
References ROL::Vector< Real >::dual().
Referenced by ROL::Objective< Real >::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 249 of file ROL_ObjectiveDef.hpp.
|
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 372 of file ROL_Objective.hpp.
References ROL::Objective< Real >::checkHessVec(), and ROL::Vector< Real >::dual().
|
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 267 of file ROL_ObjectiveDef.hpp.
References ROL::Vector< Real >::clone(), ROL::Finite_Difference_Arrays::shifts, ROL::update(), and 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 427 of file ROL_Objective.hpp.
References ROL::Vector< Real >::dual().
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 374 of file ROL_ObjectiveDef.hpp.
References ROL::Vector< Real >::clone(), and ROL::Vector< Real >::dot().
|
inlineprotected |
Definition at line 464 of file ROL_Objective.hpp.
References ROL::Objective< Real >::param_.
Referenced by ROL::RegressionError< Real >::checkSize(), ROL::RegressionError< Real >::gradient(), DiffusionObjective< Real >::gradient_1(), DiffusionObjective< Real >::hessVec_11(), ROL::RegressionError< Real >::value(), and DiffusionObjective< Real >::value().
|
inlinevirtual |
Reimplemented in ROL::Reduced_Objective_SimOpt< Real >, ROL::MoreauYosidaPenalty< Real >, ROL::CompositeObjective_SimOpt< Real >, ROL::PH_bPOEObjective< Real >, ROL::PH_RiskObjective< Real >, ROL::PH_DeviationObjective< Real >, ROL::Reduced_AugmentedLagrangian_SimOpt< Real >, ROL::LinearCombinationObjective_SimOpt< Real >, ROL::CompositeObjective< Real >, ROL::PH_ProbObjective< Real >, ROL::PH_ErrorObjective< Real >, ROL::PH_RegretObjective< Real >, ROL::PH_Objective< Real >, ROL::ROL::NonlinearLeastSquaresObjective_SimOpt< Real >, ROL::NonlinearLeastSquaresObjective_SimOpt< Real >, ROL::NonlinearLeastSquaresObjective< Real >, ROL::SlacklessObjective< Real >, ROL::LinearCombinationObjective< Real >, and ROL::Objective_FSsolver< Real >.
Definition at line 469 of file ROL_Objective.hpp.
References ROL::Objective< Real >::param_.
Referenced by ROL::RandVarFunctional< Real >::computeGradient(), ROL::RandVarFunctional< Real >::computeHessVec(), ROL::RandVarFunctional< Real >::computeValue(), ROL::LinearCombinationObjective< Real >::setParameter(), ROL::SlacklessObjective< Real >::setParameter(), ROL::NonlinearLeastSquaresObjective< Real >::setParameter(), ROL::NonlinearLeastSquaresObjective_SimOpt< Real >::setParameter(), ROL::PH_Objective< Real >::setParameter(), ROL::PH_ErrorObjective< Real >::setParameter(), ROL::PH_RegretObjective< Real >::setParameter(), ROL::CompositeObjective< Real >::setParameter(), ROL::PH_ProbObjective< Real >::setParameter(), ROL::LinearCombinationObjective_SimOpt< Real >::setParameter(), ROL::Reduced_AugmentedLagrangian_SimOpt< Real >::setParameter(), ROL::PH_DeviationObjective< Real >::setParameter(), ROL::PH_RiskObjective< Real >::setParameter(), ROL::PH_bPOEObjective< Real >::setParameter(), ROL::CompositeObjective_SimOpt< Real >::setParameter(), ROL::MoreauYosidaPenalty< Real >::setParameter(), and ROL::Reduced_Objective_SimOpt< Real >::setParameter().
|
private |
Definition at line 461 of file ROL_Objective.hpp.
Referenced by ROL::Objective< Real >::getParameter(), and ROL::Objective< Real >::setParameter().