10 #ifndef ROL_TRUSTREGIONMODEL_U_H
11 #define ROL_TRUSTREGIONMODEL_U_H
31 template<
typename Real>
35 Ptr<const Vector<Real>>
x_,
g_;
85 ParameterList &slist = list.sublist(
"General").sublist(
"Secant");
106 Real htol = std::sqrt(ROL_EPSILON<Real>());
107 Ptr<Vector<Real>> v = g.
clone();
108 Ptr<Vector<Real>> hv = x.
clone();
111 catch (std::exception &e) {
121 obj_ = makePtrFromRef(obj);
122 x_ = makePtrFromRef(x);
123 g_ = makePtrFromRef(g);
129 const Real snorm,
const int iter) {
132 secant_->updateStorage(x,gnew,gold,s,snorm,iter);
140 dual_->scale(static_cast<Real>(0.5));
142 return dual_->apply(s);
172 virtual const Ptr<const Vector<Real>>
getIterate(
void)
const {
Provides the interface to evaluate objective functions.
Ptr< Objective< Real > > obj_
virtual ROL::Ptr< Vector > clone() const =0
Clone to make a new (uninitialized) vector.
virtual Real value(const Vector< Real > &s, Real &tol) override
Compute value.
virtual void plus(const Vector &x)=0
Compute , where .
virtual void invHessVec(Vector< Real > &hv, const Vector< Real > &v, const Vector< Real > &s, Real &tol) override
Apply inverse Hessian approximation to vector.
Ptr< Secant< Real > > secant_
virtual void gradient(Vector< Real > &g, const Vector< Real > &s, Real &tol) override
Compute gradient.
Ptr< const Vector< Real > > x_
Defines the linear algebra or vector space interface.
void validate(Objective< Real > &obj, const Vector< Real > &x, const Vector< Real > &g, ETrustRegionU etr)
virtual const Ptr< const Vector< Real > > getIterate(void) const
void initialize(const Vector< Real > &x, const Vector< Real > &g)
virtual void hessVec(Vector< Real > &hv, const Vector< Real > &v, const Vector< Real > &s, Real &tol) override
Apply Hessian approximation to vector.
Provides the interface to evaluate trust-region model functions.
Contains definitions of enums for trust region algorithms.
virtual const Ptr< const Vector< Real > > getGradient(void) const
virtual ~TrustRegionModel_U()
Provides interface for and implements limited-memory secant operators.
virtual void invHessVec(Vector< Real > &hv, const Vector< Real > &v, const Vector< Real > &x, Real &tol)
Apply inverse Hessian approximation to vector.
Ptr< const Vector< Real > > g_
virtual const Ptr< Objective< Real > > getObjective(void) const
void applyPrecond(Vector< Real > &Pv, const Vector< Real > &v, Real &tol)
Ptr< Vector< Real > > dual_
void update(const Vector< Real > &x, const Vector< Real > &s, const Vector< Real > &gold, const Vector< Real > &gnew, const Real snorm, const int iter)
ETrustRegionU
Enumeration of trust-region solver types.
void applyHessian(Vector< Real > &hv, const Vector< Real > &v, Real &tol)
TrustRegionModel_U(ParameterList &list, const Ptr< Secant< Real >> &secant=nullPtr, ESecantMode mode=SECANTMODE_BOTH)
void applyInvHessian(Vector< Real > &hv, const Vector< Real > &v, Real &tol)
virtual void precond(Vector< Real > &Pv, const Vector< Real > &v, const Vector< Real > &s, Real &tol) override
Apply preconditioner to vector.
virtual void setData(Objective< Real > &obj, const Vector< Real > &x, const Vector< Real > &g, Real &tol)