Loading...
Searching...
No Matches
objectiveGeometric.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) 2023 PCOpt/NTUA
9 Copyright (C) 2023 FOSS GP
10-------------------------------------------------------------------------------
11License
12 This file is part of OpenFOAM.
13
14 OpenFOAM is free software: you can redistribute it and/or modify it
15 under the terms of the GNU General Public License as published by
16 the Free Software Foundation, either version 3 of the License, or
17 (at your option) any later version.
18
19 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 for more details.
23
24 You should have received a copy of the GNU General Public License
25 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26
27
28Class
29 Foam::objectiveGeometric
30
31Description
32 Abstract base class for objective functions that contain only geometric
33 quantities
34
35SourceFiles
36 objectiveGeometric.C
37
38\*---------------------------------------------------------------------------*/
39
40#ifndef objectiveGeometric_H
41#define objectiveGeometric_H
42
43#include "objective.H"
44
45// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46
47namespace Foam
48{
50/*---------------------------------------------------------------------------*\
51 Class objectiveGeometric Declaration
52\*---------------------------------------------------------------------------*/
53
54class objectiveGeometric
55:
56 public objective
57{
58
59private:
60
61 // Private Member Functions
62
63 //- No copy construct
64 objectiveGeometric(const objectiveGeometric&) = delete;
65
66 //- No copy assignment
67 void operator=(const objectiveGeometric&) = delete;
68
69
70public:
71
72 //- Runtime type information
73 TypeName("geometric");
75
76 // Declare run-time constructor selection table
77
79 (
80 autoPtr,
81 objectiveGeometric,
83 (
84 const fvMesh& mesh,
85 const dictionary& dict,
86 const word& adjointSolverName,
87 const word& primalSolverName
88 ),
89 (mesh, dict, adjointSolverName, primalSolverName)
90 );
91
92
93 // Constructors
94
95 //- Construct from components
96 objectiveGeometric
97 (
98 const fvMesh& mesh,
99 const dictionary& dict,
100 const word& adjointSolverName,
101 const word& primalSolverName
102 );
103
104
105 // Selectors
106
107 //- Return a reference to the selected turbulence model
109 (
110 const fvMesh& mesh,
111 const dictionary& dict,
112 const word& adjointSolverName,
113 const word& primalSolverName
114 );
115
116
117 //- Destructor
118 virtual ~objectiveGeometric() = default;
119
120
121 // Member Functions
122
123 //- Return the objective function value
124 virtual scalar J() = 0;
126 //- Update objective function derivatives
127 virtual void update();
128};
129
130
131// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
132
133} // End namespace Foam
134
135// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
136
137#endif
138
139// ************************************************************************* //
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition autoPtr.H:65
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
Mesh data needed to do the Finite Volume discretisation.
Definition fvMesh.H:85
static autoPtr< objectiveGeometric > New(const fvMesh &mesh, const dictionary &dict, const word &adjointSolverName, const word &primalSolverName)
Return a reference to the selected turbulence model.
declareRunTimeSelectionTable(autoPtr, objectiveGeometric, dictionary,(const fvMesh &mesh, const dictionary &dict, const word &adjointSolverName, const word &primalSolverName),(mesh, dict, adjointSolverName, primalSolverName))
TypeName("geometric")
Runtime type information.
virtual scalar J()=0
Return the objective function value.
virtual ~objectiveGeometric()=default
Destructor.
virtual void update()
Update objective function derivatives.
const dictionary & dict() const
Return objective dictionary.
Definition objective.C:91
A class for handling words, derived from Foam::string.
Definition word.H:66
dynamicFvMesh & mesh
Namespace for OpenFOAM.
#define declareRunTimeSelectionTable(ptrWrapper, baseType, argNames, argList, parList)
Declare a run-time selection (variables and adder classes).
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition typeInfo.H:68