44 #ifndef ROL_RISKLESS_CONSTRAINT_DEF_H
45 #define ROL_RISKLESS_CONSTRAINT_DEF_H
49 template<
typename Real>
53 template<
typename Real>
55 Ptr<const Vector<Real>> x0 =
dynamic_cast<const RiskVector<Real>&
>(x).getVector();
56 con_->update(*x0,type,iter);
59 template<
typename Real>
61 Ptr<const Vector<Real>> x0 =
dynamic_cast<const RiskVector<Real>&
>(x).getVector();
62 con_->update(*x0,flag,iter);
65 template<
typename Real>
67 Ptr<const Vector<Real>> x0 =
dynamic_cast<const RiskVector<Real>&
>(x).getVector();
68 con_->value(c,*x0,tol);
71 template<
typename Real>
73 Ptr<const Vector<Real>> x0 =
dynamic_cast<const RiskVector<Real>&
>(x).getVector();
74 Ptr<const Vector<Real>> v0 =
dynamic_cast<const RiskVector<Real>&
>(v).getVector();
75 con_->applyJacobian(jv,*v0,*x0,tol);
78 template<
typename Real>
80 Ptr<const Vector<Real>> x0 =
dynamic_cast<const RiskVector<Real>&
>(x).getVector();
82 con_->applyAdjointJacobian(*ajv0,v,*x0,tol);
85 template<
typename Real>
87 Ptr<const Vector<Real>> x0 =
dynamic_cast<const RiskVector<Real>&
>(x).getVector();
88 Ptr<const Vector<Real>> v0 =
dynamic_cast<const RiskVector<Real>&
>(v).getVector();
90 con_->applyAdjointHessian(*ahuv0,u,*v0,*x0,tol);
93 template<
typename Real>
96 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.