Loading...
Searching...
No Matches
expInterpolation.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) 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::expInterpolation
29
30Description
31 Computes the Brickmann penalization function for topology optimisation,
32 relying on exp functions and proposed in
33
34 Reference:
35 \verbatim
36 Wang, F., Lazarov, B., Sigmund, O.(2011).
37 On projection methods, convergence and robust formulations in topology
38 optimization.
39 Structural and Multidisciplinary Optimization 43(6), 767–784.
40 https://doi:10.1007/s00158-010-0602-y
41 \endverbatim
42
43SourceFiles
44 expInterpolation.C
45
46\*---------------------------------------------------------------------------*/
47
48#ifndef expInterpolation_H
49#define expInterpolation_H
50
52#include "Function1.H"
53
54// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
55
56namespace Foam
57{
59/*---------------------------------------------------------------------------*\
60 Class expInterpolation Declaration
61\*---------------------------------------------------------------------------*/
62
63class expInterpolation
64:
65 public topOInterpolationFunction
66{
67
68private:
69
70 // Private Data
71
72 //- Steepness parameter
73 // High b values lead to more steep interpolations - higher contrasts.
74 // May vary in time
76
77
78 // Private Member Functions
79
80 //- No copy construct
81 expInterpolation(const expInterpolation&);
82
83 //- No copy assignment
84 void operator=(const expInterpolation&);
85
86
87public:
88
89 //- Runtime type information
90 TypeName("exp");
91
92
93 // Constructors
95 //- Construct from components
96 expInterpolation
97 (
98 const fvMesh& mesh,
99 const dictionary& dict
100 );
101
102
103 //- Destructor
104 virtual ~expInterpolation() = default;
105
106
107 // Member Functions
108
109 //- Interpolate argument and write to result
110 virtual void interpolate
111 (
112 const scalarField& arg,
113 scalarField& res
114 ) const;
115
116 //- Return of function with respect to the argument field
117 virtual tmp<scalarField> derivative(const scalarField& arg) const;
118};
119
120
121// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
122
123} // End namespace Foam
124
125// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
126
127#endif
128
129// ************************************************************************* //
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
TypeName("exp")
Runtime type information.
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 ~expInterpolation()=default
Destructor.
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