44 #ifndef ROL_DOUBLEDOGLEG_H
45 #define ROL_DOUBLEDOGLEG_H
61 Teuchos::RCP<CauchyPoint<Real> >
cpt_;
63 Teuchos::RCP<Vector<Real> >
s_;
64 Teuchos::RCP<Vector<Real> >
v_;
65 Teuchos::RCP<Vector<Real> >
Hp_;
90 Real sNnorm =
s_->norm();
91 Real tmp =
s_->dot(grad.
dual());
96 Real gsN = std::abs(tmp);
99 cpt_->run(s,snorm,del,iflag,iter,x,grad,gnorm,pObj);
115 Real gnorm2 = gnorm*gnorm;
116 Real gBg = grad.
dot(*
Hp_);
117 Real gamma1 = gnorm/gBg;
118 Real gamma2 = gnorm/gsN;
119 Real eta = 0.8*gamma1*gamma2 + 0.2;
120 if (eta*sNnorm <= del || gBg <= 0.0) {
129 if (gnorm2*gamma1 >= del) {
139 s.
scale(-gamma1*gnorm);
143 Real wNorm =
v_->dot(*
v_);
144 Real sigma = del*del-std::pow(gamma1*gnorm,2.0);
145 Real phi = s.
dot(*
v_);
146 Real theta = (-phi + std::sqrt(phi*phi+wNorm*sigma))/wNorm;
150 beta = (1.0-theta)*(-gamma1*gnorm);
154 pRed_ = -(alpha*(0.5*alpha-1)*gsN + 0.5*beta*beta*gBg + beta*(1-alpha)*gnorm2);
Teuchos::RCP< CauchyPoint< Real > > cpt_
void initialize(const Vector< Real > &x, const Vector< Real > &s, const Vector< Real > &g)
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 void axpy(const Real alpha, const Vector &x)
Compute where .
void run(Vector< Real > &s, Real &snorm, Real &del, int &iflag, int &iter, const Vector< Real > &x, const Vector< Real > &grad, const Real &gnorm, ProjectedObjective< Real > &pObj)
virtual void initialize(const Vector< Real > &x, const Vector< Real > &s, const Vector< Real > &g)
void reducedHessVec(Vector< Real > &Hv, const Vector< Real > &v, const Vector< Real > &p, const Vector< Real > &d, const Vector< Real > &x, Real &tol)
Apply the reduced Hessian to a vector, v. The reduced Hessian first removes elements of v correspondi...
Contains definitions of custom data types in ROL.
virtual Teuchos::RCP< Vector > clone() const =0
Clone to make a new (uninitialized) vector.
Provides interface for and implements trust-region subproblem solvers.
Contains definitions for helper functions in ROL.
Defines the linear algebra or vector space interface.
virtual Real dot(const Vector &x) const =0
Compute where .
Provides interface for the double dog leg trust-region subproblem solver.
Teuchos::RCP< Vector< Real > > s_
DoubleDogLeg(Teuchos::ParameterList &parlist)
void setPredictedReduction(const Real pRed)
void reducedInvHessVec(Vector< Real > &Hv, const Vector< Real > &v, const Vector< Real > &p, const Vector< Real > &d, const Vector< Real > &x, Real &tol)
Apply the reduced inverse Hessian to a vector, v. The reduced inverse Hessian first removes elements ...
Teuchos::RCP< Vector< Real > > v_
Provides interface for the Cauchy point trust-region subproblem solver.
virtual void set(const Vector &x)
Set where .
static const double ROL_EPSILON
Platform-dependent machine epsilon.
Teuchos::RCP< Vector< Real > > Hp_