ROL
ROL_BoundToConstraint.hpp
Go to the documentation of this file.
1// @HEADER
2// *****************************************************************************
3// Rapid Optimization Library (ROL) Package
4//
5// Copyright 2014 NTESS and the ROL contributors.
6// SPDX-License-Identifier: BSD-3-Clause
7// *****************************************************************************
8// @HEADER
9
10#ifndef ROL_BOUND_TO_CONSTRAINT_H
11#define ROL_BOUND_TO_CONSTRAINT_H
12
15
20
21namespace ROL {
22
23template<typename Real>
24class BoundToConstraint : public Constraint<Real> {
25private:
26 Ptr<Constraint<Real>> lo_;
27 Ptr<Constraint<Real>> up_;
28 Ptr<Vector<Real>> tmp_;
29
30public:
32 BoundToConstraint(const Vector<Real> &lo, const Vector<Real> &up);
33
34 void value(Vector<Real> &c, const Vector<Real> &x, Real &tol) override;
35 void applyJacobian(Vector<Real> &jv, const Vector<Real> &v, const Vector<Real> &x, Real &tol) override;
36 void applyAdjointJacobian(Vector<Real> &ajv, const Vector<Real> &v, const Vector<Real> &x, Real &tol) override;
37 void applyAdjointHessian(Vector<Real> &ahuv, const Vector<Real> &u, const Vector<Real> &v,
38 const Vector<Real> &x, Real &tol) override;
39};
40
41}
42
44
45#endif
Provides the interface to apply upper and lower bound constraints.
BoundToConstraint(BoundConstraint< Real > &bnd)
void applyAdjointJacobian(Vector< Real > &ajv, const Vector< Real > &v, const Vector< Real > &x, Real &tol) override
void applyAdjointHessian(Vector< Real > &ahuv, const Vector< Real > &u, const Vector< Real > &v, const Vector< Real > &x, Real &tol) override
Ptr< Constraint< Real > > up_
void value(Vector< Real > &c, const Vector< Real > &x, Real &tol) override
void applyJacobian(Vector< Real > &jv, const Vector< Real > &v, const Vector< Real > &x, Real &tol) override
Ptr< Constraint< Real > > lo_
Defines the linear algebra or vector space interface.