Loading...
Searching...
No Matches
sensitivityMultiple.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::sensitivityMultiple
30
31Description
32 Calculation of adjoint based sensitivities of multiple types
33
34SourceFiles
35 sensitivityMultiple.C
36
37\*---------------------------------------------------------------------------*/
38
39#ifndef sensitivityMultiple_H
40#define sensitivityMultiple_H
41
42#include "adjointSensitivity.H"
43
44// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45
46namespace Foam
47{
49/*---------------------------------------------------------------------------*\
50 Class sensitivityMultiple Declaration
51\*---------------------------------------------------------------------------*/
52
53class sensitivityMultiple
54:
55 public adjointSensitivity
57protected:
59 // Protected data
60
62
64
65
66private:
67
68 // Private Member Functions
69
70 //- No copy construct
71 sensitivityMultiple(const sensitivityMultiple&) = delete;
72
73 //- No copy assignment
74 void operator=(const sensitivityMultiple&) = delete;
75
76
77public:
78
79 //- Runtime type information
80 TypeName("multiple");
82
83 // Constructors
84
85 //- Construct from components
86 sensitivityMultiple
87 (
88 const fvMesh& mesh,
89 const dictionary& dict,
91 );
92
93
94 //- Destructor
95 virtual ~sensitivityMultiple() = default;
96
97
98 // Member Functions
99
100 //- Read dict if changed
101 virtual bool readDict(const dictionary& dict);
102
103 //- Accumulate sensitivity integrands
104 virtual void accumulateIntegrand(const scalar dt);
105
106 //- Assemble sensitivities
107 virtual void assembleSensitivities(autoPtr<designVariables>& designVars);
108
109 //- Calculates sensitivities at wall surface points
111 (
112 autoPtr<designVariables>& designVars
113 );
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 Foam
126
127// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
128
129#endif
130
131// ************************************************************************* //
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
Definition PtrList.H:67
Base class for adjoint solvers.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition autoPtr.H:65
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
Mesh data needed to do the Finite Volume discretisation.
Definition fvMesh.H:85
virtual void clearSensitivities()
Zero sensitivity fields and their constituents.
const scalarField & calculateSensitivities(autoPtr< designVariables > &designVars)
Calculates sensitivities at wall surface points.
TypeName("multiple")
Runtime type information.
virtual ~sensitivityMultiple()=default
Destructor.
PtrList< adjointSensitivity > sens_
virtual bool readDict(const dictionary &dict)
Read dict if changed.
virtual void accumulateIntegrand(const scalar dt)
Accumulate sensitivity integrands.
virtual void assembleSensitivities(autoPtr< designVariables > &designVars)
Assemble sensitivities.
const fvMesh & mesh() const
Return reference to mesh.
const dictionary & dict() const
Return the construction dictionary.
A class for handling words, derived from Foam::string.
Definition word.H:66
static const word null
An empty word.
Definition word.H:84
Namespace for OpenFOAM.
List< word > wordList
List of word.
Definition fileName.H:60
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
runTime write()
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition typeInfo.H:68