ROL
ROL_LinearConstraint.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_LINEARCONSTRAINT_H
11 #define ROL_LINEARCONSTRAINT_H
12 
13 #include "ROL_Constraint.hpp"
14 #include "ROL_LinearOperator.hpp"
15 
23 namespace ROL {
24 
25 template<typename Real>
26 class LinearConstraint : public Constraint<Real> {
27 private:
28  const Ptr<const LinearOperator<Real>> A_;
29  const Ptr<const Vector<Real>> b_;
30 
31 public:
32  LinearConstraint(const Ptr<const LinearOperator<Real>> &A,
33  const Ptr<const Vector<Real>> &b);
34 
35  void update( const Vector<Real> &x, UpdateType type, int iter = -1 ) override;
36  void update( const Vector<Real> &x, bool flag = true, int iter = -1 ) override;
37  void value(Vector<Real> &c, const Vector<Real> &x, Real &tol) override;
38  void applyJacobian(Vector<Real> &jv, const Vector<Real> &v, const Vector<Real> &x, Real &tol) override;
39  void applyAdjointJacobian(Vector<Real> &ajv, const Vector<Real> &v, const Vector<Real> &x, Real &tol) override;
40  void applyAdjointJacobian(Vector<Real> &ajv, const Vector<Real> &v, const Vector<Real> &x, const Vector<Real> &dualv, Real &tol) override;
41  void applyAdjointHessian(Vector<Real> &ahuv, const Vector<Real> &u, const Vector<Real> &v, const Vector<Real> &x, Real &tol) override;
42 
43  Ptr<Vector<Real>> createRangeSpaceVector(void) const;
44 
45 }; // class LinearConstraint
46 
47 } // namespace ROL
48 
50 
51 #endif
Defines the general affine constraint with the form .
LinearConstraint(const Ptr< const LinearOperator< Real >> &A, const Ptr< const Vector< Real >> &b)
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 ...
void value(Vector< Real > &c, const Vector< Real > &x, Real &tol) override
Evaluate the constraint operator at .
const Ptr< const Vector< Real > > b_
Defines the linear algebra or vector space interface.
Definition: ROL_Vector.hpp:46
void update(const Vector< Real > &x, UpdateType type, int iter=-1) override
Update constraint function.
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 .
Provides the interface to apply a linear operator.
void applyJacobian(Vector< Real > &jv, const Vector< Real > &v, const Vector< Real > &x, Real &tol) override
Apply the constraint Jacobian at , , to vector .
const Ptr< const LinearOperator< Real > > A_
Ptr< Vector< Real > > createRangeSpaceVector(void) const
Defines the general constraint operator interface.