Loading...
Searching...
No Matches
invBP.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::invBP
29
30Description
31 Computes the Brickmann penalization function for topology optimisation,
32 based in the inverse of the function 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 invBP.C
44
45\*---------------------------------------------------------------------------*/
46
47#ifndef invBP_H
48#define invBP_H
49
51
52// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
53
54namespace Foam
55{
57/*---------------------------------------------------------------------------*\
58 Class invBP Declaration
59\*---------------------------------------------------------------------------*/
60
61class invBP
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 invBP(const invBP&);
80
81 //- No copy assignment
82 void operator=(const invBP&);
83
84
85public:
86
87 //- Runtime type information
88 TypeName("invBP");
89
90
91 // Constructors
93 //- Construct from components
94 invBP
95 (
96 const fvMesh& mesh,
97 const dictionary& dict
98 );
99
100
101 //- Destructor
102 virtual ~invBP() = default;
103
104
105 // Member Functions
106
107 //- Interpolate argument and write to result
108 virtual void interpolate
109 (
110 const scalarField& arg,
111 scalarField& res
112 ) const;
113
114 //- Return of function with respect to the argument field
115 virtual tmp<scalarField> derivative(const scalarField& arg) const;
116};
117
118
119// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
120
121} // End namespace Foam
122
123// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
124
125#endif
126
127// ************************************************************************* //
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
TypeName("invBP")
Runtime type information.
virtual void interpolate(const scalarField &arg, scalarField &res) const
Interpolate argument and write to result.
Definition invBP.C:55
virtual tmp< scalarField > derivative(const scalarField &arg) const
Return of function with respect to the argument field.
Definition invBP.C:71
virtual ~invBP()=default
Destructor.
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