10 #ifndef ROL_REDUCEDDYNAMICSTATIONARYCONTROLSOBJECTIVE_HPP
11 #define ROL_REDUCEDDYNAMICSTATIONARYCONTROLSOBJECTIVE_HPP
13 #include "ROL_Ptr.hpp"
20 template <
typename Real>
42 template <
typename Real>
87 hook_->postValue(val);
95 hook_->preGradient(x);
102 if (
hook_ != nullPtr)
103 hook_->postGradient(g);
123 Ptr<ReducedDynamicStationaryControlsObjectiveHook<Real>>
hook_;
Provides the interface to evaluate objective functions.
static Ptr< PartitionedVector > create(std::initializer_list< Vp > vs)
Ptr< PartitionedVector< Real > > x_dyn_
typename PV< Real >::size_type size_type
Ptr< ReducedDynamicObjective< Real > > red_dyn_obj_
virtual void preGradient(const Vector< Real > &x) const =0
Defines the reduced time-dependent objective function interface for simulation-based optimization...
virtual void axpy(const Real alpha, const Vector &x)
Compute where .
virtual void zero()
Set to zero vector.
Defines the linear algebra or vector space interface.
ReducedDynamicStationaryControlsObjectiveHook()
virtual void postGradient(const Vector< Real > &g) const =0
virtual ~ReducedDynamicStationaryControlsObjective()
Ptr< PartitionedVector< Real > > g_dyn_
Ptr< ReducedDynamicStationaryControlsObjectiveHook< Real > > hook_
virtual void preValue(const Vector< Real > &x) const =0
void hessVec(Vector< Real > &hv, const Vector< Real > &v, const Vector< Real > &x, Real &tol) override
Apply Hessian approximation to vector.
void gradient(Vector< Real > &g, const Vector< Real > &x, Real &tol) override
Compute gradient.
virtual void postValue(Real val) const =0
virtual ~ReducedDynamicStationaryControlsObjectiveHook()
Ptr< PartitionedVector< Real > > v_dyn_
Real value(const Vector< Real > &x, Real &tol) override
Compute value.
Defines the reduced time-dependent objective function interface for simulation-based optimization whe...
typename std::vector< Real >::size_type size_type
void update(const Vector< Real > &x, bool flag=true, int iter=-1) override
Update objective function.
ReducedDynamicStationaryControlsObjective(const Ptr< ReducedDynamicObjective< Real >> &red_dyn_obj, const Ptr< Vector< Real >> &x, const size_type Nt, const Ptr< ReducedDynamicStationaryControlsObjectiveHook< Real >> &hook=nullPtr)
void update(const Vector< Real > &x, UpdateType type, int iter=-1) override
Update objective function.