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 -------------------------------------------------------------------------------
11 License
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 
27 Class
28  Foam::BorrvallPeterssonInterpolation
29 
30 Description
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 
42 SourceFiles
43  BorrvallPeterssonInterpolation.C
44 
45 \*---------------------------------------------------------------------------*/
46 
47 #ifndef BorrvallPeterssonInterpolation_H
48 #define BorrvallPeterssonInterpolation_H
49 
51 
52 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
53 
54 namespace Foam
55 {
56 
57 /*---------------------------------------------------------------------------*\
58  Class BorrvallPeterssonInterpolation Declaration
59 \*---------------------------------------------------------------------------*/
60 
62 :
64 {
65 
66 private:
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
80  (
82  ) = delete;
83 
84  //- No copy assignment
85  void operator=(const BorrvallPeterssonInterpolation&) = delete;
86 
87 
88 public:
89 
90  //- Runtime type information
91  TypeName("BorrvallPetersson");
92 
93 
94  // Constructors
95 
96  //- Construct from components
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 // ************************************************************************* //
dictionary dict
virtual void interpolate(const scalarField &arg, scalarField &res) const
Interpolate argument and write to result.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:129
Computes the Brickmann penalization function for topO optimisation, proposed by Borrvall and Petersso...
dynamicFvMesh & mesh
TypeName("BorrvallPetersson")
Runtime type information.
virtual tmp< scalarField > derivative(const scalarField &arg) const
Return of function with respect to the argument field.
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
Definition: HashPtrTable.H:48
virtual ~BorrvallPeterssonInterpolation()=default
Destructor.
A class for managing temporary objects.
Definition: HashPtrTable.H:50
Namespace for OpenFOAM.