75 Teuchos::RCP<const vector>
getVector(
const V& x ) {
76 using Teuchos::dyn_cast;
81 using Teuchos::dyn_cast;
92 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;
101 (*eg)[0] = std::cos((*ex)[0] + (*ex)[1]) + 2.0*((*ex)[0]-(*ex)[1]) - 1.5;
102 (*eg)[1] = std::cos((*ex)[0] + (*ex)[1]) - 2.0*((*ex)[0]-(*ex)[1]) + 2.5;;
112 Real h11 = -std::sin((*ex)[0] + (*ex)[1]) + 2.0;
113 Real h22 = -std::sin((*ex)[0] + (*ex)[1]) + 2.0;
114 Real h12 = -std::sin((*ex)[0] + (*ex)[1]) - 2.0;
115 Real h21 = -std::sin((*ex)[0] + (*ex)[1]) - 2.0;
117 (*ehv)[0] = h11 * (*ev)[0] + h12 * (*ev)[1];
118 (*ehv)[1] = h21 * (*ev)[0] + h22 * (*ev)[1];
128 Real h11 = -std::sin((*ex)[0] + (*ex)[1]) + 2.0;
129 Real h22 = -std::sin((*ex)[0] + (*ex)[1]) + 2.0;
130 Real h12 = -std::sin((*ex)[0] + (*ex)[1]) - 2.0;
131 Real h21 = -std::sin((*ex)[0] + (*ex)[1]) - 2.0;
133 (*ehv)[0] = 1.0/(h11*h22 - h12*h21) * (h22 * (*ev)[0] - h12 * (*ev)[1]);
134 (*ehv)[1] = 1.0/(h11*h22 - h12*h21) * (-h21 * (*ev)[0] + h11 * (*ev)[1]);
147 Teuchos::RCP<std::vector<Real> > x0p = Teuchos::rcp(
new std::vector<Real>(n,0.0));
148 (*x0p)[0] = 0.0; (*x0p)[1] = 0.0;
152 Teuchos::RCP<std::vector<Real> > xp = Teuchos::rcp(
new std::vector<Real>(n,0.0));
153 (*xp)[0] = -M_PI/3.0 + 1.0/2.0; (*xp)[1] = -M_PI/3.0 - 1.0/2.0;
160 Teuchos::RCP<std::vector<Real> > lp = Teuchos::rcp(
new std::vector<Real>(n,0.0));
161 (*lp)[0] = -1.5; (*lp)[1] = -3.0;
163 Teuchos::RCP<std::vector<Real> > up = Teuchos::rcp(
new std::vector<Real>(n,0.0));
164 (*up)[0] = 4.0; (*up)[1] = 3.0;
Provides the interface to evaluate objective functions.
Teuchos::RCP< vector > getVector(V &x)
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.
std::vector< Real > vector
Defines the linear algebra or vector space interface.
W. Hock and K. Schittkowski 5th test function.
void getHS5(Teuchos::RCP< Objective< Real > > &obj, Teuchos::RCP< BoundConstraint< Real > > &con, Teuchos::RCP< Vector< Real > > &x0, Teuchos::RCP< Vector< Real > > &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.
Provides the interface to apply upper and lower bound constraints.
Teuchos::RCP< const vector > getVector(const V &x)
Real value(const Vector< Real > &x, Real &tol)
Compute value.