Loading...
Searching...
No Matches
incompressibleAdjointVars.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-------------------------------------------------------------------------------
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
28
29Class
30 Foam::incompressibleAdjointVars
31
32Description
33 Class including all adjoint fields for incompressible flows
34
35\*---------------------------------------------------------------------------*/
36
37#ifndef incompressibleAdjointVars_H
38#define incompressibleAdjointVars_H
39
41#include "objectiveManager.H"
42#include "adjointRASModel.H"
43
44// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45
46namespace Foam
47{
48
49/*---------------------------------------------------------------------------*\
50 Class incompressibleAdjointVars Declaration
51\*---------------------------------------------------------------------------*/
52
54:
55 public incompressibleAdjointMeanFlowVars
56{
57protected:
58
59 // Protected data
60
61 //- Reference to the objectiveManager
63
64 //- Adjoint to the turbulence model
66
67
68 // Protected Member Functions
69
70 //- No copy construct
72
73 //- No copy assignment
74 void operator=(const incompressibleAdjointVars&) = delete;
76
77public:
78
79
80 // Static Data Members
81
82 //- Run-time type information
83 TypeName("incompressibleAdjointVars");
84
85
86 // Constructors
87
88 //- Construct from mesh
90 (
91 fvMesh& mesh,
92 solverControl& SolverControl,
93 objectiveManager& objManager,
95 );
96
97
98 //- Destructor
99 virtual ~incompressibleAdjointVars() = default;
100
101
102 // Member Functions
103
104 // Access
105
106 //- Return const reference to the adjointRASModel
108 adjointTurbulence() const;
109
110 //- Return non-const reference to the adjointRASModel
113
114 //- Restore field values to the initial ones
115 void restoreInitValues();
116
117 //- Reset mean fields to zero
118 void resetMeanFields();
119
120 //- Compute mean fields on the fly
121 void computeMeanFields();
122
123 //- Nullify all adjoint fields
124 virtual void nullify();
125
126 //- Update primal based quantities of the adjoint boundary
127 // conditions
128 virtual void updatePrimalBasedQuantities();
129};
130
131
132// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
133
134} // End namespace Foam
135
136// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
137
139
140// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
141
142#endif
143
144// ************************************************************************* //
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition autoPtr.H:65
Mesh data needed to do the Finite Volume discretisation.
Definition fvMesh.H:85
const autoPtr< incompressibleAdjoint::adjointRASModel > & adjointTurbulence() const
Return const reference to the adjointRASModel.
void restoreInitValues()
Restore field values to the initial ones.
virtual void nullify()
Nullify all adjoint fields.
virtual ~incompressibleAdjointVars()=default
Destructor.
virtual void updatePrimalBasedQuantities()
Update primal based quantities of the adjoint boundary.
void computeMeanFields()
Compute mean fields on the fly.
void resetMeanFields()
Reset mean fields to zero.
objectiveManager & objectiveManager_
Reference to the objectiveManager.
incompressibleAdjointVars(const incompressibleAdjointVars &)=delete
No copy construct.
autoPtr< incompressibleAdjoint::adjointRASModel > adjointTurbulence_
Adjoint to the turbulence model.
void operator=(const incompressibleAdjointVars &)=delete
No copy assignment.
TypeName("incompressibleAdjointVars")
Run-time type information.
Base class for solution control classes.
Class for managing objective functions.
Base class for solver control classes.
dynamicFvMesh & mesh
Namespace for OpenFOAM.
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition typeInfo.H:68