ROL
ROL_ScalarLinearConstraint.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_AFFINE_HYPERPLANE_EQUALITY_CONSTRAINT_H
11#define ROL_AFFINE_HYPERPLANE_EQUALITY_CONSTRAINT_H
12
13#include "ROL_Vector.hpp"
15#include "ROL_Constraint.hpp"
16
17#include <vector>
43namespace ROL {
44
45template<typename Real>
46class ScalarLinearConstraint : public Constraint<Real> {
47private:
48 const Ptr<const Vector<Real>> a_;
49 const Real b_;
50
51public:
52 ScalarLinearConstraint(const Ptr<const Vector<Real>> &a,
53 const Real b);
54
55 void value(Vector<Real> &c, const Vector<Real> &x, Real &tol) override;
56 void applyJacobian(Vector<Real> &jv, const Vector<Real> &v,
57 const Vector<Real> &x, Real &tol) override;
59 const Vector<Real> &x, Real &tol) override;
61 const Vector<Real> &v, const Vector<Real> &x,
62 Real &tol) override;
63 std::vector<Real> solveAugmentedSystem(Vector<Real> &v1, Vector<Real> &v2,
64 const Vector<Real> &b1, const Vector<Real> &b2,
65 const Vector<Real> &x, Real &tol) override;
66
67}; // class ScalarLinearConstraint
68
69} // namespace ROL
70
72
73#endif
Defines the general constraint operator interface.
This equality constraint defines an affine hyperplane.
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 ,...
std::vector< Real > solveAugmentedSystem(Vector< Real > &v1, Vector< Real > &v2, const Vector< Real > &b1, const Vector< Real > &b2, const Vector< Real > &x, Real &tol) override
Approximately solves the augmented system
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 .
const Ptr< const Vector< Real > > a_
Dual vector defining hyperplane.
Defines the linear algebra or vector space interface.