ROL
ROL_AffineTransformConstraint.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_TRANSFORM_CONSTRAINT_H
11#define ROL_AFFINE_TRANSFORM_CONSTRAINT_H
12
13#include "ROL_Constraint.hpp"
16
25namespace ROL {
26
27template <class Real>
29private:
30 const Ptr<Constraint<Real>> con_;
31 const Ptr<Constraint<Real>> acon_;
32
33 Ptr<VectorController<Real>> storage_;
34 Ptr<Vector<Real>> primal_, dual_, Av_;
35
36public:
39 const Ptr<Constraint<Real>> &acon,
40 const Vector<Real> &range,
41 const Ptr<VectorController<Real>> &storage = nullPtr);
43 const Ptr<LinearConstraint<Real>> &acon,
44 const Ptr<VectorController<Real>> &storage = nullPtr);
46 const Ptr<const LinearOperator<Real>> &A,
47 const Ptr<const Vector<Real>> &b,
48 const Ptr<VectorController<Real>> &storage = nullPtr);
49
50 void update( const Vector<Real> &x, UpdateType type, int iter = -1 ) override;
51 void update( const Vector<Real> &x, bool flag = true, int iter = -1 ) override;
52 void value( Vector<Real> &c, const Vector<Real> &x, Real &tol ) override;
53 void applyJacobian( Vector<Real> &jv, const Vector<Real> &v, const Vector<Real> &x, Real &tol ) override;
54 void applyAdjointJacobian( Vector<Real> &ajv, const Vector<Real> &v, const Vector<Real> &x, Real &tol ) override;
55 void applyAdjointHessian( Vector<Real> &ahuv, const Vector<Real> &u, const Vector<Real> &v, const Vector<Real> &x, Real &tol ) override;
56
57private:
58 Ptr<const Vector<Real>> transform(const Vector<Real> &x);
59
60}; // class AffineTransformConstraint
61
62} // namespace ROL
63
65
66#endif // ROL_AFFINE_TRANSFORM_OBJECTIVE_H
Compose a constraint operator with an affine transformation, i.e.,.
void update(const Vector< Real > &x, UpdateType type, int iter=-1) override
Update constraint function.
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 .
Ptr< const Vector< Real > > transform(const Vector< Real > &x)
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 .
Ptr< VectorController< Real > > storage_
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 general constraint operator interface.
Defines the general affine constraint with the form .
Provides the interface to apply a linear operator.
Defines the linear algebra or vector space interface.