ROL
ROL_ElasticLinearConstraint.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_ELASTICLINEARCONSTRAINT_H
11#define ROL_ELASTICLINEARCONSTRAINT_H
12
13#include "ROL_Constraint.hpp"
15
23namespace ROL {
24
25template<typename Real>
26class ElasticLinearConstraint : public Constraint<Real> {
27private:
28 const Ptr<Constraint<Real>> con_;
29 const Ptr<Vector<Real>> x_, c_, tmp_;
30
31public:
32 ElasticLinearConstraint(const Ptr<const Vector<Real>> &x,
33 const Ptr<Constraint<Real>> &con,
34 const Ptr<const Vector<Real>> &c);
35
36 void update( const Vector<Real> &x, UpdateType type, int iter = -1 ) override;
37 void update( const Vector<Real> &x, bool flag = true, int iter = -1 ) override;
38 void value(Vector<Real> &c, const Vector<Real> &x, Real &tol) override;
39 void applyJacobian(Vector<Real> &jv, 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, Real &tol) override;
41 void applyAdjointJacobian(Vector<Real> &ajv, const Vector<Real> &v, const Vector<Real> &x, const Vector<Real> &dualv, Real &tol) override;
42 void applyAdjointHessian(Vector<Real> &ahuv, const Vector<Real> &u, const Vector<Real> &v, const Vector<Real> &x, Real &tol) override;
43
44 void setAnchor(const Ptr<const Vector<Real>> &x);
45
46}; // class ElasticLinearConstraint
47
48} // namespace ROL
49
51
52#endif
Defines the general constraint operator interface.
Defines the general affine constraint with the form .
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 .
const Ptr< Constraint< Real > > con_
void setAnchor(const Ptr< const Vector< Real > > &x)
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 .
void update(const Vector< Real > &x, UpdateType type, int iter=-1) override
Update constraint function.
void applyJacobian(Vector< Real > &jv, const Vector< Real > &v, const Vector< Real > &x, Real &tol) override
Apply the constraint Jacobian at , , to vector .
Defines the linear algebra or vector space interface.