10 #ifndef ROL_RISKLESS_CONSTRAINT_DEF_H
11 #define ROL_RISKLESS_CONSTRAINT_DEF_H
15 template<
typename Real>
19 template<
typename Real>
21 Ptr<const Vector<Real>> x0 =
dynamic_cast<const RiskVector<Real>&
>(x).getVector();
22 con_->update(*x0,type,iter);
25 template<
typename Real>
27 Ptr<const Vector<Real>> x0 =
dynamic_cast<const RiskVector<Real>&
>(x).getVector();
28 con_->update(*x0,flag,iter);
31 template<
typename Real>
33 Ptr<const Vector<Real>> x0 =
dynamic_cast<const RiskVector<Real>&
>(x).getVector();
34 con_->value(c,*x0,tol);
37 template<
typename Real>
39 Ptr<const Vector<Real>> x0 =
dynamic_cast<const RiskVector<Real>&
>(x).getVector();
40 Ptr<const Vector<Real>> v0 =
dynamic_cast<const RiskVector<Real>&
>(v).getVector();
41 con_->applyJacobian(jv,*v0,*x0,tol);
44 template<
typename Real>
46 Ptr<const Vector<Real>> x0 =
dynamic_cast<const RiskVector<Real>&
>(x).getVector();
48 con_->applyAdjointJacobian(*ajv0,v,*x0,tol);
51 template<
typename Real>
53 Ptr<const Vector<Real>> x0 =
dynamic_cast<const RiskVector<Real>&
>(x).getVector();
54 Ptr<const Vector<Real>> v0 =
dynamic_cast<const RiskVector<Real>&
>(v).getVector();
56 con_->applyAdjointHessian(*ahuv0,u,*v0,*x0,tol);
59 template<
typename Real>
62 con_->setParameter(param);
void applyJacobian(Vector< Real > &jv, const Vector< Real > &v, const Vector< Real > &x, Real &tol) override
Apply the constraint Jacobian at , , to vector .
RiskLessConstraint(const Ptr< Constraint< Real >> &con)
void value(Vector< Real > &c, const Vector< Real > &x, Real &tol) override
Evaluate the constraint operator at .
Defines the linear algebra or vector space interface.
void applyAdjointJacobian(Vector< Real > &ajv, const Vector< Real > &v, const Vector< Real > &x, Real &tol) override
Apply the adjoint of the the constraint Jacobian at , , to vector .
void applyAdjointHessian(Vector< Real > &ahuv, const Vector< Real > &u, const Vector< Real > &v, const Vector< Real > &x, Real &tol) override
Apply the derivative of the adjoint of the constraint Jacobian at to vector in direction ...
void update(const Vector< Real > &x, UpdateType type, int iter=-1) override
Update constraint function.
void setParameter(const std::vector< Real > ¶m) override
virtual void setParameter(const std::vector< Real > ¶m)
Defines the general constraint operator interface.