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_;
78 cpt_->initialize(x,s,g);
90 Real tol = std::sqrt(ROL_EPSILON<Real>());
91 const Real one(1), zero(0), half(0.5), p2(0.2), p8(0.8), two(2);
97 Real sNnorm =
s_->norm();
98 Real tmp = -
s_->dot(s);
99 bool negCurv = (tmp > zero ? true :
false);
100 Real gsN = std::abs(tmp);
104 cpt_->run(s,snorm,iflag,iter,del,model);
121 Real gnorm = s.
norm();
122 Real gnorm2 = gnorm*gnorm;
124 Real gamma1 = gnorm/gBg;
125 Real gamma2 = gnorm/gsN;
126 Real eta = p8*gamma1*gamma2 + p2;
127 if (eta*sNnorm <= del || gBg <= zero) {
136 if (gnorm2*gamma1 >= del) {
144 s.
scale(-gamma1*gnorm);
148 Real wNorm =
v_->dot(*
v_);
149 Real sigma = del*del-std::pow(gamma1*gnorm,two);
150 Real phi = s.
dot(*
v_);
151 Real theta = (-phi + std::sqrt(phi*phi+wNorm*sigma))/wNorm;
155 beta = (one-theta)*(-gamma1*gnorm);
159 pRed_ = -(alpha*(half*alpha-one)*gsN + half*beta*beta*gBg + beta*(one-alpha)*gnorm2);
Teuchos::RCP< CauchyPoint< Real > > cpt_
void initialize(const Vector< Real > &x, const Vector< Real > &s, const Vector< Real > &g)
virtual void scale(const Real alpha)=0
Compute where .
virtual void axpy(const Real alpha, const Vector &x)
Compute where .
virtual void initialize(const Vector< Real > &x, const Vector< Real > &s, const Vector< Real > &g)
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.
Provides the interface to evaluate trust-region model functions.
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 .
virtual void dualTransform(Vector< Real > &tv, const Vector< Real > &v)
virtual const Vector & dual() const
Return dual representation of , for example, the result of applying a Riesz map, or change of basis...
Provides interface for the double dog leg trust-region subproblem solver.
Teuchos::RCP< Vector< Real > > s_
DoubleDogLeg(Teuchos::ParameterList &parlist)
virtual const Teuchos::RCP< const Vector< Real > > getGradient(void) const
void setPredictedReduction(const Real pRed)
virtual void hessVec(Vector< Real > &hv, const Vector< Real > &v, const Vector< Real > &s, Real &tol)
Apply Hessian approximation to vector.
virtual void invHessVec(Vector< Real > &hv, const Vector< Real > &v, const Vector< Real > &s, Real &tol)
Apply inverse Hessian approximation to vector.
Teuchos::RCP< Vector< Real > > v_
Provides interface for the Cauchy point trust-region subproblem solver.
virtual void set(const Vector &x)
Set where .
virtual Real norm() const =0
Returns where .
void run(Vector< Real > &s, Real &snorm, int &iflag, int &iter, const Real del, TrustRegionModel< Real > &model)
virtual void primalTransform(Vector< Real > &tv, const Vector< Real > &v)
Teuchos::RCP< Vector< Real > > Hp_