ROL
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
ROL::Objective< Real > Class Template Referenceabstract

Provides the interface to evaluate objective functions. More...

#include <ROL_Objective.hpp>

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

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 > &param)
 

Protected Member Functions

const std::vector< Real > getParameter (void) const
 

Private Attributes

std::vector< Real > param_
 

Detailed Description

template<class Real>
class ROL::Objective< Real >

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.

Constructor & Destructor Documentation

template<class Real>
virtual ROL::Objective< Real >::~Objective ( )
inlinevirtual

Definition at line 80 of file ROL_Objective.hpp.

Member Function Documentation

template<class Real>
virtual void ROL::Objective< 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 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().

template<class Real>
virtual Real ROL::Objective< Real >::value ( const Vector< Real > &  x,
Real &  tol 
)
pure virtual

Compute value.

This function returns the objective function value.

Parameters
[in]xis the current iterate.
[in]tolis 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().

template<class Real >
void ROL::Objective< Real >::gradient ( Vector< Real > &  g,
const Vector< Real > &  x,
Real &  tol 
)
virtual

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 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().

template<class Real >
Real ROL::Objective< Real >::dirDeriv ( const Vector< Real > &  x,
const Vector< Real > &  d,
Real &  tol 
)
virtual

Compute directional derivative.

This function returns the directional derivative of the objective function in the \(d\) direction.

Parameters
[in]xis the current iterate.
[in]dis the direction.
[in]tolis 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().

template<class Real >
void ROL::Objective< Real >::hessVec ( Vector< Real > &  hv,
const Vector< Real > &  v,
const Vector< Real > &  x,
Real &  tol 
)
virtual

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 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().

template<class Real>
virtual void ROL::Objective< Real >::invHessVec ( Vector< Real > &  hv,
const Vector< Real > &  v,
const Vector< Real > &  x,
Real &  tol 
)
inlinevirtual
template<class Real>
virtual void ROL::Objective< Real >::precond ( Vector< Real > &  Pv,
const Vector< Real > &  v,
const Vector< Real > &  x,
Real &  tol 
)
inlinevirtual

Apply preconditioner to vector.

This function applies a preconditioner for the Hessian of the objective function to the vector \(v\).

Parameters
[out]Pvis the action of the Hessian preconditioner on \(v\).
[in]vis the direction vector.
[in]xis the current iterate.
[in]tolis 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().

template<class Real>
virtual std::vector<std::vector<Real> > ROL::Objective< 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 
)
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

Parameters
[in]xis an optimization variable.
[in]dis a direction vector.
[in]printToStreamis a flag that turns on/off output.
[out]outStreamis the output stream.
[in]numStepsis a parameter which dictates the number of finite difference steps.
[in]orderis 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().

template<class Real >
std::vector< std::vector< Real > > ROL::Objective< 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 
)
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

Parameters
[in]xis an optimization variable.
[in]gis used to create a temporary gradient vector.
[in]dis a direction vector.
[in]printToStreamis a flag that turns on/off output.
[out]outStreamis the output stream.
[in]numStepsis a parameter which dictates the number of finite difference steps.
[in]orderis the order of the finite difference approximation (1,2,3,4)

Definition at line 127 of file ROL_ObjectiveDef.hpp.

template<class Real>
virtual std::vector<std::vector<Real> > ROL::Objective< 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 
)
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

Parameters
[in]xis an optimization variable.
[in]dis a direction vector.
[in]stepsis vector of steps of user-specified size.
[in]printToStreamis a flag that turns on/off output.
[out]outStreamis the output stream.
[in]orderis 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().

template<class Real >
std::vector< std::vector< Real > > ROL::Objective< 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 
)
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

Parameters
[in]xis an optimization variable.
[in]gis used to create a temporary gradient vector.
[in]dis a direction vector.
[in]stepsis vector of steps of user-specified size.
[in]printToStreamis a flag that turns on/off output.
[out]outStreamis the output stream.
[in]orderis 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.

template<class Real>
virtual std::vector<std::vector<Real> > ROL::Objective< 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 
)
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

Parameters
[in]xis an optimization variable.
[in]vis a direction vector.
[in]printToStreamis a flag that turns on/off output.
[out]outStreamis the output stream.
[in]numStepsis a parameter which dictates the number of finite difference steps.
[in]orderis 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().

template<class Real >
std::vector< std::vector< Real > > ROL::Objective< 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 
)
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

Parameters
[in]xis an optimization variable.
[in]hvis used to create temporary gradient and Hessian-times-vector vectors.
[in]vis a direction vector.
[in]printToStreamis a flag that turns on/off output.
[out]outStreamis the output stream.
[in]numStepsis a parameter which dictates the number of finite difference steps.
[in]orderis the order of the finite difference approximation (1,2,3,4)

Definition at line 249 of file ROL_ObjectiveDef.hpp.

template<class Real>
virtual std::vector<std::vector<Real> > ROL::Objective< 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 
)
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

Parameters
[in]xis an optimization variable.
[in]vis a direction vector.
[in]stepsis vector of steps of user-specified size.
[in]printToStreamis a flag that turns on/off output.
[out]outStreamis the output stream.
[in]orderis 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().

template<class Real >
std::vector< std::vector< Real > > ROL::Objective< 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 
)
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

Parameters
[in]xis an optimization variable.
[in]hvis used to create temporary gradient and Hessian-times-vector vectors.
[in]vis a direction vector.
[in]stepsis vector of steps of user-specified size.
[in]printToStreamis a flag that turns on/off output.
[out]outStreamis the output stream.
[in]orderis 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.

template<class Real>
virtual std::vector<Real> ROL::Objective< Real >::checkHessSym ( const Vector< Real > &  x,
const Vector< Real > &  v,
const Vector< Real > &  w,
const bool  printToStream = true,
std::ostream &  outStream = std::cout 
)
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}}. \]

Parameters
[in]xis an optimization variable.
[in]vis a direction vector.
[in]wis a direction vector.
[in]printToStreamis a flag that turns on/off output.
[out]outStreamis the output stream.

Definition at line 427 of file ROL_Objective.hpp.

References ROL::Vector< Real >::dual().

Referenced by main().

template<class Real >
std::vector< Real > ROL::Objective< 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 
)
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}}. \]

Parameters
[in]xis an optimization variable.
[in]hvis used to create temporary Hessian-times-vector vectors.
[in]vis a direction vector.
[in]wis a direction vector.
[in]printToStreamis a flag that turns on/off output.
[out]outStreamis the output stream.

Definition at line 374 of file ROL_ObjectiveDef.hpp.

References ROL::Vector< Real >::clone(), and ROL::Vector< Real >::dot().

template<class Real>
const std::vector<Real> ROL::Objective< Real >::getParameter ( void  ) const
inlineprotected
template<class Real>
virtual void ROL::Objective< Real >::setParameter ( const std::vector< Real > &  param)
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().

Member Data Documentation

template<class Real>
std::vector<Real> ROL::Objective< Real >::param_
private

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