75 Teuchos::RCP<const vector>
getVector(
const V& x ) {
76 using Teuchos::dyn_cast;
81 using Teuchos::dyn_cast;
92 return 100.0 * std::pow((*ex)[1] - std::pow((*ex)[0],2.0),2.0) + std::pow(1.0-(*ex)[0],2.0);
100 (*eg)[0] = -400.0 * ((*ex)[1] - std::pow((*ex)[0],2.0)) * (*ex)[0] - 2.0 * (1.0-(*ex)[0]);
101 (*eg)[1] = 200.0 * ((*ex)[1] - std::pow((*ex)[0],2.0));
111 Real h11 = -400.0 * (*ex)[1] + 1200.0 * std::pow((*ex)[0],2.0) + 2.0;
113 Real h12 = -400.0 * (*ex)[0];
114 Real h21 = -400.0 * (*ex)[0];
118 (*ehv)[0] = (h11+alpha) * (*ev)[0] + h12 * (*ev)[1];
119 (*ehv)[1] = h21 * (*ev)[0] + (h22+alpha) * (*ev)[1];
129 Real h11 = -400.0 * (*ex)[1] + 1200.0 * std::pow((*ex)[0],2.0) + 2.0;
131 Real h12 = -400.0 * (*ex)[0];
132 Real h21 = -400.0 * (*ex)[0];
134 (*ehv)[0] = 1.0/(h11*h22 - h12*h21) * (h22 * (*ev)[0] - h12 * (*ev)[1]);
135 (*ehv)[1] = 1.0/(h11*h22 - h12*h21) * (-h21 * (*ev)[0] + h11 * (*ev)[1]);
148 Teuchos::RCP<std::vector<Real> > x0p = Teuchos::rcp(
new std::vector<Real>(n,0.0));
149 (*x0p)[0] = -2.0; (*x0p)[1] = 1.0;
153 Teuchos::RCP<std::vector<Real> > xp = Teuchos::rcp(
new std::vector<Real>(n,0.0));
154 Real a = std::sqrt(598.0/1200.0);
155 Real b = 400.0 * std::pow(a,3.0);
156 (*xp)[0] = 2.0*a*std::cos(1.0/3.0 * std::acos(1.0/b));
164 Teuchos::RCP<std::vector<Real> > lp = Teuchos::rcp(
new std::vector<Real>(n,0.0));
165 (*lp)[0] =
ROL_NINF; (*lp)[1] = 1.5;
166 Teuchos::RCP<Vector<Real> > l = Teuchos::rcp(
new StdVector<Real>(lp) );
167 Teuchos::RCP<std::vector<Real> > up = Teuchos::rcp(
new std::vector<Real>(n,0.0));
169 Teuchos::RCP<Vector<Real> > u = Teuchos::rcp(
new StdVector<Real>(up) );
Provides the interface to evaluate objective functions.
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.
void gradient(Vector< Real > &g, const Vector< Real > &x, Real &tol)
Compute gradient.
Defines the linear algebra or vector space interface.
void invHessVec(Vector< Real > &hv, const Vector< Real > &v, const Vector< Real > &x, Real &tol)
Apply inverse Hessian approximation to vector.
void getHS2(Teuchos::RCP< Objective< Real > > &obj, Teuchos::RCP< BoundConstraint< Real > > &con, Teuchos::RCP< Vector< Real > > &x0, Teuchos::RCP< Vector< Real > > &x)
std::vector< Real > vector
Provides the interface to apply upper and lower bound constraints.
static const double ROL_INF
Teuchos::RCP< vector > getVector(V &x)
static const double ROL_NINF
Real value(const Vector< Real > &x, Real &tol)
Compute value.
Teuchos::RCP< const vector > getVector(const V &x)
W. Hock and K. Schittkowski 2nd test function.