// @HEADER // ***************************************************************************** // Rapid Optimization Library (ROL) Package // // Copyright 2014 NTESS and the ROL contributors. // SPDX-License-Identifier: BSD-3-Clause // ***************************************************************************** // @HEADER #pragma once #ifndef IDENTITY_CONSTRAINT_HPP #define IDENTITY_CONSTRAINT_HPP #include "ROL_Constraint.hpp" namespace ROL { template class IdentityConstraint : public ROL::Constraint { public: IdentityConstraint() = default; void value( Vector& c, const Vector& x, Real& tol ) override { c.set(x); } void applyJacobian( Vector& jv, const Vector& v, const Vector& x, Real& tol ) override { jv.set(v); } void applyAdjointJacobian( Vector& ajv, const Vector& v, const Vector& x, Real& tol ) override { ajv.set(v); } void applyAdjointHessian( Vector& ahuv, const Vector& u, const Vector& v, const Vector& x, Real& tol ) override { ahuv.zero(); } }; } // namespace ROL #endif //IDENTITY_CONSTRAINT_HPP