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-------------------------------------------------------------------------------
12License
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
28Class
29 Foam::ArmijoConditions
30
31Description
32 Class satisfying the Armijo line search conditions
33
34SourceFiles
35 ArmijoConditions.C
36
37\*---------------------------------------------------------------------------*/
38
39#ifndef ArmijoConditions_H
40#define ArmijoConditions_H
41
42#include "lineSearch.H"
43
44// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45
46namespace Foam
47{
48
49/*---------------------------------------------------------------------------*\
50 Class ArmijoConditions Declaration
51\*---------------------------------------------------------------------------*/
54:
55 public lineSearch
56{
57protected:
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
66private:
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
77public:
78
79 //- Runtime type information
80 TypeName("ArmijoConditions");
81
82
83 // Declare run-time constructor selection table
86 (
87 autoPtr,
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// ************************************************************************* //
Class satisfying the Armijo line search conditions.
virtual bool converged()
Return the correction of the design variables.
TypeName("ArmijoConditions")
Runtime type information.
virtual void updateStep()
virtual ~ArmijoConditions()=default
declareRunTimeSelectionTable(autoPtr, ArmijoConditions, dictionary,(const dictionary &dict, const Time &time),(dict))
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:80
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: autoPtr.H:66
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
Abstract base class for line search methods.
Definition: lineSearch.H:57
Namespace for OpenFOAM.
#define declareRunTimeSelectionTable(ptrWrapper, baseType, argNames, argList, parList)
Declare a run-time selection (variables and adder classes)
dictionary dict
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73