45#ifndef ROL_OBJECTIVE_TIMESIMOPT_HPP
46#define ROL_OBJECTIVE_TIMESIMOPT_HPP
79template<
typename Real>
116 bool flag =
true,
int iter = -1 ) {
175 bool flag =
true,
int iter = -1 )
override {
176 update(getVector<0>(u), getVector<1>(u), z, flag,iter);
180 Real& tol )
override {
181 return value( getVector<0>(u), getVector<1>(u), z, tol );
185 solve( c, getVector<0>(u), getVector<1>(u), z, tol );
191 auto& u_old = getVector<0>(u);
192 auto& u_new = getVector<1>(u);
205 auto& u_old = getVector<0>(u);
206 auto& u_new = getVector<1>(u);
213 Real& tol )
override {
215 auto& hv_old = getVector<0>(hv);
216 auto& hv_new = getVector<1>(hv);
217 auto& v_old = getVector<0>(v);
218 auto& v_new = getVector<1>(v):
219 auto& u_old = getVector<0>(u);
220 auto& u_new = getVector<1>(u);
222 hessVec_11( hv_old, v_old, u_old, u_new, z, tol );
223 hessVec_11( hv_new, v_new, u_old, u_new, z, tol );
229 Real& tol )
override { hv.
zero(); }
233 Real& tol )
override { hv.
zero(); }
237 Real& tol )
override { hv.
zero(); }
VectorWorkspace< Real > workspace_
Provides the interface to evaluate simulation-based objective functions.
Defines the time-dependent objective function interface for simulation-based optimization....
virtual void update(const Vector< Real > &u_old, const Vector< Real > &u_new, const Vector< Real > &z, bool flag=true, int iter=-1)
Update constraint functions. u_old Is the state from the end of the previous time step....
Vector< Real > & getVector(Vector< Real > &x) const
VectorWorkspace< Real > workspace_
VectorWorkspace< Real > & getVectorWorkspace() const
const Vector< Real > & getVector(const Vector< Real > &x) const
Defines the linear algebra of vector space on a generic partitioned vector.
Defines the linear algebra or vector space interface.
virtual void plus(const Vector &x)=0
Compute , where .
virtual void zero()
Set to zero vector.
ROL::Objective_SerialSimOpt Objective_SimOpt value(const V &u, const V &z, Real &tol) override
virtual void hessVec_12(V &hv, const V &v, const V &u, const V &z, Real &tol) override
virtual void update_2(const Vector< Real > &z, bool flag=true, int iter=-1) override
Update constraint functions with respect to Opt variable. z is the control variable,...
virtual void gradient_2(V &g, const V &u, const V &z, Real &tol) override
virtual void update(const Vector< Real > &u, const Vector< Real > &z, bool flag=true, int iter=-1) override
virtual void hessVec_21(V &hv, const V &v, const V &u, const V &z, Real &tol) override
virtual void update_1_new(const Vector< Real > &u_new, bool flag=true, int iter=-1)
Update constraint functions with respect to Sim variable. u_new is the state variable flag = true i...
virtual void hessVec_11_new(Vector< Real > &hv, const Vector< Real > &v_new, const Vector< Real > &u_old, const Vector< Real > &u_new, const Vector< Real > &z, Real &tol)
virtual void hessVec_11(V &hv, const V &v, const V &u, const V &z, Real &tol) override
virtual void hessVec_22(V &hv, const V &v, const V &u, const V &z, Real &tol) override
virtual void solve(Vector< Real > &c, Vector< Real > &u, const Vector< Real > &z) override
virtual void gradient_1(V &g, const V &u, const V &z, Real &tol) override
virtual void gradient_1_old(Vector< Real > &g, const Vector< Real > &u_old, Vector< Real > &u_new, const Vector< Real > &z, Real &tol)
Compute contribution to simulation term gradient from this time step.
virtual void hessVec_11_old(Vector< Real > &hv, const Vector< Real > &v_old, const Vector< Real > &u_old, const Vector< Real > &u_new, const Vector< Real > &z, Real &tol)
virtual void update_1_old(const Vector< Real > &u_old, bool flag=true, int iter=-1)
Update constraint functions with respect to Sim variable. u_old is the state variable flag = true i...
virtual void gradient_1_new(Vector< Real > &g, const Vector< Real > &u_old, Vector< Real > &u_new, const Vector< Real > &z, Real &tol)
Compute contribution to simulation term gradient from this time step.