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];
132 (*cp)[0] = 1.0 - (*xp)[0] - (*xp)[1] - (*xp)[2];
140 (*jvp)[0] = - (*vp)[0] - (*vp)[1] - (*vp)[2];
148 (*ajvp)[0] = -(*vp)[0];
149 (*ajvp)[1] = -(*vp)[0];
150 (*ajvp)[2] = -(*vp)[0];
184 (*cp)[0] = 6*(*xp)[1]+4*(*xp)[2]-std::pow((*xp)[0],3)-3.0;
193 (*jvp)[0] = -3*(*xp)[0]*(*xp)[0]*(*vp)[0]+6*(*vp)[1]+4*(*vp)[2];
202 (*ajvp)[0] = -3*(*xp)[0]*(*xp)[0]*(*vp)[0];
203 (*ajvp)[1] = 6*(*vp)[0];
204 (*ajvp)[2] = 4*(*vp)[0];
214 (*ahuvp)[0] = -6*(*up)[0]*(*vp)[0]*(*xp)[0];
226 return makePtr<Objective_HS32<Real>>();
230 return makePtr<EqualityConstraint_HS32<Real>>();
234 return makePtr<InequalityConstraint_HS32<Real>>();
239 Ptr<std::vector<Real> > lp = makePtr<std::vector<Real>>(3,
static_cast<Real
>(0));
242 Ptr<std::vector<Real> > up = makePtr<std::vector<Real>>(3, ROL_INF<Real>());
244 Ptr<Vector<Real> > l = makePtr<StdVector<Real>>(lp);
245 Ptr<Vector<Real> > u = makePtr<StdVector<Real>>(up);
247 return makePtr<Bounds<Real>>(l,u);
251 Ptr<std::vector<Real> > x0p = makePtr<std::vector<Real>>(3);
256 return makePtr<StdVector<Real>>(x0p);
260 Ptr<std::vector<Real> > xp = makePtr<std::vector<Real>>(3);
265 return makePtr<StdVector<Real>>(xp);
269 Ptr<std::vector<Real> > lp = makePtr<std::vector<Real>>(1,0.0);
270 return makePtr<StdVector<Real>>(lp);
274 Ptr<std::vector<Real> > lp = makePtr<std::vector<Real>>(1,0.0);
275 return makePtr<StdVector<Real>>(lp);
280 Ptr<std::vector<Real> > lp = makePtr<std::vector<Real>>(1,0.0);
283 Ptr<std::vector<Real> > up = makePtr<std::vector<Real>>(1,ROL_INF<Real>());
285 Ptr<Vector<Real> > l = makePtr<StdVector<Real>>(lp);
286 Ptr<Vector<Real> > u = makePtr<StdVector<Real>>(up);
288 return makePtr<Bounds<Real>>(l,u);
296 #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
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