sensitivityBezierFIIncompressible.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-2020 PCOpt/NTUA
9 Copyright (C) 2013-2020 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
28Class
29 Foam::incompressible::sensitivityBezierFI
30
31Description
32 Calculation of adjoint based sensitivities for Bezier control points
33 using the FI appoach
34
35SourceFiles
36 sensitivityBezierFI.C
37
38\*---------------------------------------------------------------------------*/
39
40#ifndef sensitivityBezierFIIncompressible_H
41#define sensitivityBezierFIIncompressible_H
42
43#include "primitiveFieldsFwd.H"
44#include "volFieldsFwd.H"
45#include "pointFieldsFwd.H"
46#include "surfaceFieldsFwd.H"
50#include "deltaBoundary.H"
51#include "Bezier.H"
52
53// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
54
55namespace Foam
56{
57
58namespace incompressible
59{
60
61/*---------------------------------------------------------------------------*\
62 Class sensitivityBezierFI Declaration
63\*---------------------------------------------------------------------------*/
66:
67 public FIBase
68{
69protected:
70
71 // Protected data
73
74 //- Flow related term
76
77 //- Term depending on delta(n dS)/delta b
79
80 //- Term depending on delta(n)/delta b
82
83 //- Term depending on delta(x)/delta b for objectives that directly
84 //- depend on x
86
87 //- Term depending on delta(V)/delta b
89
90 //- Term depending on distance differentiation
92
93 //- Term depending on fvOptions
95
96 //- Term depending on the differenation of boundary conditions
104
105 void read();
106
108 (
109 const label iCP,
110 const label idir
111 );
112
113
114private:
115
116 // Private Member Functions
117
118 //- No copy construct
120
121 //- No copy assignment
122 void operator=(const sensitivityBezierFI&) = delete;
123
124
125public:
126
127 //- Runtime type information
128 TypeName("BezierFI");
129
130
131 // Constructors
132
133 //- Construct from components
135 (
136 const fvMesh& mesh,
137 const dictionary& dict,
139 );
140
141
142 //- Destructor
143 virtual ~sensitivityBezierFI() = default;
144
145
146 // Member Functions
147
148 //- Assemble sensitivities
149 virtual void assembleSensitivities();
150
151 //- Zero sensitivity fields and their constituents
152 virtual void clearSensitivities();
153
154 //- Write sensitivities to file
155 virtual void write(const word& baseName = word::null);
156};
157
158
159// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
160
161} // End namespace incompressible
162} // End namespace Foam
163
164// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
165
166#endif
167
168// ************************************************************************* //
Calculation of adjoint based sensitivities for Bezier control points.
Definition: Bezier.H:60
Base class for adjoint solvers.
Definition: adjointSolver.H:60
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
A class for handling file names.
Definition: fileName.H:76
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:91
Base class for incompressibleAdjoint solvers.
Base class for Field Integral-based sensitivity derivatives.
Calculation of adjoint based sensitivities for Bezier control points using the FI appoach.
virtual void clearSensitivities()
Zero sensitivity fields and their constituents.
scalarField dSdbSens_
Term depending on delta(n dS)/delta b.
tmp< volVectorField > solveMeshMovementEqn(const label iCP, const label idir)
scalarField dVdbSens_
Term depending on delta(V)/delta b.
virtual void assembleSensitivities()
Assemble sensitivities.
scalarField optionsSens_
Term depending on fvOptions.
virtual ~sensitivityBezierFI()=default
Destructor.
scalarField distanceSens_
Term depending on distance differentiation.
scalarField bcSens_
Term depending on the differenation of boundary conditions.
TypeName("BezierFI")
Runtime type information.
scalarField dndbSens_
Term depending on delta(n)/delta b.
const dictionary & dict() const
Return the construction dictionary.
Definition: sensitivity.C:57
A class for managing temporary objects.
Definition: tmp.H:65
A class for handling words, derived from Foam::string.
Definition: word.H:68
dynamicFvMesh & mesh
Namespace for OpenFOAM.
runTime write()
Forwards and collection of common point field types.
Forward declarations of the specialisations of Field<T> for scalar, vector and tensor.
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73