10 #ifndef ROL_AFFINE_TRANSFORM_CONSTRAINT_DEF_H
11 #define ROL_AFFINE_TRANSFORM_CONSTRAINT_DEF_H
15 template<
typename Real>
20 : con_(con), acon_(acon), storage_(storage) {
24 if (storage == nullPtr)
storage_ = makePtr<VectorController<Real>>();
27 template<
typename Real>
31 : con_(con), acon_(acon), storage_(storage) {
32 primal_ = acon->createRangeSpaceVector();
33 Av_ = acon->createRangeSpaceVector();
35 if (storage == nullPtr)
storage_ = makePtr<VectorController<Real>>();
38 template<
typename Real>
43 : con_(con), acon_(makePtr<
LinearConstraint<Real>>(A,b)), storage_(storage) {
46 dual_ = b->dual().clone();
47 if (storage == nullPtr)
storage_ = makePtr<VectorController<Real>>();
50 template<
typename Real>
52 storage_->constraintUpdate(type);
53 acon_->update(x,type,iter);
54 con_->update(*transform(x),type,iter);
57 template<
typename Real>
59 storage_->constraintUpdate(
true);
60 acon_->update(x,flag,iter);
61 con_->update(*transform(x),flag,iter);
64 template<
typename Real>
66 con_->value(c,*transform(x),tol);
69 template<
typename Real>
71 acon_->applyJacobian(*Av_,v,x,tol);
72 con_->applyJacobian(jv,*Av_,*transform(x),tol);
75 template<
typename Real>
77 con_->applyAdjointJacobian(*dual_,v,*transform(x),tol);
78 acon_->applyAdjointJacobian(ajv,*dual_,x,tol);
81 template<
typename Real>
83 acon_->applyJacobian(*Av_,v,x,tol);
84 con_->applyAdjointHessian(*dual_,u,*Av_,*transform(x),tol);
85 acon_->applyAdjointJacobian(ahuv,*dual_,x,tol);
88 template<
typename Real>
92 Real tol = std::sqrt(ROL_EPSILON<Real>());
93 acon_->value(*primal_,x,tol);
101 #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.