ROL
ROL_RiddersProjection.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_RIDDERSPROJECTION_H
11 #define ROL_RIDDERSPROJECTION_H
12 
14 #include "ROL_ParameterList.hpp"
15 
16 namespace ROL {
17 
18 template<typename Real>
20 private:
21  int dim_;
22  Ptr<Vector<Real>> xnew_, Px_;
23  Real b_, mul1_, dlam1_, cdot_;
24 
27 
28  Real atol_, rtol_, ltol_;
30 
31  Real ctol_;
32 
39 
40  void initialize(const Vector<Real> &xprim,
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 
47 public:
48 
49  RiddersProjection(const Vector<Real> &xprim,
50  const Vector<Real> &xdual,
51  const Ptr<BoundConstraint<Real>> &bnd,
52  const Ptr<Constraint<Real>> &con,
53  const Vector<Real> &mul,
54  const Vector<Real> &res);
55 
56  RiddersProjection(const Vector<Real> &xprim,
57  const Vector<Real> &xdual,
58  const Ptr<BoundConstraint<Real>> &bnd,
59  const Ptr<Constraint<Real>> &con,
60  const Vector<Real> &mul,
61  const Vector<Real> &res,
62  ParameterList &list);
63 
64  void project(Vector<Real> &x, std::ostream &stream = std::cout) override;
65 
66 private:
67 
68  Real residual(const Vector<Real> &x) const;
69 
70  void update_primal(Vector<Real> &y, const Vector<Real> &x, const Real lam) const;
71 
72  void project_df(Vector<Real> &x, Real &lam, Real &dlam, std::ostream &stream = std::cout) const;
73 
74 }; // class RiddersProjection
75 
76 } // namespace ROL
77 
79 
80 #endif
Real residual(const Vector< Real > &x) const
Defines the linear algebra or vector space interface.
Definition: ROL_Vector.hpp:46
void project_df(Vector< Real > &x, Real &lam, Real &dlam, std::ostream &stream=std::cout) const
void project(Vector< Real > &x, std::ostream &stream=std::cout) override
Ptr< Vector< Real > > xnew_
RiddersProjection(const Vector< Real > &xprim, const Vector< Real > &xdual, const Ptr< BoundConstraint< Real >> &bnd, const Ptr< Constraint< Real >> &con, const Vector< Real > &mul, const Vector< Real > &res)
Provides the interface to apply upper and lower bound constraints.
void update_primal(Vector< Real > &y, const Vector< Real > &x, const Real lam) const
void initialize(const Vector< Real > &xprim, const Vector< Real > &xdual, const Ptr< BoundConstraint< Real >> &bnd, const Ptr< Constraint< Real >> &con, const Vector< Real > &mul, const Vector< Real > &res)
Ptr< Vector< Real > > Px_
Defines the general constraint operator interface.