sinhInterpolation.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 -------------------------------------------------------------------------------
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::sinhInterpolation
29 
30 Description
31  Updates the porosity values in topology optimization using a sinh function
32 
33 InterpolationFiles
34  sinhInterpolation.C
35 
36 \*---------------------------------------------------------------------------*/
37 
38 #ifndef sinhInterpolation_H
39 #define sinhInterpolation_H
40 
42 
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 
45 namespace Foam
46 {
47 
48 /*---------------------------------------------------------------------------*\
49  Class sinhInterpolation Declaration
50 \*---------------------------------------------------------------------------*/
51 
53 :
55 {
56 
57 private:
58 
59  // Private Data
60 
61  //- Steepness parameter
62  // High b values lead to more steep interpolations - higher contrasts.
63  // May vary in time
65 
66 
67  // Private Member Functions
68 
69  //- No copy construct
71 
72  //- No copy assignment
73  void operator=(const sinhInterpolation&);
74 
75 
76 public:
77 
78  //- Runtime type information
79  TypeName("sinh");
80 
81 
82  // Constructors
83 
84  //- Construct from components
86  (
87  const fvMesh& mesh,
88  const dictionary& dict
89  );
90 
91 
92  //-Destructor
93  virtual ~sinhInterpolation() = default;
94 
95 
96  // Member Functions
97 
98  //- Interpolate argument and write to result
99  virtual void interpolate
100  (
101  const scalarField& arg,
102  scalarField& res
103  ) const;
104 
105  //- Return of function with respect to the argument field
106  virtual tmp<scalarField> derivative(const scalarField& arg) const;
107 };
108 
109 
110 } // End namespace Foam
111 
112 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
113 
114 #endif
115 
116 // ************************************************************************* //
dictionary dict
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:129
virtual tmp< scalarField > derivative(const scalarField &arg) const
Return of function with respect to the argument field.
dynamicFvMesh & mesh
virtual void interpolate(const scalarField &arg, scalarField &res) const
Interpolate argument and write to result.
Updates the porosity values in topology optimization using a sinh function.
virtual ~sinhInterpolation()=default
Destructor.
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
A class for managing temporary objects.
Definition: HashPtrTable.H:50
Namespace for OpenFOAM.
TypeName("sinh")
Runtime type information.