10 #ifndef ROL_DOUBLEDOGLEG_U_H
11 #define ROL_DOUBLEDOGLEG_U_H
44 Real tol = std::sqrt(ROL_EPSILON<Real>());
45 const Real one(1),
zero(0), half(0.5), p2(0.2), p8(0.8), two(2);
52 Real gsN = std::abs(tmp);
58 Real gBg =
dual_->apply(s);
59 Real gnorm = s.
dual().norm();
60 Real gg = gnorm*gnorm;
61 Real alpha = del/gnorm;
62 if ( gBg > ROL_EPSILON<Real>() ) {
63 alpha = std::min(gg/gBg, del/gnorm);
68 pRed = alpha*(gg - half*alpha*gBg);
83 Real gnorm = s.
norm();
84 Real gnorm2 = gnorm*gnorm;
86 Real gBg =
dual_->apply(s);
87 Real gamma1 = gnorm/gBg;
88 Real gamma2 = gnorm/gsN;
89 Real eta = p8*gamma1*gamma2 + p2;
90 if (eta*sNnorm <= del || gBg <=
zero) {
99 if (gnorm2*gamma1 >= del) {
107 s.
scale(-gamma1*gnorm);
112 Real sigma = del*del-std::pow(gamma1*gnorm,two);
114 Real theta = (-phi + std::sqrt(phi*phi+wNorm*sigma))/wNorm;
118 beta = (one-theta)*(-gamma1*gnorm);
122 pRed = -(alpha*(half*alpha-one)*gsN + half*beta*beta*gBg + beta*(one-alpha)*gnorm2);
virtual const Vector & dual() const
Return dual representation of , for example, the result of applying a Riesz map, or change of basis...
virtual void scale(const Real alpha)=0
Compute where .
virtual ROL::Ptr< Vector > clone() const =0
Clone to make a new (uninitialized) vector.
virtual void invHessVec(Vector< Real > &hv, const Vector< Real > &v, const Vector< Real > &s, Real &tol) override
Apply inverse Hessian approximation to vector.
virtual void axpy(const Real alpha, const Vector &x)
Compute where .
Contains definitions of custom data types in ROL.
Defines the linear algebra or vector space interface.
virtual Real dot(const Vector &x) const =0
Compute where .
Objective_SerialSimOpt(const Ptr< Obj > &obj, const V &ui) z0_ zero()
virtual void hessVec(Vector< Real > &hv, const Vector< Real > &v, const Vector< Real > &s, Real &tol) override
Apply Hessian approximation to vector.
void solve(Vector< Real > &s, Real &snorm, Real &pRed, int &iflag, int &iter, const Real del, TrustRegionModel_U< Real > &model)
Provides the interface to evaluate trust-region model functions.
virtual const Ptr< const Vector< Real > > getGradient(void) const
Ptr< Vector< Real > > dual_
Ptr< Vector< Real > > primal_
Provides interface for and implements trust-region subproblem solvers.
virtual void set(const Vector &x)
Set where .
virtual Real norm() const =0
Returns where .
Provides interface for the double dog leg trust-region subproblem solver.
void initialize(const Vector< Real > &x, const Vector< Real > &g)