44#ifndef ROL_BINARY_CONSTRAINT_DEF_H
45#define ROL_BINARY_CONSTRAINT_DEF_H
49template<
typename Real>
52 lo_(lo), up_(up), d_(lo_->clone()), gamma_(gamma) {}
54template<
typename Real>
58template<
typename Real>
62template<
typename Real>
73template<
typename Real>
77 jv.
axpy( -one, *lo_ );
85template<
typename Real>
90template<
typename Real>
94 ahuv.
axpy( -one, *lo_ );
98 ahuv.
applyBinary( Elementwise::Multiply<Real>(), v );
99 ahuv.
applyBinary( Elementwise::Multiply<Real>(), u );
100 ahuv.
scale( gamma_ );
103template<
typename Real>
Implements an equality constraint function that evaluates to zero on the surface of a bounded paralle...
void value(Vector< Real > &c, const Vector< Real > &x, Real &tol) override
Evaluate the constraint operator at .
BinaryConstraint(const ROL::Ptr< const Vector< Real > > &lo, const ROL::Ptr< const Vector< Real > > &up, Real gamma)
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 setPenalty(Real gamma)
void applyJacobian(Vector< Real > &jv, const Vector< Real > &v, const Vector< Real > &x, Real &tol) override
Apply 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 ,...
Provides the interface to apply upper and lower bound constraints.
Defines the linear algebra or vector space interface.
virtual void set(const Vector &x)
Set where .
virtual void applyBinary(const Elementwise::BinaryFunction< Real > &f, const Vector &x)
virtual void scale(const Real alpha)=0
Compute where .
virtual void axpy(const Real alpha, const Vector &x)
Compute where .
void applyJacobian(ROL::Vector< Real > &jv, const ROL::Vector< Real > &v, const ROL::Vector< Real > &sol)