Loading...
Searching...
No Matches
linearInterpolation.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::linearInterpolation
29
30Description
31 Implements a linear (with respect to beta) term for topology optimisation
32
33InterpolationFiles
34 linearInterpolation.C
35
36\*---------------------------------------------------------------------------*/
37
38#ifndef linearInterpolation_H
39#define linearInterpolation_H
40
42
43// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44
45namespace Foam
46{
47
48/*---------------------------------------------------------------------------*\
49 Class linearInterpolation Declaration
50\*---------------------------------------------------------------------------*/
51
52class linearInterpolation
53:
54 public topOInterpolationFunction
55{
56
57private:
58
59 // Private Member Functions
60
61 //- No copy construct
62 linearInterpolation(const linearInterpolation&);
63
64 //- No copy assignment
65 void operator=(const linearInterpolation&);
66
67
68public:
69
70 //- Runtime type information
71 TypeName("linear");
72
73
74 // Constructors
75
76 //- Construct from components
77 linearInterpolation
78 (
79 const fvMesh& mesh,
80 const dictionary& dict
81 );
82
83
84 //- Destructor
85 virtual ~linearInterpolation() = default;
86
87
88 // Member Functions
89
90 //- Interpolate argument and write to result
91 virtual void interpolate
92 (
93 const scalarField& arg,
94 scalarField& res
95 ) const;
96
97 //- Return of function with respect to the argument field
98 virtual tmp<scalarField> derivative(const scalarField& arg) const;
99};
100
101
102// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
103
104} // End namespace Foam
105
106// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
107
108#endif
109
110// ************************************************************************* //
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
virtual void interpolate(const scalarField &arg, scalarField &res) const
Interpolate argument and write to result.
virtual ~linearInterpolation()=default
Destructor.
virtual tmp< scalarField > derivative(const scalarField &arg) const
Return of function with respect to the argument field.
TypeName("linear")
Runtime type information.
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