Loading...
Searching...
No Matches
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-------------------------------------------------------------------------------
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::sinhInterpolation
29
30Description
31 Updates the porosity values in topology optimization using a sinh function
32
33InterpolationFiles
34 sinhInterpolation.C
35
36\*---------------------------------------------------------------------------*/
37
38#ifndef sinhInterpolation_H
39#define sinhInterpolation_H
40
42
43// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44
45namespace Foam
46{
47
48/*---------------------------------------------------------------------------*\
49 Class sinhInterpolation Declaration
50\*---------------------------------------------------------------------------*/
51
52class sinhInterpolation
53:
54 public topOInterpolationFunction
55{
56
57private:
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
70 sinhInterpolation(const sinhInterpolation&);
71
72 //- No copy assignment
73 void operator=(const sinhInterpolation&);
74
75
76public:
77
78 //- Runtime type information
79 TypeName("sinh");
80
82 // Constructors
83
84 //- Construct from components
85 sinhInterpolation
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// ************************************************************************* //
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("sinh")
Runtime type information.
virtual void interpolate(const scalarField &arg, scalarField &res) const
Interpolate argument and write to result.
virtual ~sinhInterpolation()=default
Destructor.
virtual tmp< scalarField > derivative(const scalarField &arg) const
Return of function with respect to the argument field.
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