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 -------------------------------------------------------------------------------
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::linearInterpolation
29 
30 Description
31  Implements a linear (with respect to beta) term for topology optimisation
32 
33 InterpolationFiles
34  linearInterpolation.C
35 
36 \*---------------------------------------------------------------------------*/
37 
38 #ifndef linearInterpolation_H
39 #define linearInterpolation_H
40 
42 
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 
45 namespace Foam
46 {
47 
48 /*---------------------------------------------------------------------------*\
49  Class linearInterpolation Declaration
50 \*---------------------------------------------------------------------------*/
51 
53 :
55 {
56 
57 private:
58 
59  // Private Member Functions
60 
61  //- No copy construct
63 
64  //- No copy assignment
65  void operator=(const linearInterpolation&);
66 
67 
68 public:
69 
70  //- Runtime type information
71  TypeName("linear");
72 
73 
74  // Constructors
75 
76  //- Construct from components
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 // ************************************************************************* //
dictionary dict
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:129
TypeName("linear")
Runtime type information.
Implements a linear (with respect to beta) term for topology optimisation.
virtual void interpolate(const scalarField &arg, scalarField &res) const
Interpolate argument and write to result.
dynamicFvMesh & mesh
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
virtual ~linearInterpolation()=default
Destructor.
A class for managing temporary objects.
Definition: HashPtrTable.H:50
Namespace for OpenFOAM.