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-2019 PCOpt/NTUA
9  Copyright (C) 2013-2019 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  // Declare run-time constructor selection table
84 
86  (
87  autoPtr,
89  dictionary,
90  (
91  const dictionary& dict,
92  const Time& time
93  ),
94  (dict)
95  );
96 
97 
98  // Constructors
99 
100  //- Construct from components
101  ArmijoConditions(const dictionary& dict, const Time& time);
102 
103 
104  // Destructor
105  virtual ~ArmijoConditions() = default;
106 
107 
108  // Member Functions
109 
110  //Return the correction of the design variables
111  virtual bool converged();
112 
113  //Update step in given direction
114  virtual void updateStep();
115 };
116 
117 
118 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
119 
120 } // End namespace Foam
121 
122 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
123 
124 #endif
125 
126 // ************************************************************************* //
Foam::ArmijoConditions::TypeName
TypeName("ArmijoConditions")
Runtime type information.
Foam::Time
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:73
Foam::ArmijoConditions::updateStep
virtual void updateStep()
Definition: ArmijoConditions.C:72
Foam::ArmijoConditions::converged
virtual bool converged()
Return the correction of the design variables.
Definition: ArmijoConditions.C:62
Foam::ArmijoConditions
Class satisfying the Armijo line search conditions.
Definition: ArmijoConditions.H:52
Foam::ArmijoConditions::~ArmijoConditions
virtual ~ArmijoConditions()=default
Foam::ArmijoConditions::declareRunTimeSelectionTable
declareRunTimeSelectionTable(autoPtr, ArmijoConditions, dictionary,(const dictionary &dict, const Time &time),(dict))
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::ArmijoConditions::c1_
scalar c1_
Definition: ArmijoConditions.H:62
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
lineSearch.H
Foam::lineSearch
Abstract base class for line search methods.
Definition: lineSearch.H:56