sensitivityBezierIncompressible.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 -------------------------------------------------------------------------------
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 Class
29  Foam::incompressible::sensitivityBezier
30 
31 Description
32  Calculation of adjoint based sensitivities for Bezier control points
33 
34 SourceFiles
35  sensitivityBezier.C
36 
37 \*---------------------------------------------------------------------------*/
38 
39 #ifndef Foam_sensitivityBezierIncompressible_H
40 #define Foam_sensitivityBezierIncompressible_H
41 
42 #include "primitiveFieldsFwd.H"
43 #include "volFieldsFwd.H"
44 #include "pointFieldsFwd.H"
45 #include "surfaceFieldsFwd.H"
46 #include "volPointInterpolation.H"
47 #include "SIBaseIncompressible.H"
49 #include "deltaBoundary.H"
50 #include "Bezier.H"
51 
52 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
53 
54 namespace Foam
55 {
56 
57 namespace incompressible
58 {
59 
60 /*---------------------------------------------------------------------------*\
61  Class sensitivityBezier Declaration
62 \*---------------------------------------------------------------------------*/
63 
65 :
66  public SIBase
67 {
68 protected:
69 
70  // Protected data
71 
73 
80 
82 
83 
84 private:
85 
86  // Private Member Functions
87 
88  //- No copy construct
89  sensitivityBezier(const sensitivityBezier&) = delete;
90 
91  //- No copy assignment
92  void operator=(const sensitivityBezier&) = delete;
93 
94 
95 public:
96 
97  //- Runtime type information
98  TypeName("Bezier");
99 
100 
101  // Constructors
102 
103  //- Construct from components
105  (
106  const fvMesh& mesh,
107  const dictionary& dict,
109  );
110 
111 
112  //- Destructor
113  virtual ~sensitivityBezier() = default;
114 
115 
116  // Member Functions
117 
118  //- Assemble sensitivities
119  virtual void assembleSensitivities();
120 
121  //- Zero sensitivity fields and their constituents
122  virtual void clearSensitivities();
123 
124  //- Write sensitivities to file
125  virtual void write(const word& baseName = word::null);
126 };
127 
128 
129 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
130 
131 } // End namespace incompressible
132 } // End namespace Foam
133 
134 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
135 
136 #endif
A class for handling file names.
Definition: fileName.H:71
Forwards and collection of common volume field types.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:120
virtual void write(const word &baseName=word::null)
Write sensitivities to file.
Base class for adjoint solvers.
Definition: adjointSolver.H:51
Forwards and collection of common point field types.
Base class for incompressibleAdjoint solvers.
const dictionary & dict() const
Return the construction dictionary.
Definition: sensitivity.C:50
virtual void assembleSensitivities()
Assemble sensitivities.
Forward declarations of the specialisations of Field<T> for scalar, vector and tensor.
dynamicFvMesh & mesh
Base class for Surface Integral-based sensitivity derivatives.
TypeName("Bezier")
Runtime type information.
A class for handling words, derived from Foam::string.
Definition: word.H:63
Calculation of adjoint based sensitivities for Bezier control points.
static const word null
An empty word.
Definition: word.H:84
Calculation of adjoint based sensitivities for Bezier control points.
Definition: Bezier.H:54
virtual void clearSensitivities()
Zero sensitivity fields and their constituents.
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:79
virtual ~sensitivityBezier()=default
Destructor.
Namespace for OpenFOAM.