ROL
Loading...
Searching...
No Matches
ROL_SeparableConstraint.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_SEPARABLE_CONSTRAINT_H
11#define ROL_SEPARABLE_CONSTRAINT_H
12
14#include "ROL_Constraint.hpp"
15#include "ROL_Ptr.hpp"
16#include <vector>
17
18namespace ROL {
19
26template<typename Real>
27class SeparableConstraint : public Constraint<Real> {
28private:
29 const std::vector<Ptr<Constraint<Real>>> con_;
30 const unsigned size_;
31
32public:
33 SeparableConstraint(const std::vector<Ptr<Constraint<Real>>> &cvec);
34 Ptr<Constraint<Real>> get(unsigned ind = 0) const;
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;
39 const Vector<Real> &v,
40 const Vector<Real> &x,
41 Real &tol ) override;
44 const Vector<Real> &v,
45 const Vector<Real> &x,
46 Real &tol ) override;
48 const Vector<Real> &u,
49 const Vector<Real> &v,
50 const Vector<Real> &x,
51 Real &tol ) override;
52 virtual void applyPreconditioner(Vector<Real> &pv,
53 const Vector<Real> &v,
54 const Vector<Real> &x,
55 const Vector<Real> &g,
56 Real &tol) override;
57 void setParameter(const std::vector<Real> &param) override;
58
59}; // class SeparableConstraint
60
61} // namespace ROL
62
64
65#endif
Defines the general constraint operator interface.
Array of constraints with entries that depend on indepdent subvectors.
Ptr< Constraint< Real > > get(unsigned ind=0) const
virtual void applyPreconditioner(Vector< Real > &pv, const Vector< Real > &v, const Vector< Real > &x, const Vector< Real > &g, Real &tol) override
Apply a constraint preconditioner at , , to vector . Ideally, this preconditioner satisfies the follo...
void setParameter(const std::vector< Real > &param) override
const std::vector< Ptr< Constraint< Real > > > con_
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 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 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 .
Defines the linear algebra or vector space interface.