10 #ifndef ROL_KELLEYSACHSMODEL_HPP
11 #define ROL_KELLEYSACHSMODEL_HPP
35 Real
apply(
const Real &x,
const Real &y )
const {
36 const Real one(1), tol(1e2*ROL_EPSILON<Real>());
37 return ((y <= -
offset_ && x <= tol) ? -one : one);
46 Real
apply(
const Real &x,
const Real &y )
const {
47 const Real one(1), tol(1e2*ROL_EPSILON<Real>());
48 return ((y >=
offset_ && x <= tol) ? -one : one);
56 Real
apply(
const Real &x,
const Real &y )
const {
57 const Real
zero(0), one(1);
58 return ((y == one) ? x :
zero);
64 Real
apply(
const Real &x,
const Real &y )
const {
65 const Real
zero(0), one(1);
66 return ((y == -one) ? x :
zero);
117 const bool useSecantPrecond =
false,
const bool useSecantHessVec =
false)
134 dual_->scale(static_cast<Real>(0.5));
225 tv.
axpy(static_cast<Real>(-1),*xc);
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...
virtual ROL::Ptr< Vector > clone() const =0
Clone to make a new (uninitialized) vector.
Real apply(const Real &x, const Real &y) const
virtual void plus(const Vector &x)=0
Compute , where .
Real apply(const Real &x, const Real &y) const
virtual void axpy(const Real alpha, const Vector &x)
Compute where .
void precond(Vector< Real > &Mv, const Vector< Real > &v, const Vector< Real > &x, Real &tol)
Apply preconditioner to vector.
void gradient(Vector< Real > &g, const Vector< Real > &s, Real &tol)
Compute gradient.
Provides the interface to evaluate trust-region model functions.
ROL::KelleySachsModel::PruneNonbinding nonbinding_
Defines the linear algebra or vector space interface.
virtual const Ptr< const Vector< Real > > getGradient(void) const
ROL::KelleySachsModel::PruneBinding binding_
Objective_SerialSimOpt(const Ptr< Obj > &obj, const V &ui) z0_ zero()
void pruneNonbindingConstraints(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)
Real apply(const Real &x, const Real &y) const
void applyInvHessian(Vector< Real > &hv, const Vector< Real > &v, Real &tol)
UpperBinding(Real offset)
void dualTransform(Vector< Real > &tv, const Vector< Real > &v)
Provides interface for and implements limited-memory secant operators.
Real apply(const Real &x, const Real &y) const
Ptr< Vector< Real > > dual_
Provides the interface to apply upper and lower bound constraints.
void hessVec(Vector< Real > &Hv, const Vector< Real > &v, const Vector< Real > &s, Real &tol)
Apply Hessian approximation to vector.
Ptr< Vector< Real > > prim2_
void invHessVec(Vector< Real > &Hv, const Vector< Real > &v, const Vector< Real > &s, Real &tol)
Apply inverse Hessian approximation to vector.
void setEpsilon(const Real eps)
Provides the interface to evaluate projected trust-region model functions from the Kelley-Sachs bound...
LowerBinding(Real offset)
KelleySachsModel(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)
void pruneBindingConstraints(Vector< Real > &v)
virtual void set(const Vector &x)
Set where .
Real value(const Vector< Real > &s, Real &tol)
Compute value.
virtual const Ptr< BoundConstraint< Real > > getBoundConstraint(void) const
Ptr< Vector< Real > > prim_
void primalTransform(Vector< Real > &tv, const Vector< Real > &v)
virtual const Ptr< const Vector< Real > > getIterate(void) const