Loading...
Searching...
No Matches
BorrvallPeterssonInterpolation.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::BorrvallPeterssonInterpolation
29
30Description
31 Computes the Brickmann penalization function for topO optimisation,
32 proposed by Borrvall and Petersson.
33
34 Reference:
35 \verbatim
36 Borrvall, T., & Petersson, J. (2002).
37 TopO optimization of fluids in Stokes flow.
38 International Journal for Numerical Methods in Fluids, 41(1), 77-107.
39 https://doi.org/10.1002/fld.426
40 \endverbatim
41
42SourceFiles
43 BorrvallPeterssonInterpolation.C
44
45\*---------------------------------------------------------------------------*/
46
47#ifndef BorrvallPeterssonInterpolation_H
48#define BorrvallPeterssonInterpolation_H
49
51
52// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
53
54namespace Foam
55{
57/*---------------------------------------------------------------------------*\
58 Class BorrvallPeterssonInterpolation Declaration
59\*---------------------------------------------------------------------------*/
60
61class BorrvallPeterssonInterpolation
62:
63 public topOInterpolationFunction
64{
65
66private:
67
68 // Private Data
69
70 //- Steepness parameter
71 // High b values lead to more steep interpolations - higher contrasts.
72 // May vary in time
74
75
76 // Private Member Functions
77
78 //- No copy construct
79 BorrvallPeterssonInterpolation
80 (
81 const BorrvallPeterssonInterpolation&
82 ) = delete;
83
84 //- No copy assignment
85 void operator=(const BorrvallPeterssonInterpolation&) = delete;
86
87
88public:
89
90 //- Runtime type information
91 TypeName("BorrvallPetersson");
92
93
94 // Constructors
96 //- Construct from components
97 BorrvallPeterssonInterpolation
98 (
99 const fvMesh& mesh,
100 const dictionary& dict
101 );
102
103
104 //- Destructor
105 virtual ~BorrvallPeterssonInterpolation() = default;
106
107
108 // Member Functions
109
110 //- Interpolate argument and write to result
111 virtual void interpolate
112 (
113 const scalarField& arg,
114 scalarField& res
115 ) const;
116
117 //- Return of function with respect to the argument field
118 virtual tmp<scalarField> derivative(const scalarField& arg) const;
119};
120
121
122// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
123
124} // End namespace Foam
125
126// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
127
128#endif
129
130// ************************************************************************* //
virtual ~BorrvallPeterssonInterpolation()=default
Destructor.
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.
TypeName("BorrvallPetersson")
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