44 #ifndef ROL_CONICAPPROXIMATIONMODEL_H
45 #define ROL_CONICAPPROXIMATIONMODEL_H
84 const Ptr<V>& s,
const Ptr<const V>& a ) :
86 Hs_( x->dual().clone() ) {
87 Real tol = sqrt(ROL_EPSILON<Real>());
90 obj_->gradient( *
g_,*x,tol );
94 virtual void update(
const V& s,
bool flag=
true,
int iter=-1 )
override {
95 Real tol = sqrt(ROL_EPSILON<Real>());
101 virtual Real
value(
const V& s, Real& tol )
override {
105 virtual void gradient(
V &g,
const V &s, Real &tol )
override {
112 u->scale(
s_->dot(g) );
119 virtual void hessVec(
V &hv,
const V &v,
const V &s, Real &tol )
override {
124 u->axpy(
a_->dot(v), s );
125 obj_->hessVec( hv, *u, *
x_, tol );
132 virtual void invHessVec(
V& hv,
const V& v,
const V& s, Real& tol )
override {
136 u->axpy( -
a_->dot(v), s );
137 obj_->invHessVec( hv, *u, *
x_, tol );
143 virtual void precond(
V& Pv,
const V& v,
const V& s, Real &tol )
override {
147 u->axpy( -
a_->dot(v), *
s_ );
148 obj_->precond( Pv, *u, *
x_, tol );
Provides the interface to evaluate objective functions.
virtual void precond(V &Pv, const V &v, const V &s, Real &tol) override
Apply preconditioner to vector.
VectorWorkspace< Real > workspace_
virtual void scale(const Real alpha)=0
Compute where .
virtual void plus(const Vector &x)=0
Compute , where .
virtual void axpy(const Real alpha, const Vector &x)
Compute where .
virtual void hessVec(V &hv, const V &v, const V &s, Real &tol) override
Apply Hessian approximation to vector.
ConicApproximationModel(const Ptr< Obj > &obj, const Ptr< const V > &x, const Ptr< V > &s, const Ptr< const V > &a)
Defines the linear algebra or vector space interface.
virtual Real value(const V &s, Real &tol) override
Compute value.
virtual ~ConicApproximationModel()
virtual void update(const V &s, bool flag=true, int iter=-1) override
Update objective function.
virtual void invHessVec(V &hv, const V &v, const V &s, Real &tol) override
Apply inverse Hessian approximation to vector.
virtual void gradient(V &g, const V &s, Real &tol) override
Compute gradient.
virtual void set(const Vector &x)
Set where .