44#ifndef ROL_AFFINE_TRANSFORM_OBJECTIVE_DEF_H
45#define ROL_AFFINE_TRANSFORM_OBJECTIVE_DEF_H
49template<
typename Real>
54 :
obj_(obj), acon_(acon), storage_(storage) {
58 if (storage == nullPtr)
storage_ = makePtr<VectorController<Real>>();
61template<
typename Real>
65 :
obj_(obj), acon_(acon), storage_(storage) {
67 Av_ =
acon_->createRangeSpaceVector();
69 if (storage == nullPtr)
storage_ = makePtr<VectorController<Real>>();
72template<
typename Real>
80 dual_ = b->dual().clone();
81 if (storage == nullPtr)
storage_ = makePtr<VectorController<Real>>();
84template<
typename Real>
86 storage_->objectiveUpdate(type);
87 acon_->update(x,type,iter);
88 obj_->update(*transform(x),type,iter);
91template<
typename Real>
93 storage_->objectiveUpdate(
true);
94 acon_->update(x,flag,iter);
95 obj_->update(*transform(x),flag,iter);
98template<
typename Real>
100 return obj_->value(*transform(x),tol);
103template<
typename Real>
105 obj_->gradient(*dual_,*transform(x),tol);
106 acon_->applyAdjointJacobian(g,*dual_,x,tol);
109template<
typename Real>
111 acon_->applyJacobian(*Av_,v,x,tol);
112 obj_->hessVec(*dual_,*Av_,*transform(x),tol);
113 acon_->applyAdjointJacobian(hv,*dual_,x,tol);
116template<
typename Real>
119 obj_->setParameter(param);
122template<
typename Real>
126 Real tol = std::sqrt(ROL_EPSILON<Real>());
127 acon_->value(*primal_,x,tol);
Defines the general constraint operator interface.
Defines the general affine constraint with the form .
Provides the interface to apply a linear operator.
Provides the interface to evaluate objective functions.
virtual void setParameter(const std::vector< Real > ¶m)
Defines the linear algebra or vector space interface.
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.