Loading...
Searching...
No Matches
SIMPInterpolation.H
Go to the documentation of this file.
1/*---------------------------------------------------------------------------*\
2 ========= |
3 \\ / F ield | OpenFOAM: The Open Interpolation CFD Toolbox
4 \\ / O peration |
5 \\ / A nd | www.openfoam.com
6 \\/ M anipulation |
7-------------------------------------------------------------------------------
8 Copyright (C) 2020-2023 PCOpt/NTUA
9 Copyright (C) 2020-2023 FOSS GP
10-------------------------------------------------------------------------------
11License
12 This file is part of OpenFOAM.
13
14 OpenFOAM is free software: you can redistribute it and/or modify it
15 under the terms of the GNU General Public License as published by
16 the Free Software Foundation, either version 3 of the License, or
17 (at your option) any later version.
18
19 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 for more details.
23
24 You should have received a copy of the GNU General Public License
25 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26
27Class
28 Foam::SIMPInterpolation
29
30Description
31 Computes the Brickmann penalization function for topology optimisation,
32 using the SIMP approach proposed by Bendsøe
33
34 Reference:
35 \verbatim
36 Bendsøe, M. P. (1989)
37 Optimal shape design as a material distribution problem.
38 Structural optimization, 1(4), 193–202.
39 https://doi.org/10.1007/BF01650949
40 \endverbatim
41
42InterpolationFiles
43 SIMPInterpolation.C
44
45\*---------------------------------------------------------------------------*/
46
47#ifndef SIMPInterpolation_H
48#define SIMPInterpolation_H
49
51
52// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
53
54namespace Foam
55{
56
57/*---------------------------------------------------------------------------*\
58 Class SIMPInterpolation Declaration
59\*---------------------------------------------------------------------------*/
60
61class SIMPInterpolation
62:
63 public topOInterpolationFunction
64{
65 // Private Data
66
67 //- Steepness parameter
68 // High b values lead to more steep interpolations - higher contrasts.
69 // May vary in time
71
72private:
73
74 // Private Member Functions
75
76 //- No copy construct
77 SIMPInterpolation(const SIMPInterpolation&);
78
79 //- No copy assignment
80 void operator=(const SIMPInterpolation&);
81
82
83public:
84
85 //- Runtime type information
86 TypeName("SIMP");
87
89 // Constructors
90
91 //- Construct from components
92 SIMPInterpolation
93 (
94 const fvMesh& mesh,
95 const dictionary& dict
96 );
97
98
99 //- Destructor
100 virtual ~SIMPInterpolation() = default;
101
102
103 // Member Functions
104
105 //- Interpolate argument and write to result
106 virtual void interpolate
107 (
108 const scalarField& arg,
109 scalarField& res
110 ) const;
111
112 //- Return of function with respect to the argument field
113 virtual tmp<scalarField> derivative(const scalarField& arg) const;
114};
115
116
117// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
118
119} // End namespace Foam
120
121// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
122
123#endif
124
125// ************************************************************************* //
virtual void interpolate(const scalarField &arg, scalarField &res) const
Interpolate argument and write to result.
virtual tmp< scalarField > derivative(const scalarField &arg) const
Return of function with respect to the argument field.
virtual ~SIMPInterpolation()=default
Destructor.
TypeName("SIMP")
Runtime type information.
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
A class for managing temporary objects.
Definition tmp.H:75
dynamicFvMesh & mesh
Namespace for OpenFOAM.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
dictionary dict
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition typeInfo.H:68