58 return std::sin((*ex)[0] + (*ex)[1]) + std::pow((*ex)[0]-(*ex)[1],2.0) - 1.5*(*ex)[0] + 2.5*(*ex)[1] + 1.0;
67 (*eg)[0] = std::cos((*ex)[0] + (*ex)[1]) + 2.0*((*ex)[0]-(*ex)[1]) - 1.5;
68 (*eg)[1] = std::cos((*ex)[0] + (*ex)[1]) - 2.0*((*ex)[0]-(*ex)[1]) + 2.5;;
78 Real h11 = -std::sin((*ex)[0] + (*ex)[1]) + 2.0;
79 Real h22 = -std::sin((*ex)[0] + (*ex)[1]) + 2.0;
80 Real h12 = -std::sin((*ex)[0] + (*ex)[1]) - 2.0;
81 Real h21 = -std::sin((*ex)[0] + (*ex)[1]) - 2.0;
83 (*ehv)[0] = h11 * (*ev)[0] + h12 * (*ev)[1];
84 (*ehv)[1] = h21 * (*ev)[0] + h22 * (*ev)[1];
94 Real h11 = -std::sin((*ex)[0] + (*ex)[1]) + 2.0;
95 Real h22 = -std::sin((*ex)[0] + (*ex)[1]) + 2.0;
96 Real h12 = -std::sin((*ex)[0] + (*ex)[1]) - 2.0;
97 Real h21 = -std::sin((*ex)[0] + (*ex)[1]) - 2.0;
99 (*ehv)[0] = 1.0/(h11*h22 - h12*h21) * (h22 * (*ev)[0] - h12 * (*ev)[1]);
100 (*ehv)[1] = 1.0/(h11*h22 - h12*h21) * (-h21 * (*ev)[0] + h11 * (*ev)[1]);
111 return ROL::makePtr<Objective_HS5<Real>>();
118 ROL::Ptr<std::vector<Real> > x0p = ROL::makePtr<std::vector<Real>>(n,0.0);
119 (*x0p)[0] = 0.0; (*x0p)[1] = 0.0;
120 return ROL::makePtr<StdVector<Real>>(x0p);
127 ROL::Ptr<std::vector<Real> > xp = ROL::makePtr<std::vector<Real>>(n,0.0);
129 return ROL::makePtr<StdVector<Real>>(xp);
136 ROL::Ptr<std::vector<Real> > lp = ROL::makePtr<std::vector<Real>>(n,0.0);
137 (*lp)[0] = -1.5; (*lp)[1] = -3.0;
138 ROL::Ptr<Vector<Real> > l = ROL::makePtr<StdVector<Real>>(lp);
139 ROL::Ptr<std::vector<Real> > up = ROL::makePtr<std::vector<Real>>(n,0.0);
140 (*up)[0] = 4.0; (*up)[1] = 3.0;
141 ROL::Ptr<Vector<Real> > u = ROL::makePtr<StdVector<Real>>(up);
142 return ROL::makePtr<Bounds<Real>>(l,u);
Provides the interface to evaluate objective functions.
Ptr< Objective< Real > > getObjective(void) const
virtual void hessVec(Vector< Real > &hv, const Vector< Real > &v, const Vector< Real > &x, Real &tol)
Apply Hessian approximation to vector.
Contains definitions of custom data types in ROL.
Ptr< Vector< Real > > getSolution(const int i=0) const
std::vector< Real > vector
Defines the linear algebra or vector space interface.
Ptr< BoundConstraint< Real > > getBoundConstraint(void) const
ROL::Ptr< const vector > getVector(const V &x)
Ptr< Vector< Real > > getInitialGuess(void) const
static constexpr Real pi() noexcept
W. Hock and K. Schittkowski 5th test function.
Contains definitions of test objective functions.
ROL::Ptr< vector > getVector(V &x)
void gradient(Vector< Real > &g, const Vector< Real > &x, Real &tol)
Compute gradient.
void invHessVec(Vector< Real > &hv, const Vector< Real > &v, const Vector< Real > &x, Real &tol)
Apply inverse Hessian approximation to vector.
Real value(const Vector< Real > &x, Real &tol)
Compute value.