69 typedef typename std::vector<Real>::size_type
uint;
79 u_vec_.push_back(static_cast<Real>(25)
80 + std::pow((static_cast<Real>(-50)
81 *std::log(static_cast<Real>(0.01)*static_cast<Real>(i+1))),
82 static_cast<Real>(2)/static_cast<Real>(3)));
87 Teuchos::RCP<const std::vector<Real> > ex
90 Real val(0), f(0), u(0);
91 Real x1 = (*ex)[0], x2 = (*ex)[1], x3 = (*ex)[2];
94 f = -
static_cast<Real
>(0.01)*
static_cast<Real
>(i+1)
95 + std::exp(-std::pow(u-x2,x3)/x1);
102 Teuchos::RCP<std::vector<Real> > eg
104 Teuchos::RCP<const std::vector<Real> > ex
108 Real f(0), df1(0), df2(0), df3(0);
109 Real u(0), tmp(0), tmp0(0), tmp1(0);
110 Real x1 = (*ex)[0], x2 = (*ex)[1], x3 = (*ex)[2];
114 tmp0 = std::pow(u-x2,x3);
115 tmp1 = std::pow(u-x2,x3-static_cast<Real>(1));
116 tmp = std::exp(-tmp0/x1);
118 f = -
static_cast<Real
>(0.01)*
static_cast<Real
>(i+1) + tmp;
120 df1 = tmp*tmp0/x1sqr;
121 df2 = tmp*x3*tmp1/x1;
122 df3 = tmp*tmp0*std::log(u-x2)/x1;
124 (*eg)[0] +=
static_cast<Real
>(2)*f*df1;
125 (*eg)[1] +=
static_cast<Real
>(2)*f*df2;
126 (*eg)[2] +=
static_cast<Real
>(2)*f*df3;
131 Teuchos::RCP<std::vector<Real> > ehv
133 Teuchos::RCP<const std::vector<Real> > ev
135 Teuchos::RCP<const std::vector<Real> > ex
140 Real df1(0), df2(0), df3(0);
141 Real df11(0), df12(0), df13(0);
142 Real df21(0), df22(0), df23(0);
143 Real df31(0), df32(0), df33(0);
144 Real u(0), tmp(0), tmp0(0), tmp1(0), tmp2(0), tmp3(0), tmp4(0);
145 Real x1 = (*ex)[0], x2 = (*ex)[1], x3 = (*ex)[2];
146 Real v1 = (*ev)[0], v2 = (*ev)[1], v3 = (*ev)[2];
147 Real x1sqr = x1*x1, x1cub = x1sqr*x1, x1quar = x1cub*x1;
150 tmp0 = std::pow(u-x2,x3);
151 tmp1 = std::pow(u-x2,x3-static_cast<Real>(1));
152 tmp2 = std::pow(u-x2,static_cast<Real>(2)*(x3-static_cast<Real>(1)));
153 tmp3 = std::pow(u-x2,x3-static_cast<Real>(2));
154 tmp4 = std::pow(u-x2,static_cast<Real>(2)*x3-static_cast<Real>(1));
155 tmp = std::exp(-tmp0/x1);
157 f = -
static_cast<Real
>(0.01)*
static_cast<Real
>(i+1) + tmp;
159 df1 = tmp*tmp0/x1sqr;
160 df2 = tmp*x3*tmp1/x1;
161 df3 = tmp*tmp0*std::log(u-x2)/x1;
163 df11 = tmp0*tmp*(tmp0-
static_cast<Real
>(2)*x1)/x1quar;
164 df12 = x3*tmp1*tmp*(tmp0-x1)/x1cub;
165 df13 = tmp0*std::log(u-x2)*tmp*(x1-tmp0)/x1cub;
168 df22 = x3*x3*tmp2*tmp/(x1*x1)
169 -(x3-static_cast<Real>(1))*x3*tmp3*tmp/x1;
170 df23 = -x3*tmp4*std::log(u-x2)*tmp/x1sqr
171 +tmp1*tmp/x1 + x3*tmp1*std::log(u-x2)*tmp/x1;
175 df33 = tmp0*std::pow(std::log(u-x2),2)*tmp*(tmp0-x1)/x1sqr;
177 (*ehv)[0] +=
static_cast<Real
>(2)*(f*(df11*v1 + df12*v2 + df13*v3)
178 + df1*(df1*v1 + df2*v2 + df3*v3));
179 (*ehv)[1] +=
static_cast<Real
>(2)*(f*(df21*v1 + df22*v2 + df23*v3)
180 + df2*(df1*v1 + df2*v2 + df3*v3));
181 (*ehv)[2] +=
static_cast<Real
>(2)*(f*(df31*v1 + df32*v2 + df33*v3)
182 + df3*(df1*v1 + df2*v2 + df3*v3));
197 Teuchos::RCP<std::vector<Real> > scale = Teuchos::rcp(
new std::vector<Real>(n,0));
198 (*scale)[0] =
static_cast<Real
>(1.e-4);
199 (*scale)[1] =
static_cast<Real
>(1.e-2);
200 (*scale)[2] =
static_cast<Real
>(1);
203 Teuchos::RCP<std::vector<Real> > x0p = Teuchos::rcp(
new std::vector<Real>(n,0));
204 (*x0p)[0] =
static_cast<Real
>(100);
205 (*x0p)[1] =
static_cast<Real
>(12.5);
206 (*x0p)[2] =
static_cast<Real
>(3);
210 Teuchos::RCP<std::vector<Real> > xp = Teuchos::rcp(
new std::vector<Real>(n,0));
211 (*xp)[0] =
static_cast<Real
>(50);
212 (*xp)[1] =
static_cast<Real
>(25);
213 (*xp)[2] =
static_cast<Real
>(1.5);
220 Teuchos::RCP<std::vector<Real> > lp = Teuchos::rcp(
new std::vector<Real>(n,0));
221 (*lp)[0] =
static_cast<Real
>(0.1);
222 (*lp)[1] =
static_cast<Real
>(0);
223 (*lp)[2] =
static_cast<Real
>(0);
225 Teuchos::RCP<std::vector<Real> > up = Teuchos::rcp(
new std::vector<Real>(n,0));
226 (*up)[0] =
static_cast<Real
>(100);
227 (*up)[1] =
static_cast<Real
>(25.6);
228 (*up)[2] =
static_cast<Real
>(5);
Provides the interface to evaluate objective functions.
Provides the std::vector implementation of the ROL::Vector interface that handles scalings in the inn...
std::vector< Real > u_vec_
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.
virtual void zero()
Set to zero vector.
Defines the linear algebra or vector space interface.
Real value(const Vector< Real > &x, Real &tol)
Compute value.
std::vector< Real >::size_type uint
void gradient(Vector< Real > &g, const Vector< Real > &x, Real &tol)
Compute gradient.
W. Hock and K. Schittkowski 25th test function.
Provides the interface to apply upper and lower bound constraints.
Provides the std::vector implementation of the ROL::Vector interface that handles scalings in the inn...
void getHS25(Teuchos::RCP< Objective< Real > > &obj, Teuchos::RCP< BoundConstraint< Real > > &con, Teuchos::RCP< Vector< Real > > &x0, Teuchos::RCP< Vector< Real > > &x)