Loading...
Searching...
No Matches
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-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::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{
58/*---------------------------------------------------------------------------*\
59 Class boundaryAdjointContributionIncompressible Declaration
60\*---------------------------------------------------------------------------*/
61
62class boundaryAdjointContributionIncompressible
63:
64 public boundaryAdjointContribution
65{
66private:
67
68 // Private Member Functions
69
70 //- No copy construct
71 boundaryAdjointContributionIncompressible
72 (
73 const boundaryAdjointContributionIncompressible&
74 ) = delete;
75
76 //- No copy assignment
77 void operator=
78 (
79 const boundaryAdjointContributionIncompressible&
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
98
99public:
100
101 //- Runtime type information
102 TypeName("incompressible");
103
104
105 // Constructors
106
107 //- Construct from components
108 boundaryAdjointContributionIncompressible
109 (
110 const word& managerName,
111 const word& adjointSolverName,
112 const word& simulationType,
113 const fvPatch& patch
114 );
115
116
117 //- Destructor
119
120
121 // Member Functions
122
123// tmp<vectorField> boundarydJtotdv();
133
138
143
144 const fvPatchVectorField& Ub() const;
145 const fvPatchScalarField& pb() const;
146 const fvsPatchScalarField& phib() const;
148 const fvPatchVectorField& Uab() const;
149 const fvPatchScalarField& pab() const;
150 const fvsPatchScalarField& phiab() const;
151
152 const word primalSolverName() const;
153 const word adjointSolverName() const;
154
155 const incompressibleVars& primalVars() const;
158};
159
160
161// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
162
163} // End namespace Foam
164
165// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
166
167#endif
168
169// ************************************************************************* //
TypeName("incompressible")
Runtime type information.
const incompressibleAdjointSolver & adjointSolver_
Note: getting a reference to the adjoint vars in the constructor of boundaryAdjointContributionIncomp...
virtual ~boundaryAdjointContributionIncompressible()=default
Destructor.
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 objective functions.
A class for managing temporary objects.
Definition tmp.H:75
A class for handling words, derived from Foam::string.
Definition word.H:66
Namespace for OpenFOAM.
fvPatchField< vector > fvPatchVectorField
fvsPatchField< scalar > fvsPatchScalarField
fvPatchField< scalar > fvPatchScalarField
Macros to ease declaration of run-time selection tables.
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition typeInfo.H:68