48 Real term1 = (*xp)[0]+3*(*xp)[1]+(*xp)[2];
49 Real term2 = (*xp)[0]-(*xp)[1];
50 return term1*term1 + 4*term2*term2;
57 (*gp)[0] = 10*(*xp)[0] - 2*(*xp)[1] + 2*(*xp)[2];
58 (*gp)[1] = -2*(*xp)[0] + 26*(*xp)[1] + 6*(*xp)[2];
59 (*gp)[2] = 2*(*xp)[0] + 6*(*xp)[1] + 2*(*xp)[2];
66 (*hvp)[0] = 10*(*vp)[0] - 2*(*vp)[1] + 2*(*vp)[2];
67 (*hvp)[1] = -2*(*vp)[0] + 26*(*vp)[1] + 6*(*vp)[2];
68 (*hvp)[2] = 2*(*vp)[0] + 6*(*vp)[1] + 2*(*vp)[2];
99 (*cp)[0] = one - (*xp)[0] - (*xp)[1] - (*xp)[2];
107 (*jvp)[0] = - (*vp)[0] - (*vp)[1] - (*vp)[2];
115 (*ajvp)[0] = -(*vp)[0];
116 (*ajvp)[1] = -(*vp)[0];
117 (*ajvp)[2] = -(*vp)[0];
148 const Real three(3), four(4), six(6);
152 (*cp)[0] = six*(*xp)[1]+four*(*xp)[2]-std::pow((*xp)[0],three)-three;
157 const Real three(3), four(4), six(6);
162 (*jvp)[0] = -three*(*xp)[0]*(*xp)[0]*(*vp)[0]+six*(*vp)[1]+four*(*vp)[2];
167 const Real three(3), four(4), six(6);
172 (*ajvp)[0] = -three*(*xp)[0]*(*xp)[0]*(*vp)[0];
173 (*ajvp)[1] = six*(*vp)[0];
174 (*ajvp)[2] = four*(*vp)[0];
179 const Real
zero(0), six(6);
185 (*ahuvp)[0] = -six*(*up)[0]*(*vp)[0]*(*xp)[0];
199 return makePtr<Objective_HS32<Real>>();
203 return makePtr<EqualityConstraint_HS32<Real>>();
207 return makePtr<InequalityConstraint_HS32<Real>>();
212 Ptr<std::vector<Real> > lp = makePtr<std::vector<Real>>(3,
static_cast<Real
>(0));
215 Ptr<std::vector<Real> > up = makePtr<std::vector<Real>>(3, ROL_INF<Real>());
217 Ptr<Vector<Real> > l = makePtr<StdVector<Real>>(lp);
218 Ptr<Vector<Real> > u = makePtr<StdVector<Real>>(up);
220 return makePtr<Bounds<Real>>(l,u);
224 Ptr<std::vector<Real> > x0p = makePtr<std::vector<Real>>(3);
229 return makePtr<StdVector<Real>>(x0p);
233 Ptr<std::vector<Real> > xp = makePtr<std::vector<Real>>(3);
238 return makePtr<StdVector<Real>>(xp);
242 Ptr<std::vector<Real> > lp = makePtr<std::vector<Real>>(1,0.0);
243 return makePtr<StdVector<Real>>(lp);
247 Ptr<std::vector<Real> > lp = makePtr<std::vector<Real>>(1,0.0);
248 return makePtr<StdVector<Real>>(lp);
253 Ptr<std::vector<Real> > lp = makePtr<std::vector<Real>>(1,0.0);
256 Ptr<std::vector<Real> > up = makePtr<std::vector<Real>>(1,ROL_INF<Real>());
258 Ptr<Vector<Real> > l = makePtr<StdVector<Real>>(lp);
259 Ptr<Vector<Real> > u = makePtr<StdVector<Real>>(up);
261 return makePtr<Bounds<Real>>(l,u);
269 #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