sensitivityMultipleIncompressible.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::sensitivityMultiple
30 
31 Description
32  Calculation of adjoint based sensitivities of multiple types
33 
34 SourceFiles
35  sensitivityMultiple.C
36 
37 \*---------------------------------------------------------------------------*/
38 
39 #ifndef sensitivityMultipleIncompressible_H
40 #define sensitivityMultipleIncompressible_H
41 
43 
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 
46 namespace Foam
47 {
48 
49 namespace incompressible
50 {
51 
52 /*---------------------------------------------------------------------------*\
53  Class sensitivityMultiple Declaration
54 \*---------------------------------------------------------------------------*/
55 
57 :
58  public adjointSensitivity
59 {
60 protected:
61 
62  // Protected data
63 
65 
67 
68 
69 private:
70 
71  // Private Member Functions
72 
73  //- No copy construct
75 
76  //- No copy assignment
77  void operator=(const sensitivityMultiple&) = delete;
78 
79 
80 public:
81 
82  //- Runtime type information
83  TypeName("multiple");
84 
85 
86  // Constructors
87 
88  //- Construct from components
90  (
91  const fvMesh& mesh,
92  const dictionary& dict,
94  );
95 
96 
97  //- Destructor
98  virtual ~sensitivityMultiple() = default;
99 
100 
101  // Member Functions
102 
103  //- Read dict if changed
104  virtual bool readDict(const dictionary& dict);
105 
106  //- Accumulate sensitivity integrands
107  virtual void accumulateIntegrand(const scalar dt);
108 
109  //- Assemble sensitivities
110  virtual void assembleSensitivities();
111 
112  //- Calculates sensitivities at wall surface points
114 
115  //- Zero sensitivity fields and their constituents
116  virtual void clearSensitivities();
117 
118  //- Write sensitivities to file
119  virtual void write(const word& baseName = word::null);
120 };
121 
122 
123 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
124 
125 } // End namespace incompressible
126 } // End namespace Foam
127 
128 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
129 
130 #endif
131 
132 // ************************************************************************* //
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:120
const scalarField & calculateSensitivities()
Calculates sensitivities at wall surface points.
TypeName("multiple")
Runtime type information.
Base class for adjoint solvers.
Definition: adjointSolver.H:51
virtual void clearSensitivities()
Zero sensitivity fields and their constituents.
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
Abstract base class for adjoint-based sensitivities in incompressible flows.
virtual ~sensitivityMultiple()=default
Destructor.
static const word null
An empty word.
Definition: word.H:84
virtual void assembleSensitivities()
Assemble sensitivities.
virtual void accumulateIntegrand(const scalar dt)
Accumulate sensitivity integrands.
virtual void write(const word &baseName=word::null)
Write sensitivities to file.
Calculation of adjoint based sensitivities of multiple types.
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers...
Definition: List.H:55
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:79
virtual bool readDict(const dictionary &dict)
Read dict if changed.
Namespace for OpenFOAM.