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-------------------------------------------------------------------------------
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::sensitivityMultiple
30
31Description
32 Calculation of adjoint based sensitivities of multiple types
33
34SourceFiles
35 sensitivityMultiple.C
36
37\*---------------------------------------------------------------------------*/
38
39#ifndef sensitivityMultipleIncompressible_H
40#define sensitivityMultipleIncompressible_H
41
43
44// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45
46namespace Foam
47{
48
49namespace incompressible
50{
51
52/*---------------------------------------------------------------------------*\
53 Class sensitivityMultiple Declaration
54\*---------------------------------------------------------------------------*/
57:
59{
60protected:
61
62 // Protected data
67
68
69private:
70
71 // Private Member Functions
72
73 //- No copy construct
75
76 //- No copy assignment
77 void operator=(const sensitivityMultiple&) = delete;
78
79
80public:
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 pointers to objects of type <T>, with allocation/deallocation management of the pointers....
Definition: PtrList.H:73
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
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:91
Base class for incompressibleAdjoint solvers.
Abstract base class for adjoint-based sensitivities in incompressible flows.
Calculation of adjoint based sensitivities of multiple types.
virtual void clearSensitivities()
Zero sensitivity fields and their constituents.
TypeName("multiple")
Runtime type information.
virtual void assembleSensitivities()
Assemble sensitivities.
virtual ~sensitivityMultiple()=default
Destructor.
const scalarField & calculateSensitivities()
Calculates sensitivities at wall surface points.
virtual bool readDict(const dictionary &dict)
Read dict if changed.
virtual void accumulateIntegrand(const scalar dt)
Accumulate sensitivity integrands.
const dictionary & dict() const
Return the construction dictionary.
Definition: sensitivity.C:57
A class for handling words, derived from Foam::string.
Definition: word.H:68
dynamicFvMesh & mesh
Namespace for OpenFOAM.
runTime write()
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73