11 #ifndef ROL_DYNAMICOBJECTIVE_CHECKINTERFACE_HPP
12 #define ROL_DYNAMICOBJECTIVE_CHECKINTERFACE_HPP
17 #include "ROL_FunctionBindings.hpp"
24 namespace ph = std::placeholders;
26 template<
typename Real>
47 obj_(obj), ts_(ts) { }
72 f_scalar_t<Real>
value_z(
const V& uo,
const V& un ) {
73 return bind( &
Obj::value, &
obj_, cref(uo), cref(un), ph::_1, ts_ );
79 return bind( &Obj::gradient_uo, &
obj_, ph::_1, ph::_2, cref(un), cref(z), ts_ );
83 return bind( &Obj::gradient_un, &
obj_, ph::_1, cref(uo), ph::_2, cref(z), ts_ );
87 return bind( &Obj::gradient_z, &
obj_, ph::_1, cref(uo), cref(un), ph::_2, ts_ );
92 return bind( &Obj::gradient_uo, &
obj_, ph::_1, ph::_2, cref(un), cref(z), ts_ );
96 return bind( &Obj::gradient_uo, &
obj_, ph::_1, cref(uo), ph::_2, cref(z), ts_ );
100 return bind( &Obj::gradient_uo, &
obj_, ph::_1, cref(uo), cref(un), ph::_2, ts_ );
104 return bind( &Obj::gradient_un, &
obj_, ph::_1, ph::_2, cref(un), cref(z), ts_ );
108 return bind( &Obj::gradient_un, &
obj_, ph::_1, cref(uo), ph::_2, cref(z), ts_ );
112 return bind( &Obj::gradient_un, &
obj_, ph::_1, cref(uo), cref(un), ph::_2, ts_ );
116 return bind( &Obj::gradient_z, &
obj_, ph::_1, ph::_2, cref(un), cref(z), ts_ );
120 return bind( &Obj::gradient_z, &
obj_, ph::_1, cref(uo), ph::_2, cref(z), ts_ );
124 return bind( &Obj::gradient_z, &
obj_, ph::_1, cref(uo), cref(un), ph::_2, ts_ );
130 return bind( &Obj::hessVec_uo_uo, &
obj_, ph::_1, ph::_2, ph::_3, cref(un), cref(z), ts_ );
134 return bind( &Obj::hessVec_uo_un, &
obj_, ph::_1, ph::_2, cref(uo), ph::_3, cref(z), ts_ );
138 return bind( &Obj::hessVec_uo_z, &
obj_, ph::_1, ph::_2, cref(uo), cref(un), ph::_3, ts_ );
144 return bind( &Obj::hessVec_un_uo, &
obj_, ph::_1, ph::_2, ph::_3, cref(un), cref(z), ts_ );
148 return bind( &Obj::hessVec_un_un, &
obj_, ph::_1, ph::_2, cref(uo), ph::_3, cref(z), ts_ );
152 return bind( &Obj::hessVec_un_z, &
obj_, ph::_1, ph::_2, cref(uo), cref(un), ph::_3, ts_ );
158 return bind( &Obj::hessVec_z_uo, &
obj_, ph::_1, ph::_2, ph::_3, cref(un), cref(z), ts_ );
162 return bind( &Obj::hessVec_z_un, &
obj_, ph::_1, ph::_2, cref(uo), ph::_3, cref(z), ts_ );
166 return bind( &Obj::hessVec_z_z, &
obj_, ph::_1, ph::_2, cref(uo), cref(un), ph::_3, ts_ );
175 using details::DynamicObjective_CheckInterface;
177 template<
typename Real>
179 return DynamicObjective_CheckInterface<Real>( obj );
182 template<
typename Real>
185 return DynamicObjective_CheckInterface<Real>( obj, ts );
192 #endif // ROL_DYNAMICOBJECTIVE_CHECKINTERFACE_HPP
f_vector_t< Real > gradient_uo_uo(const V &un, const V &z)
f_dderiv_t< Real > hessVec_un_un(const V &uo, const V &z)
DynamicObjective_CheckInterface(Obj &obj, TimeStamp< Real > &ts)
f_vector_t< Real > gradient_z(const V &uo, const V &un)
virtual void update(const Vector< Real > &u, const Vector< Real > &z, bool flag=true, int iter=-1) override
f_dderiv_t< Real > hessVec_uo_un(const V &uo, const V &z)
f_dderiv_t< Real > hessVec_z_un(const V &uo, const V &z)
f_scalar_t< Real > value_un(const V &uo, const V &z)
f_vector_t< Real > gradient_uo_z(const V &uo, const V &un)
f_vector_t< Real > gradient_un_un(const V &uo, const V &z)
Defines the linear algebra or vector space interface.
Defines the time-dependent objective function interface for simulation-based optimization. Computes time-local contributions of value, gradient, Hessian-vector product etc to a larger composite objective defined over the simulation time. In contrast to other objective classes Objective_TimeSimOpt has a default implementation of value which returns zero, as time-dependent simulation based optimization problems may have an objective value which depends only on the final state of the system.
f_dderiv_t< Real > hessVec_z_z(const V &uo, const V &un)
f_vector_t< Real > gradient_z_uo(const V &un, const V &z)
f_vector_t< Real > gradient_z_un(const V &uo, const V &z)
f_dderiv_t< Real > hessVec_un_z(const V &uo, const V &un)
DynamicObjective_CheckInterface(Obj &obj)
f_vector_t< Real > gradient_un_uo(const V &un, const V &z)
f_update_t< Real > update_z(const V &uo, const V &un)
f_vector_t< Real > gradient_uo_un(const V &uo, const V &z)
f_vector_t< Real > gradient_un(const V &uo, const V &z)
f_vector_t< Real > gradient_uo(const V &un, const V &z)
f_update_t< Real > update_uo(const V &un, const V &z)
f_scalar_t< Real > value_uo(const V &un, const V &z)
void value(ROL::Vector< Real > &c, const ROL::Vector< Real > &sol, const Real &mu)
f_update_t< Real > update_un(const V &uo, const V &z)
f_dderiv_t< Real > hessVec_z_uo(const V &un, const V &z)
f_dderiv_t< Real > hessVec_uo_uo(const V &un, const V &z)
f_vector_t< Real > gradient_z_z(const V &uo, const V &un)
f_scalar_t< Real > value_z(const V &uo, const V &un)
f_dderiv_t< Real > hessVec_uo_z(const V &uo, const V &un)
f_vector_t< Real > gradient_un_z(const V &uo, const V &un)
f_dderiv_t< Real > hessVec_un_uo(const V &un, const V &z)
DynamicConstraint_CheckInterface< Real > make_check(DynamicConstraint< Real > &con)