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-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 
29 Class
30  Foam::incompressibleAdjointVars
31 
32 Description
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 
46 namespace Foam
47 {
48 
49 /*---------------------------------------------------------------------------*\
50  Class incompressibleAdjointVars Declaration
51 \*---------------------------------------------------------------------------*/
52 
54 :
56 {
57 protected:
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 
77 public:
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(){};
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 
124 
125 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
126 
127 } // End namespace Foam
128 
129 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
130 
131 #endif
132 
133 // ************************************************************************* //
Foam::incompressibleAdjointMeanFlowVars
Manages the adjoint mean flow fields and their mean values.
Definition: incompressibleAdjointMeanFlowVars.H:51
Foam::objectiveManager
class for managing incompressible objective functions.
Definition: objectiveManager.H:54
Foam::incompressibleAdjointVars::computeMeanFields
void computeMeanFields()
Compute mean fields on the fly.
Definition: incompressibleAdjointVars.C:101
adjointRASModel.H
Foam::incompressibleAdjointVars::incompressibleAdjointVars
incompressibleAdjointVars(const incompressibleAdjointVars &)
No copy construct.
Foam::incompressibleAdjointVars::adjointTurbulence_
autoPtr< incompressibleAdjoint::adjointRASModel > adjointTurbulence_
Adjoint to the turbulence model.
Definition: incompressibleAdjointVars.H:64
Foam::solverControl
Base class for solver control classes.
Definition: solverControl.H:51
Foam::incompressibleAdjointVars::objectiveManager_
objectiveManager & objectiveManager_
Reference to the objectiveManager.
Definition: incompressibleAdjointVars.H:61
objectiveManager.H
Foam::incompressibleAdjointMeanFlowVars::primalVars
const incompressibleVars & primalVars() const
Definition: incompressibleAdjointMeanFlowVars.C:142
Foam::incompressibleAdjointVars
Class including all adjoint fields for incompressible flows.
Definition: incompressibleAdjointVars.H:52
Foam::incompressibleAdjointVars::TypeName
TypeName("incompressibleAdjointVars")
Run-time type information.
incompressibleAdjointMeanFlowVars.H
Foam::incompressibleAdjointVars::resetMeanFields
void resetMeanFields()
Reset mean fields to zero.
Definition: incompressibleAdjointVars.C:83
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:6
Foam::fvMesh
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:85
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::incompressibleAdjointVars::~incompressibleAdjointVars
virtual ~incompressibleAdjointVars()
Destructor.
Definition: incompressibleAdjointVars.H:98
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
Foam::incompressibleAdjointVars::nullify
virtual void nullify()
Nullify all adjoint fields.
Definition: incompressibleAdjointVars.C:119
Foam::incompressibleAdjointVars::adjointTurbulence
const autoPtr< incompressibleAdjoint::adjointRASModel > & adjointTurbulence() const
Return const reference to the adjointRASModel.
Definition: incompressibleAdjointVars.C:70
Foam::incompressibleAdjointVars::operator=
void operator=(const incompressibleAdjointVars &)
No copy assignment.
Foam::incompressibleVars
Base class for solution control classes.
Definition: incompressibleVars.H:54