sensitivityVolBSplinesFIIncompressible.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::sensitivityVolBSplinesFI
30 
31 Description
32  Calculation of adjoint based sensitivities at vol B-Splines control points
33  using the FI approach.
34 
35 SourceFiles
36  sensitivityVolBSplinesFI.C
37 
38 \*---------------------------------------------------------------------------*/
39 
40 #ifndef sensitivityVolBSplinesFIIncompressible_H
41 #define sensitivityVolBSplinesFIIncompressible_H
42 
43 #include "FIBaseIncompressible.H"
44 #include "volBSplinesBase.H"
45 
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 
48 namespace Foam
49 {
50 
51 namespace incompressible
52 {
53 
54 /*---------------------------------------------------------------------------*\
55  Class sensitivityVolBSplinesFI Declaration
56 \*---------------------------------------------------------------------------*/
57 
59 :
60  public FIBase
61 {
62 protected:
63 
64  // Protected data
65 
66  //- Reference to underlaying volumetric B-Splines morpher
68 
69  //- Flow related term
71 
72  //- Term depending on delta(n dS)/delta b
74 
75  //- Term depending on delta(n)/delta b
77 
78  //- Term depending on delta(x)/delta b for objectives that directly
79  //- depend on x
81 
82  //- Term depending on delta(V)/delta b
84 
85  //- Term depending on distance differentiation
87 
88  //- Term depending on fvOptions
90 
91  //- Term depending on the differentiation of boundary conditions
93 
95 
96 
97 private:
98 
99  // Private Member Functions
101  //- No copy construct
103 
104  //- No copy assignment
105  void operator=(const sensitivityVolBSplinesFI&) = delete;
106 
108 public:
109 
110  //- Runtime type information
111  TypeName("volumetricBSplinesFI");
112 
113 
114  // Constructors
115 
116  //- Construct from components
118  (
119  const fvMesh& mesh,
120  const dictionary& dict,
122  );
123 
124 
125  //- Destructor
126  virtual ~sensitivityVolBSplinesFI() = default;
127 
128 
129  // Member Functions
130 
131  //- Assemble sensitivities
132  virtual void assembleSensitivities();
133 
134  //- Zero sensitivity fields and their constituents
135  virtual void clearSensitivities();
136 
137  //- Write sensitivities to file
138  virtual void write(const word& baseName = word::null);
139 };
140 
141 
142 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
143 
144 } // End namespace incompressible
145 } // End namespace Foam
146 
147 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
148 
149 #endif
150 
151 // ************************************************************************* //
A class for handling file names.
Definition: fileName.H:71
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:120
virtual void clearSensitivities()
Zero sensitivity fields and their constituents.
Base class for adjoint solvers.
Definition: adjointSolver.H:51
vectorField distanceSens_
Term depending on distance differentiation.
vectorField bcSens_
Term depending on the differentiation of boundary conditions.
Base class for incompressibleAdjoint solvers.
const dictionary & dict() const
Return the construction dictionary.
Definition: sensitivity.C:50
dynamicFvMesh & mesh
A class for handling words, derived from Foam::string.
Definition: word.H:63
volBSplinesBase & volBSplinesBase_
Reference to underlaying volumetric B-Splines morpher.
static const word null
An empty word.
Definition: word.H:84
virtual void write(const word &baseName=word::null)
Write sensitivities to file.
vectorField dVdbSens_
Term depending on delta(V)/delta b.
vectorField dSdbSens_
Term depending on delta(n dS)/delta b.
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:79
TypeName("volumetricBSplinesFI")
Runtime type information.
vectorField dxdbDirectSens_
Term depending on delta(x)/delta b for objectives that directly depend on x.
virtual ~sensitivityVolBSplinesFI()=default
Destructor.
vectorField dndbSens_
Term depending on delta(n)/delta b.
Calculation of adjoint based sensitivities at vol B-Splines control points using the FI approach...
Base class for Field Integral-based sensitivity derivatives.
Namespace for OpenFOAM.
Class constructing a number of volumetric B-Splines boxes, read from dynamicMeshDict. Useful for various sensitivities and optMeshMovement classes.