ArmijoConditions.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2007-2023 PCOpt/NTUA
9  Copyright (C) 2013-2023 FOSS GP
10  Copyright (C) 2019 OpenCFD Ltd.
11 -------------------------------------------------------------------------------
12 License
13  This file is part of OpenFOAM.
14 
15  OpenFOAM is free software: you can redistribute it and/or modify it
16  under the terms of the GNU General Public License as published by
17  the Free Software Foundation, either version 3 of the License, or
18  (at your option) any later version.
19 
20  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
21  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
22  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
23  for more details.
24 
25  You should have received a copy of the GNU General Public License
26  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
27 
28 Class
29  Foam::ArmijoConditions
30 
31 Description
32  Class satisfying the Armijo line search conditions
33 
34 SourceFiles
35  ArmijoConditions.C
36 
37 \*---------------------------------------------------------------------------*/
38 
39 #ifndef ArmijoConditions_H
40 #define ArmijoConditions_H
41 
42 #include "lineSearch.H"
43 
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 
46 namespace Foam
47 {
48 
49 /*---------------------------------------------------------------------------*\
50  Class ArmijoConditions Declaration
51 \*---------------------------------------------------------------------------*/
52 
53 class ArmijoConditions
54 :
55  public lineSearch
56 {
57 protected:
58 
59  // Protected data
60 
61  //- Multiplier of the merit function reduction computed using
62  //- a first-order Taylor expansion
63  scalar c1_;
64 
65 
66 private:
67 
68  // Private Member Functions
69 
70  //- No copy construct
71  ArmijoConditions(const ArmijoConditions&) = delete;
72 
73  //- No copy assignment
74  void operator=(const ArmijoConditions&) = delete;
75 
76 
77 public:
78 
79  //- Runtime type information
80  TypeName("ArmijoConditions");
81 
82 
83  // Constructors
84 
85  //- Construct from components
87  (
88  const dictionary& dict,
89  const Time& time,
90  updateMethod& UpdatheMethod
91  );
92 
93 
94  // Destructor
95  virtual ~ArmijoConditions() = default;
96 
97 
98  // Member Functions
99 
100  //Return the correction of the design variables
101  virtual bool converged();
102 
103  //Update step in given direction
104  virtual void updateStep();
105 };
106 
107 
108 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
109 
110 } // End namespace Foam
111 
112 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
113 
114 #endif
115 
116 // ************************************************************************* //
dictionary dict
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:129
Abstract base class for optimisation methods.
Definition: updateMethod.H:50
virtual ~ArmijoConditions()=default
TypeName("ArmijoConditions")
Runtime type information.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:69
virtual bool converged()
Return the correction of the design variables.
Class satisfying the Armijo line search conditions.
Abstract base class for line search methods.
Definition: lineSearch.H:53
scalar c1_
Multiplier of the merit function reduction computed using a first-order Taylor expansion.
virtual void updateStep()
Update the line search step based on the specific line search strategy, e.g. bisection, quadratic fit, etc.
Namespace for OpenFOAM.