boundaryAdjointContributionIncompressible.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
28
29Class
30 Foam::boundaryAdjointContributionIncompressible
31
32Description
33 Contributions of objective function differentiation to adjoint
34 boundary conditions for incompressible flows
35
36
37SourceFiles
38 boundaryAdjointContributionIncompressible.C
39
40\*---------------------------------------------------------------------------*/
41
42#ifndef boundaryAdjointContributionIncompressible_H
43#define boundaryAdjointContributionIncompressible_H
44
46#include "IOdictionary.H"
47#include "autoPtr.H"
49#include "objectiveManager.H"
52
53// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
54
55namespace Foam
56{
57
58/*---------------------------------------------------------------------------*\
59 Class boundaryAdjointContributionIncompressible Declaration
60\*---------------------------------------------------------------------------*/
63:
65{
66private:
67
68 // Private Member Functions
69
70 //- No copy construct
72 (
74 ) = delete;
75
76 //- No copy assignment
77 void operator=
78 (
80 ) = delete;
81
82
83protected:
84
85 // Protected data
90
91 //- Note: getting a reference to the adjoint vars in the constructor of
92 //- boundaryAdjointContributionIncompressible is dangerous since the
93 //- autoPtr that holds them has not been completed yet. Instead, get
94 //- a reference to the solver and grab the adjoint vars from there,
95 //- when necessary
97
98
99 // Protected Member Functions
100
101 template<class returnType, class sourceType, class castType>
103 (
104 PtrList<sourceType>& sourceList,
105 const fvPatchField<returnType>&(castType::*boundaryFunction)
106 (const label)
107 );
108
109
110public:
111
112 //- Runtime type information
113 TypeName("incompressible");
114
115
116 // Constructors
117
118 //- Construct from components
120 (
121 const word& managerName,
122 const word& adjointSolverName,
123 const word& simulationType,
124 const fvPatch& patch
125 );
126
127
128 //- Destructor
130
131
132 // Member Functions
133
134// tmp<vectorField> boundarydJtotdv();
144
149
154
155 const fvPatchVectorField& Ub() const;
156 const fvPatchScalarField& pb() const;
157 const fvsPatchScalarField& phib() const;
159 const fvPatchVectorField& Uab() const;
160 const fvPatchScalarField& pab() const;
161 const fvsPatchScalarField& phiab() const;
162
163 const word primalSolverName() const;
164 const word adjointSolverName() const;
165
166 const incompressibleVars& primalVars() const;
169};
170
171
172// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
173
174} // End namespace Foam
175
176// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
177
178#ifdef NoRepository
180#endif
181
182// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
183
184#endif
185
186// ************************************************************************* //
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
Definition: PtrList.H:73
Contributions of objective function differentiation to adjoint boundary conditions for incompressible...
tmp< Field< returnType > > sumContributions(PtrList< sourceType > &sourceList, const fvPatchField< returnType > &(castType::*boundaryFunction)(const label))
TypeName("incompressible")
Runtime type information.
virtual ~boundaryAdjointContributionIncompressible()=default
Destructor.
Abstract base class for computing contributions of the objective functions to the adjoint boundary co...
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
Definition: fvPatchField.H:82
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:71
Base class for incompressibleAdjoint solvers.
Class including all adjoint fields for incompressible flows.
Base class for solution control classes.
class for managing incompressible objective functions.
A class for managing temporary objects.
Definition: tmp.H:65
A class for handling words, derived from Foam::string.
Definition: word.H:68
Namespace for OpenFOAM.
Macros to ease declaration of run-time selection tables.
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73