ROL
ROL_ReducedLinearConstraint.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_REDUCED_LINEAR_CONSTRAINT_H
11#define ROL_REDUCED_LINEAR_CONSTRAINT_H
12
13#include "ROL_Constraint.hpp"
15
30namespace ROL {
31
32template<typename Real>
33class ReducedLinearConstraint : public Constraint<Real> {
34private:
35 const Ptr<Constraint<Real>> con_;
36 const Ptr<BoundConstraint<Real>> bnd_;
37 Ptr<const Vector<Real>> x_;
38 const Ptr<Vector<Real>> prim_;
39
40public:
42 const Ptr<BoundConstraint<Real>> &bnd,
43 const Ptr<const Vector<Real>> &x);
44
45 void setX(const Ptr<const Vector<Real>> &x);
46
47 void value(Vector<Real> &c, const Vector<Real> &x, Real &tol) override;
48 void applyJacobian(Vector<Real> &jv, const Vector<Real> &v, const Vector<Real> &x, Real &tol) override;
49 void applyAdjointJacobian(Vector<Real> &jv, const Vector<Real> &v, const Vector<Real> &x, Real &tol) override;
50 void applyAdjointHessian(Vector<Real> &ahuv, const Vector<Real> &u, const Vector<Real> &v,
51 const Vector<Real> &x, Real &tol) override;
52}; // class ReducedLinearConstraint
53
54} // namespace ROL
55
57
58#endif // ROL_REDUCED_LINEAR_CONSTRAINT_H
Provides the interface to apply upper and lower bound constraints.
Defines the general constraint operator interface.
Reduce the input of a linear constraint based on the active set associated with a vector ,...
void applyAdjointJacobian(Vector< Real > &jv, const Vector< Real > &v, const Vector< Real > &x, Real &tol) override
Apply the adjoint of the the constraint Jacobian at , , to vector .
const Ptr< BoundConstraint< Real > > bnd_
void applyJacobian(Vector< Real > &jv, const Vector< Real > &v, const Vector< Real > &x, Real &tol) override
Apply the constraint Jacobian at , , to vector .
void value(Vector< Real > &c, const Vector< Real > &x, Real &tol) override
Evaluate the constraint operator at .
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 ,...
const Ptr< Constraint< Real > > con_
void setX(const Ptr< const Vector< Real > > &x)
Defines the linear algebra or vector space interface.