69 Teuchos::RCP<const vector>
getVector(
const V& x ) {
70 using Teuchos::dyn_cast;
75 using Teuchos::dyn_cast;
86 Real term1 = (*xp)[0]+3*(*xp)[1]+(*xp)[2];
87 Real term2 = (*xp)[0]-(*xp)[1];
88 return term1*term1 + 4*term2*term2;
98 (*gp)[0] = 10*(*xp)[0] - 2*(*xp)[1] + 2*(*xp)[2];
99 (*gp)[1] = -2*(*xp)[0] + 26*(*xp)[1] + 6*(*xp)[2];
100 (*gp)[2] = 2*(*xp)[0] + 6*(*xp)[1] + 2*(*xp)[2];
110 (*hvp)[0] = 10*(*vp)[0] - 2*(*vp)[1] + 2*(*vp)[2];
111 (*hvp)[1] = -2*(*vp)[0] + 26*(*vp)[1] + 6*(*vp)[2];
112 (*hvp)[2] = 2*(*vp)[0] + 6*(*vp)[1] + 2*(*vp)[2];
129 using Teuchos::dyn_cast;
130 return dyn_cast<
const SV>(x).
getVector();
134 using Teuchos::dyn_cast;
146 (*cp)[0] = 1.0 - (*xp)[0] - (*xp)[1] - (*xp)[2];
156 (*jvp)[0] = - (*vp)[0] - (*vp)[1] - (*vp)[2];
168 (*ajvp)[0] = -(*vp)[0];
169 (*ajvp)[1] = -(*vp)[0];
170 (*ajvp)[2] = -(*vp)[0];
192 using Teuchos::dyn_cast;
193 return dyn_cast<
const SV>(x).
getVector();
197 using Teuchos::dyn_cast;
209 (*cp)[0] = 6*(*xp)[1]+4*(*xp)[2]-std::pow((*xp)[0],3)-3.0;
224 (*jvp)[0] = -3*(*xp)[0]*(*xp)[0]*(*vp)[0]+6*(*vp)[1]+4*(*vp)[2];
225 (*jvp)[1] = (*vp)[0];
226 (*jvp)[2] = (*vp)[1];
227 (*jvp)[3] = (*vp)[2];
239 (*ajvp)[0] = -3*(*xp)[0]*(*xp)[0]*(*vp)[0] + (*vp)[1];
240 (*ajvp)[1] = 6*(*vp)[0] + (*vp)[2];
241 (*ajvp)[2] = 4*(*vp)[0] + (*vp)[3];
254 (*ahuvp)[0] = -6*(*up)[0]*(*vp)[0]*(*xp)[0];
266 #endif // ROL_HS32_HPP void gradient(Vector< Real > &g, const Vector< Real > &x, Real &tol)
Compute gradient.
Provides the interface to evaluate objective functions.
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 .
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 .
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 .
Defines the equality constraint operator 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 .
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 ...
Teuchos::RCP< vector > getVector(V &x)
Teuchos::RCP< vector > getVector(V &x)
std::vector< Real > vector
Real value(const Vector< Real > &x, Real &tol)
Compute value.
Teuchos::RCP< const vector > getVector(const V &x)
Teuchos::RCP< const vector > getVector(const V &x)
Provides a unique argument for inequality constraints, which otherwise behave exactly as equality con...
Teuchos::RCP< vector > getVector(V &x)
std::vector< Real > vector
Teuchos::RCP< const vector > getVector(const V &x)