82 Real term1 = (*xp)[0]+3*(*xp)[1]+(*xp)[2];
83 Real term2 = (*xp)[0]-(*xp)[1];
84 return term1*term1 + 4*term2*term2;
91 (*gp)[0] = 10*(*xp)[0] - 2*(*xp)[1] + 2*(*xp)[2];
92 (*gp)[1] = -2*(*xp)[0] + 26*(*xp)[1] + 6*(*xp)[2];
93 (*gp)[2] = 2*(*xp)[0] + 6*(*xp)[1] + 2*(*xp)[2];
100 (*hvp)[0] = 10*(*vp)[0] - 2*(*vp)[1] + 2*(*vp)[2];
101 (*hvp)[1] = -2*(*vp)[0] + 26*(*vp)[1] + 6*(*vp)[2];
102 (*hvp)[2] = 2*(*vp)[0] + 6*(*vp)[1] + 2*(*vp)[2];
133 (*cp)[0] = one - (*xp)[0] - (*xp)[1] - (*xp)[2];
141 (*jvp)[0] = - (*vp)[0] - (*vp)[1] - (*vp)[2];
149 (*ajvp)[0] = -(*vp)[0];
150 (*ajvp)[1] = -(*vp)[0];
151 (*ajvp)[2] = -(*vp)[0];
182 const Real three(3), four(4), six(6);
186 (*cp)[0] = six*(*xp)[1]+four*(*xp)[2]-std::pow((*xp)[0],three)-three;
191 const Real three(3), four(4), six(6);
196 (*jvp)[0] = -three*(*xp)[0]*(*xp)[0]*(*vp)[0]+six*(*vp)[1]+four*(*vp)[2];
201 const Real three(3), four(4), six(6);
206 (*ajvp)[0] = -three*(*xp)[0]*(*xp)[0]*(*vp)[0];
207 (*ajvp)[1] = six*(*vp)[0];
208 (*ajvp)[2] = four*(*vp)[0];
213 const Real
zero(0), six(6);
219 (*ahuvp)[0] = -six*(*up)[0]*(*vp)[0]*(*xp)[0];
233 return makePtr<Objective_HS32<Real>>();
237 return makePtr<EqualityConstraint_HS32<Real>>();
241 return makePtr<InequalityConstraint_HS32<Real>>();
246 Ptr<std::vector<Real> > lp = makePtr<std::vector<Real>>(3,
static_cast<Real
>(0));
249 Ptr<std::vector<Real> > up = makePtr<std::vector<Real>>(3, ROL_INF<Real>());
251 Ptr<Vector<Real> > l = makePtr<StdVector<Real>>(lp);
252 Ptr<Vector<Real> > u = makePtr<StdVector<Real>>(up);
254 return makePtr<Bounds<Real>>(l,u);
258 Ptr<std::vector<Real> > x0p = makePtr<std::vector<Real>>(3);
263 return makePtr<StdVector<Real>>(x0p);
267 Ptr<std::vector<Real> > xp = makePtr<std::vector<Real>>(3);
272 return makePtr<StdVector<Real>>(xp);
276 Ptr<std::vector<Real> > lp = makePtr<std::vector<Real>>(1,0.0);
277 return makePtr<StdVector<Real>>(lp);
281 Ptr<std::vector<Real> > lp = makePtr<std::vector<Real>>(1,0.0);
282 return makePtr<StdVector<Real>>(lp);
287 Ptr<std::vector<Real> > lp = makePtr<std::vector<Real>>(1,0.0);
290 Ptr<std::vector<Real> > up = makePtr<std::vector<Real>>(1,ROL_INF<Real>());
292 Ptr<Vector<Real> > l = makePtr<StdVector<Real>>(lp);
293 Ptr<Vector<Real> > u = makePtr<StdVector<Real>>(up);
295 return makePtr<Bounds<Real>>(l,u);
303 #endif // ROL_HS32_HPP
void gradient(Vector< Real > &g, const Vector< Real > &x, Real &tol)
Compute gradient.
Provides the interface to evaluate objective functions.
InequalityConstraint_HS32(void)
void applyAdjointJacobian(Vector< Real > &ajv, const Vector< Real > &v, const Vector< Real > &x, Real &tol)
Apply the adjoint of the the constraint Jacobian at , , to vector .
Ptr< BoundConstraint< Real > > getBoundConstraint(void) const
std::vector< Real > vector
virtual void zero()
Set to zero vector.
Defines the linear algebra or vector space interface.
void value(Vector< Real > &c, const Vector< Real > &x, Real &tol)
Evaluate the constraint operator at .
void applyJacobian(Vector< Real > &jv, const Vector< Real > &v, const Vector< Real > &x, Real &tol)
Apply the constraint Jacobian at , , to vector .
Ptr< Constraint< Real > > getInequalityConstraint(void) const
Objective_SerialSimOpt(const Ptr< Obj > &obj, const V &ui) z0_ zero()
Ptr< vector > getVector(V &x)
void hessVec(Vector< Real > &hv, const Vector< Real > &v, const Vector< Real > &x, Real &tol)
Apply Hessian approximation to vector.
void applyAdjointJacobian(Vector< Real > &ajv, const Vector< Real > &v, const Vector< Real > &x, Real &tol)
Apply the adjoint of the the constraint Jacobian at , , to vector .
Ptr< const vector > getVector(const V &x)
Ptr< Vector< Real > > getSolution(const int i=0) const
Ptr< Objective< Real > > getObjective(void) const
void value(Vector< Real > &c, const Vector< Real > &x, Real &tol)
Evaluate the constraint operator at .
Contains definitions of test objective functions.
void applyJacobian(Vector< Real > &jv, const Vector< Real > &v, const Vector< Real > &x, Real &tol)
Apply the constraint Jacobian at , , to vector .
Ptr< vector > getVector(V &x)
EqualityConstraint_HS32()
void applyAdjointHessian(Vector< Real > &ahuv, const Vector< Real > &u, const Vector< Real > &v, const Vector< Real > &x, Real &tol)
Apply the derivative of the adjoint of the constraint Jacobian at to vector in direction ...
void applyAdjointHessian(Vector< Real > &ahuv, const Vector< Real > &u, const Vector< Real > &v, const Vector< Real > &x, Real &tol)
Apply the derivative of the adjoint of the constraint Jacobian at to vector in direction ...
std::vector< Real > vector
Real value(const Vector< Real > &x, Real &tol)
Compute value.
Ptr< vector > getVector(V &x)
Ptr< Vector< Real > > getInequalityMultiplier(void) const
Ptr< const vector > getVector(const V &x)
Ptr< BoundConstraint< Real > > getSlackBoundConstraint(void) const
Ptr< Constraint< Real > > getEqualityConstraint(void) const
Defines the general constraint operator interface.
Ptr< const vector > getVector(const V &x)
Ptr< Vector< Real > > getInitialGuess(void) const
Ptr< Vector< Real > > getEqualityMultiplier(void) const
std::vector< Real > vector