44 #ifndef ROL_AFFINE_TRANSFORM_CONSTRAINT_DEF_H
45 #define ROL_AFFINE_TRANSFORM_CONSTRAINT_DEF_H
49 template<
typename Real>
54 : con_(con), acon_(acon), storage_(storage) {
58 if (storage == nullPtr)
storage_ = makePtr<VectorController<Real>>();
61 template<
typename Real>
65 : con_(con), acon_(acon), storage_(storage) {
66 primal_ = acon->createRangeSpaceVector();
67 Av_ = acon->createRangeSpaceVector();
69 if (storage == nullPtr)
storage_ = makePtr<VectorController<Real>>();
72 template<
typename Real>
77 : con_(con), acon_(makePtr<
LinearConstraint<Real>>(A,b)), storage_(storage) {
80 dual_ = b->dual().clone();
81 if (storage == nullPtr)
storage_ = makePtr<VectorController<Real>>();
84 template<
typename Real>
86 storage_->constraintUpdate(type);
87 acon_->update(x,type,iter);
88 con_->update(*transform(x),type,iter);
91 template<
typename Real>
93 storage_->constraintUpdate(
true);
94 acon_->update(x,flag,iter);
95 con_->update(*transform(x),flag,iter);
98 template<
typename Real>
100 con_->value(c,*transform(x),tol);
103 template<
typename Real>
105 acon_->applyJacobian(*Av_,v,x,tol);
106 con_->applyJacobian(jv,*Av_,*transform(x),tol);
109 template<
typename Real>
111 con_->applyAdjointJacobian(*dual_,v,*transform(x),tol);
112 acon_->applyAdjointJacobian(ajv,*dual_,x,tol);
115 template<
typename Real>
117 acon_->applyJacobian(*Av_,v,x,tol);
118 con_->applyAdjointHessian(*dual_,u,*Av_,*transform(x),tol);
119 acon_->applyAdjointJacobian(ahuv,*dual_,x,tol);
122 template<
typename Real>
126 Real tol = std::sqrt(ROL_EPSILON<Real>());
127 acon_->value(*primal_,x,tol);
135 #endif // ROL_AFFINE_TRANSFORM_OBJECTIVE_H
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.
Defines the general constraint operator interface.