44 #ifndef ROL_AFFINE_TRANSFORM_OBJECTIVE_DEF_H
45 #define ROL_AFFINE_TRANSFORM_OBJECTIVE_DEF_H
49 template<
typename Real>
54 :
obj_(obj), acon_(acon), storage_(storage) {
58 if (storage == nullPtr)
storage_ = makePtr<VectorController<Real>>();
61 template<
typename Real>
65 :
obj_(obj), acon_(acon), storage_(storage) {
66 primal_ = acon->createRangeSpaceVector();
67 Av_ = acon->createRangeSpaceVector();
69 if (storage == nullPtr)
storage_ = makePtr<VectorController<Real>>();
72 template<
typename Real>
80 dual_ = b->dual().clone();
81 if (storage == nullPtr)
storage_ = makePtr<VectorController<Real>>();
84 template<
typename Real>
86 storage_->objectiveUpdate(type);
87 acon_->update(x,type,iter);
88 obj_->update(*transform(x),type,iter);
91 template<
typename Real>
93 storage_->objectiveUpdate(
true);
94 acon_->update(x,flag,iter);
95 obj_->update(*transform(x),flag,iter);
98 template<
typename Real>
100 return obj_->value(*transform(x),tol);
103 template<
typename Real>
105 obj_->gradient(*dual_,*transform(x),tol);
106 acon_->applyAdjointJacobian(g,*dual_,x,tol);
109 template<
typename Real>
111 acon_->applyJacobian(*Av_,v,x,tol);
112 obj_->hessVec(*dual_,*Av_,*transform(x),tol);
113 acon_->applyAdjointJacobian(hv,*dual_,x,tol);
116 template<
typename Real>
119 obj_->setParameter(param);
122 template<
typename Real>
126 Real tol = std::sqrt(ROL_EPSILON<Real>());
127 acon_->value(*primal_,x,tol);
135 #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.