ROL
ROL_TypeG_MoreauYosidaAlgorithm.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_TYPEG_MOREAUYOSIDAALGORITHM_H
11 #define ROL_TYPEG_MOREAUYOSIDAALGORITHM_H
12 
13 #include "ROL_TypeG_Algorithm.hpp"
15 #include "ROL_Secant.hpp"
16 
21 namespace ROL {
22 namespace TypeG {
23 
24 template<typename Real>
26 private:
27  const Ptr<Secant<Real>> secant_;
28 
30  Real gnorm_;
32  Real tau_;
33  bool print_;
36 
37  ROL::ParameterList list_;
39 
40  std::string stepname_;
41 
44 
46 
50 
51  void initialize(Vector<Real> &x,
52  const Vector<Real> &g,
53  const Vector<Real> &l,
54  const Vector<Real> &c,
57  Constraint<Real> &con,
58  Vector<Real> &pwa,
59  Vector<Real> &dwa,
60  std::ostream &outStream = std::cout);
61 
62  void updateState(const Vector<Real> &x,
63  const Vector<Real> &l,
66  Constraint<Real> &con,
67  Vector<Real> &pwa,
68  Vector<Real> &dwa,
69  std::ostream &outStream = std::cout);
70 public:
71 
72  MoreauYosidaAlgorithm(ParameterList &list, const Ptr<Secant<Real>> &secant = nullPtr);
73 
75  void run( Vector<Real> &x,
76  const Vector<Real> &g,
77  Objective<Real> &obj,
79  Constraint<Real> &econ,
80  Vector<Real> &emul,
81  const Vector<Real> &eres,
82  std::ostream &outStream = std::cout) override;
83 
84  void writeHeader( std::ostream& os ) const override;
85 
86  void writeName( std::ostream& os ) const override;
87 
88  void writeOutput( std::ostream& os, const bool print_header = false ) const override;
89 
90 }; // class ROL::TypeG::MoreauYosidaAlgorithm
91 
92 } // namespace TypeG
93 } // namespace ROL
94 
96 
97 #endif
void updateState(const Vector< Real > &x, const Vector< Real > &l, MoreauYosidaObjective< Real > &myobj, BoundConstraint< Real > &bnd, Constraint< Real > &con, Vector< Real > &pwa, Vector< Real > &dwa, std::ostream &outStream=std::cout)
Provides the interface to evaluate objective functions.
void writeHeader(std::ostream &os) const override
Print iterate header.
void writeName(std::ostream &os) const override
Print step name.
Defines the linear algebra or vector space interface.
Definition: ROL_Vector.hpp:46
Provides an interface to run general constrained optimization algorithms.
void initialize(Vector< Real > &x, const Vector< Real > &g, const Vector< Real > &l, const Vector< Real > &c, MoreauYosidaObjective< Real > &myobj, BoundConstraint< Real > &bnd, Constraint< Real > &con, Vector< Real > &pwa, Vector< Real > &dwa, std::ostream &outStream=std::cout)
Provides the interface to evaluate the Moreau-Yosida penalty function.
Provides interface for and implements limited-memory secant operators.
Definition: ROL_Secant.hpp:45
void writeOutput(std::ostream &os, const bool print_header=false) const override
Print iterate status.
void run(Vector< Real > &x, const Vector< Real > &g, Objective< Real > &obj, BoundConstraint< Real > &bnd, Constraint< Real > &econ, Vector< Real > &emul, const Vector< Real > &eres, std::ostream &outStream=std::cout) override
Run algorithm on general constrained problems (Type-G). This is the primary Type-G interface...
Provides the interface to apply upper and lower bound constraints.
MoreauYosidaAlgorithm(ParameterList &list, const Ptr< Secant< Real >> &secant=nullPtr)
Provides an interface to run the Moreau-Yosida algorithm.
Defines the general constraint operator interface.