44 #ifndef ROL_DOUBLEDOGLEG_U_H
45 #define ROL_DOUBLEDOGLEG_U_H
78 Real tol = std::sqrt(ROL_EPSILON<Real>());
79 const Real one(1),
zero(0), half(0.5), p2(0.2), p8(0.8), two(2);
86 Real gsN = std::abs(tmp);
92 Real gBg =
dual_->apply(s);
93 Real gnorm = s.
dual().norm();
94 Real gg = gnorm*gnorm;
95 Real alpha = del/gnorm;
96 if ( gBg > ROL_EPSILON<Real>() ) {
97 alpha = std::min(gg/gBg, del/gnorm);
102 pRed = alpha*(gg - half*alpha*gBg);
117 Real gnorm = s.
norm();
118 Real gnorm2 = gnorm*gnorm;
120 Real gBg =
dual_->apply(s);
121 Real gamma1 = gnorm/gBg;
122 Real gamma2 = gnorm/gsN;
123 Real eta = p8*gamma1*gamma2 + p2;
124 if (eta*sNnorm <= del || gBg <=
zero) {
133 if (gnorm2*gamma1 >= del) {
141 s.
scale(-gamma1*gnorm);
146 Real sigma = del*del-std::pow(gamma1*gnorm,two);
148 Real theta = (-phi + std::sqrt(phi*phi+wNorm*sigma))/wNorm;
152 beta = (one-theta)*(-gamma1*gnorm);
156 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)