10 #ifndef ROL_OBJECTIVE_FROM_CONSTRAINT_DEF_H
11 #define ROL_OBJECTIVE_FROM_CONSTRAINT_DEF_H
15 template<
typename Real>
18 con_(con), l_(l.clone()), c_(l.dual().clone()) {
22 template<
typename Real>
24 con_->update(x,type,iter);
27 template<
typename Real>
29 con_->update(x,flag,iter);
32 template<
typename Real>
34 con_->value(*c_,x,tol);
36 return l_->apply(*c_);
39 template<
typename Real>
41 con_->applyAdjointJacobian(g,*l_,x,tol);
44 template<
typename Real>
46 con_->applyAdjointHessian(hv,*l_,v,x,tol);
49 template<
typename Real>
56 #endif // ROL_OBJECTIVE_FROM_CONSTRAINT_DEF_H
Defines the linear algebra or vector space interface.
void update(const Vector< Real > &x, UpdateType type, int iter=-1) override
Update objective function.
Real value(const Vector< Real > &x, Real &tol) override
Compute value.
void updateMultiplier(const Vector< Real > &l)
ObjectiveFromConstraint(const Ptr< Constraint< Real >> &con, const Vector< Real > &l)
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.
Defines the general constraint operator interface.