10 #ifndef ROL_CONICAPPROXIMATIONMODEL_H
11 #define ROL_CONICAPPROXIMATIONMODEL_H
39 const Ptr<const V>
x_,
a_;
50 const Ptr<V>& s,
const Ptr<const V>& a ) :
52 Hs_( x->dual().clone() ) {
53 Real tol = sqrt(ROL_EPSILON<Real>());
56 obj_->gradient( *
g_,*x,tol );
60 virtual void update(
const V& s,
bool flag=
true,
int iter=-1 )
override {
61 Real tol = sqrt(ROL_EPSILON<Real>());
67 virtual Real
value(
const V& s, Real& tol )
override {
71 virtual void gradient(
V &g,
const V &s, Real &tol )
override {
78 u->scale(
s_->dot(g) );
85 virtual void hessVec(
V &hv,
const V &v,
const V &s, Real &tol )
override {
90 u->axpy(
a_->dot(v), s );
91 obj_->hessVec( hv, *u, *
x_, tol );
98 virtual void invHessVec(
V& hv,
const V& v,
const V& s, Real& tol )
override {
102 u->axpy( -
a_->dot(v), s );
103 obj_->invHessVec( hv, *u, *
x_, tol );
109 virtual void precond(
V& Pv,
const V& v,
const V& s, Real &tol )
override {
113 u->axpy( -
a_->dot(v), *
s_ );
114 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.
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.
VectorWorkspace< Real > workspace_
virtual Real value(const V &s, Real &tol) override
Compute value.
virtual ~ConicApproximationModel()
Provides the interface to evaluate conic approximation function.
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 .