11 #ifndef ROL_OBJECTIVE_TIMESIMOPT_HPP
12 #define ROL_OBJECTIVE_TIMESIMOPT_HPP
45 template<
typename Real>
82 bool flag =
true,
int iter = -1 ) {
141 bool flag =
true,
int iter = -1 )
override {
142 update(getVector<0>(u), getVector<1>(u), z, flag,iter);
146 Real& tol )
override {
147 return value( getVector<0>(u), getVector<1>(u), z, tol );
151 solve( c, getVector<0>(u), getVector<1>(u), z, tol );
157 auto& u_old = getVector<0>(u);
158 auto& u_new = getVector<1>(u);
171 auto& u_old = getVector<0>(u);
172 auto& u_new = getVector<1>(u);
179 Real& tol )
override {
181 auto& hv_old = getVector<0>(hv);
182 auto& hv_new = getVector<1>(hv);
183 auto& v_old = getVector<0>(v);
184 auto& v_new = getVector<1>(v):
185 auto& u_old = getVector<0>(u);
186 auto& u_new = getVector<1>(u);
188 hessVec_11( hv_old, v_old, u_old, u_new, z, tol );
189 hessVec_11( hv_new, v_new, u_old, u_new, z, tol );
195 Real& tol )
override { hv.
zero(); }
199 Real& tol )
override { hv.
zero(); }
203 Real& tol )
override { hv.
zero(); }
208 #endif // ROL_OBJECTIVE_TIMESIMOPT_HPP
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_21(V &hv, const V &v, const V &u, const V &z, Real &tol) override
Provides the interface to evaluate simulation-based objective functions.
virtual void gradient_1(V &g, const V &u, const V &z, Real &tol) override
VectorWorkspace< Real > workspace_
virtual void plus(const Vector &x)=0
Compute , where .
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.
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.
Defines the linear algebra of vector space on a generic partitioned vector.
virtual void update(const Vector< Real > &u, const Vector< Real > &z, bool flag=true, int iter=-1) override
ROL::Objective_SimOpt value
virtual void zero()
Set to zero vector.
virtual void hessVec_12(V &hv, const V &v, const V &u, const V &z, Real &tol) override
Defines the linear algebra or vector space interface.
virtual void gradient_2(V &g, 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
VectorWorkspace< Real > & getVectorWorkspace() const
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 if ...
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_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)
VectorWorkspace< Real > workspace_
virtual void solve(Vector< Real > &c, Vector< Real > &u, const Vector< Real > &z) override
virtual void hessVec_11(V &hv, const V &v, const V &u, const V &z, Real &tol) override
const Vector< Real > & getVector(const Vector< Real > &x) const
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, flag = true if optimization variable is changed, iter is the outer algorithm iterations count.
Vector< Real > & getVector(Vector< Real > &x) const
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 if ...
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...