10 #ifndef ROL_AFFINE_TRANSFORM_OBJECTIVE_DEF_H
11 #define ROL_AFFINE_TRANSFORM_OBJECTIVE_DEF_H
15 template<
typename Real>
20 :
obj_(obj), acon_(acon), storage_(storage) {
24 if (storage == nullPtr)
storage_ = makePtr<VectorController<Real>>();
27 template<
typename Real>
31 :
obj_(obj), acon_(acon), storage_(storage) {
32 primal_ = acon->createRangeSpaceVector();
33 Av_ = acon->createRangeSpaceVector();
35 if (storage == nullPtr)
storage_ = makePtr<VectorController<Real>>();
38 template<
typename Real>
46 dual_ = b->dual().clone();
47 if (storage == nullPtr)
storage_ = makePtr<VectorController<Real>>();
50 template<
typename Real>
52 storage_->objectiveUpdate(type);
53 acon_->update(x,type,iter);
54 obj_->update(*transform(x),type,iter);
57 template<
typename Real>
59 storage_->objectiveUpdate(
true);
60 acon_->update(x,flag,iter);
61 obj_->update(*transform(x),flag,iter);
64 template<
typename Real>
66 return obj_->value(*transform(x),tol);
69 template<
typename Real>
71 obj_->gradient(*dual_,*transform(x),tol);
72 acon_->applyAdjointJacobian(g,*dual_,x,tol);
75 template<
typename Real>
77 acon_->applyJacobian(*Av_,v,x,tol);
78 obj_->hessVec(*dual_,*Av_,*transform(x),tol);
79 acon_->applyAdjointJacobian(hv,*dual_,x,tol);
82 template<
typename Real>
85 obj_->setParameter(param);
88 template<
typename Real>
92 Real tol = std::sqrt(ROL_EPSILON<Real>());
93 acon_->value(*primal_,x,tol);
101 #endif // ROL_AFFINE_TRANSFORM_OBJECTIVE_DEF_H
Provides the interface to evaluate objective functions.
Defines the general affine constraint with the form .
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.
Defines the linear algebra or vector space interface.
Provides the interface to apply a linear operator.
virtual void setParameter(const std::vector< Real > ¶m)
Defines the general constraint operator interface.