44 #ifndef ROL_TRUSTREGIONMODEL_H
45 #define ROL_TRUSTREGIONMODEL_H
70 Ptr<BoundConstraint<Real>>
bnd_;
71 Ptr<const Vector<Real>>
x_,
g_;
96 obj_->hessVec(hv,v,*
x_,tol);
105 obj_->invHessVec(hv,v,*
x_,tol);
114 obj_->precond(Pv,v,*
x_,tol);
128 const bool useSecantPrecond =
false,
const bool useSecantHessVec =
false)
129 :
obj_(makePtrFromRef(obj)),
bnd_(makePtrFromRef(bnd)),
130 x_(makePtrFromRef(x)),
g_(makePtrFromRef(g)),
141 obj_ = makePtrFromRef(obj);
142 bnd_ = makePtrFromRef(bnd);
143 x_ = makePtrFromRef(x);
144 g_ = makePtrFromRef(g);
154 dual_->scale(static_cast<Real>(0.5));
186 virtual const Ptr<const Vector<Real>>
getIterate(
void)
const {
195 if (!
bnd_->isActivated()) {
Provides the interface to evaluate objective functions.
virtual const Vector & dual() const
Return dual representation of , for example, the result of applying a Riesz map, or change of basis...
const bool useSecantHessVec_
Ptr< Secant< Real > > secant_
virtual void plus(const Vector &x)=0
Compute , where .
Ptr< Objective< Real > > obj_
virtual void update(Objective< Real > &obj, BoundConstraint< Real > &bnd, const Vector< Real > &x, const Vector< Real > &g, const Ptr< Secant< Real >> &secant=nullPtr)
virtual ~TrustRegionModel()
Ptr< const Vector< Real > > g_
Provides the interface to evaluate trust-region model functions.
Defines the linear algebra or vector space interface.
virtual const Ptr< const Vector< Real > > getGradient(void) const
virtual void updatePredictedReduction(Real &pred, const Vector< Real > &s)
virtual void dualTransform(Vector< Real > &tv, const Vector< Real > &v)
void applyPrecond(Vector< Real > &Pv, const Vector< Real > &v, Real &tol)
void applyHessian(Vector< Real > &hv, const Vector< Real > &v, Real &tol)
TrustRegionModel(Objective< Real > &obj, BoundConstraint< Real > &bnd, const Vector< Real > &x, const Vector< Real > &g, const Ptr< Secant< Real >> &secant=nullPtr, const bool useSecantPrecond=false, const bool useSecantHessVec=false)
virtual const Ptr< Objective< Real > > getObjective(void) const
void applyInvHessian(Vector< Real > &hv, const Vector< Real > &v, Real &tol)
virtual Real value(const Vector< Real > &s, Real &tol)
Compute value.
Provides interface for and implements limited-memory secant operators.
const bool useSecantPrecond_
virtual void hessVec(Vector< Real > &hv, const Vector< Real > &v, const Vector< Real > &s, Real &tol)
Apply Hessian approximation to vector.
void initialize(const Vector< Real > &s)
virtual void invHessVec(Vector< Real > &hv, const Vector< Real > &v, const Vector< Real > &s, Real &tol)
Apply inverse Hessian approximation to vector.
virtual void gradient(Vector< Real > &g, const Vector< Real > &s, Real &tol)
Compute gradient.
Provides the interface to apply upper and lower bound constraints.
Ptr< BoundConstraint< Real > > bnd_
virtual void set(const Vector &x)
Set where .
Ptr< Vector< Real > > dual_
virtual void updateActualReduction(Real &ared, const Vector< Real > &s)
virtual void precond(Vector< Real > &Pv, const Vector< Real > &v, const Vector< Real > &s, Real &tol)
Apply preconditioner to vector.
Ptr< const Vector< Real > > x_
virtual const Ptr< BoundConstraint< Real > > getBoundConstraint(void) const
virtual void primalTransform(Vector< Real > &tv, const Vector< Real > &v)
virtual const Ptr< const Vector< Real > > getIterate(void) const