ROL
ROL_DykstraProjection.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_DYKSTRAPROJECTION_H
11#define ROL_DYKSTRAPROJECTION_H
12
14#include "ROL_ParameterList.hpp"
15
16namespace ROL {
17
18template<typename Real>
20private:
21 int dim_;
22 Ptr<Vector<Real>> tmp_, p_, q_, y_, z_;
23 Real b_, cdot_;
24
27
28 Real atol_, rtol_;
30
37
38public:
39
41 const Vector<Real> &xdual,
42 const Ptr<BoundConstraint<Real>> &bnd,
43 const Ptr<Constraint<Real>> &con,
44 const Vector<Real> &mul,
45 const Vector<Real> &res);
46
48 const Vector<Real> &xdual,
49 const Ptr<BoundConstraint<Real>> &bnd,
50 const Ptr<Constraint<Real>> &con,
51 const Vector<Real> &mul,
52 const Vector<Real> &res,
53 ParameterList &list);
54
55 void project(Vector<Real> &x, std::ostream &stream = std::cout) override;
56
57private:
58
59 Real residual_1d(const Vector<Real> &x) const;
60
61 void residual_nd(Vector<Real> &r, const Vector<Real> &y) const;
62
63 void project_bnd(Vector<Real> &x, const Vector<Real> &y) const;
64
65 void project_con(Vector<Real> &x, const Vector<Real> &y) const;
66
67 void project_Dykstra(Vector<Real> &x, std::ostream &stream = std::cout) const;
68
69}; // class DykstraProjection
70
71} // namespace ROL
72
74
75#endif
Provides the interface to apply upper and lower bound constraints.
Defines the general constraint operator interface.
Real residual_1d(const Vector< Real > &x) const
void residual_nd(Vector< Real > &r, const Vector< Real > &y) const
void project(Vector< Real > &x, std::ostream &stream=std::cout) override
void project_Dykstra(Vector< Real > &x, std::ostream &stream=std::cout) const
void project_con(Vector< Real > &x, const Vector< Real > &y) const
void project_bnd(Vector< Real > &x, const Vector< Real > &y) const
const Ptr< Constraint< Real > > con_
const Ptr< BoundConstraint< Real > > bnd_
Defines the linear algebra or vector space interface.