shapeOptimisationIncompressible.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
28
29
30Description
31 Shape optimisation support library
32
33Class
34 Foam::incompressible::shapeOptimisation
35
36Description
37 Calculates shape sensitivities using the adjoint approach,
38 computes boundaryMesh movement and propagates it to the volume mesh
39
40SourceFiles
41 shapeOptimisation.C
42
43\*---------------------------------------------------------------------------*/
44
45#ifndef shapeOptimisationIncompressible_H
46#define shapeOptimisationIncompressible_H
47
49#include "optMeshMovement.H"
50
51// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
52
53namespace Foam
54{
55
56namespace incompressible
57{
58
59/*---------------------------------------------------------------------------*\
60 Class shapeOptimisation Declaration
61\*---------------------------------------------------------------------------*/
64:
65 public optimisationType
66{
67protected:
68
69 // Protected data
74 bool updateGeometry_;
75
76
77 // Protected Member Functions
78
79 //- Update the design variables given their correction
81
82 //- Compute eta if not set in the first step
83 virtual void computeEta(scalarField& correction);
84
85
86private:
87
88 // Private Member Functions
89
90 //- No copy construct
91 shapeOptimisation(const shapeOptimisation&) = delete;
92
93 //- No copy assignment
94 void operator=(const shapeOptimisation&) = delete;
95
96
97public:
98
99 //- Runtime type information
100 TypeName("shapeOptimisation");
101
102
103 // Constructors
104
105 //- Construct from components
107 (
108 fvMesh& mesh,
109 const dictionary& dict,
111 );
112
113
114 //- Destructor
115 virtual ~shapeOptimisation() = default;
116
117
118 // Member Functions
119
120 //- Store design variables, as the starting point for line search
121 virtual void storeDesignVariables();
122
123 //- Store design variables, as the starting point for line search
124 virtual void resetDesignVariables();
125
126 //- Write useful quantities to files
127 virtual void write();
128};
129
130
131// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
132
133} // End namespace incompressible
134} // End namespace Foam
135
136// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
137
138#endif
139
140// ************************************************************************* //
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
Definition: PtrList.H:73
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: autoPtr.H:66
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
Abstract base class for optimisation methods.
Calculates shape sensitivities using the adjoint approach, computes boundaryMesh movement and propaga...
virtual void resetDesignVariables()
Store design variables, as the starting point for line search.
virtual ~shapeOptimisation()=default
Destructor.
virtual void computeEta(scalarField &correction)
Compute eta if not set in the first step.
virtual void updateDesignVariables(scalarField &correction)
Update the design variables given their correction.
virtual void write()
Write useful quantities to files.
TypeName("shapeOptimisation")
Runtime type information.
virtual void storeDesignVariables()
Store design variables, as the starting point for line search.
dynamicFvMesh & mesh
Namespace for OpenFOAM.
tmp< fvMatrix< Type > > correction(const fvMatrix< Type > &)
dictionary dict
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73
PtrList< adjointSolverManager > & adjointSolverManagers
Definition: createFields.H:8