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-2021 PCOpt/NTUA
9 Copyright (C) 2013-2021 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\*---------------------------------------------------------------------------*/
54:
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
75
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
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 //- Reset mean fields to zero
115 void resetMeanFields();
116
117 //- Compute mean fields on the fly
118 void computeMeanFields();
119
120 //- Nullify all adjoint fields
121 virtual void nullify();
122
123 //- Update primal based quantities of the adjoint boundary
124 // conditions
125 virtual void updatePrimalBasedQuantities();
126};
127
128
129// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
130
131} // End namespace Foam
132
133// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
134
136
137// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
138
139#endif
140
141// ************************************************************************* //
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: autoPtr.H:66
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:91
Manages the adjoint mean flow fields and their mean values.
Class including all adjoint fields for incompressible flows.
void operator=(const incompressibleAdjointVars &)
No copy assignment.
const autoPtr< incompressibleAdjoint::adjointRASModel > & adjointTurbulence() const
Return const reference to the adjointRASModel.
virtual void nullify()
Nullify all adjoint fields.
incompressibleAdjointVars(const incompressibleAdjointVars &)
No copy construct.
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.
autoPtr< incompressibleAdjoint::adjointRASModel > adjointTurbulence_
Adjoint to the turbulence model.
TypeName("incompressibleAdjointVars")
Run-time type information.
Base class for solution control classes.
class for managing incompressible objective functions.
Base class for solver control classes.
Definition: solverControl.H:52
dynamicFvMesh & mesh
Namespace for OpenFOAM.
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73