44 #ifndef ROL_TRUSTREGIONFACTORY_H
48 #ifndef ROL_CAUCHYPOINT_H
49 #define ROL_CAUCHYPOINT_H
58 #include "ROL_ParameterList.hpp"
63 class CauchyPoint :
public TrustRegion<Real> {
66 ROL::Ptr<Vector<Real> > g_;
67 ROL::Ptr<Vector<Real> > p_;
68 ROL::Ptr<Vector<Real> > Hp_;
79 CauchyPoint( ROL::ParameterList &parlist )
80 : TrustRegion<Real>(parlist), pRed_(0), alpha_(-1), useCGTCP_(false) {
83 Real TRsafe = parlist.sublist(
"Step").sublist(
"Trust Region").get(
"Safeguard Size",oe2);
84 eps_ = TRsafe*ROL_EPSILON<Real>();
87 void initialize(
const Vector<Real> &x,
const Vector<Real> &s,
const Vector<Real> &g) {
97 void run( Vector<Real> &s,
102 TrustRegionModel<Real> &model) {
114 cauchypoint_unc( s, snorm, iflag, iter, del, model );
119 void cauchypoint_unc( Vector<Real> &s,
124 TrustRegionModel<Real> &model) {
125 Real tol = std::sqrt(ROL_EPSILON<Real>());
127 model.dualTransform(*Hp_,*model.getGradient());
130 model.hessVec(*Hp_,s,s,tol);
131 Real gBg = Hp_->dot(s.dual());
132 Real gnorm = s.dual().norm();
133 Real gg = gnorm*gnorm;
134 Real alpha = del/gnorm;
135 if ( gBg > ROL_EPSILON<Real>() ) {
136 alpha = std::min(gg/gBg, del/gnorm);
140 model.primalTransform(*p_,s);
145 pRed_ = alpha*(gg -
static_cast<Real
>(0.5)*alpha*gBg);
virtual void initialize(const Vector< Real > &x, const Vector< Real > &s, const Vector< Real > &g)
Contains definitions of custom data types in ROL.
void setPredictedReduction(const Real pRed)