linear.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) 2011-2016 OpenFOAM Foundation
9-------------------------------------------------------------------------------
10License
11 This file is part of OpenFOAM.
12
13 OpenFOAM is free software: you can redistribute it and/or modify it
14 under the terms of the GNU General Public License as published by
15 the Free Software Foundation, either version 3 of the License, or
16 (at your option) any later version.
17
18 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25
26Class
27 Foam::linear
28
29Group
30 grpFvSurfaceInterpolationSchemes
31
32Description
33 Central-differencing interpolation scheme class
34
35SourceFiles
36 linear.C
37
38\*---------------------------------------------------------------------------*/
39
40#ifndef linear_H
41#define linear_H
42
44#include "volFields.H"
45
46// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47
48namespace Foam
49{
50
51/*---------------------------------------------------------------------------*\
52 Class linear Declaration
53\*---------------------------------------------------------------------------*/
54
55template<class Type>
56class linear
57:
59{
60 // Private Member Functions
61
62 //- No copy assignment
63 void operator=(const linear&) = delete;
64
65
66public:
67
68 //- Runtime type information
69 TypeName("linear");
70
71
72 // Constructors
73
74 //- Construct from mesh
75 linear(const fvMesh& mesh)
76 :
78 {}
79
80 //- Construct from Istream
81 linear(const fvMesh& mesh, Istream&)
82 :
84 {}
85
86 //- Construct from faceFlux and Istream
87 linear
88 (
89 const fvMesh& mesh,
90 const surfaceScalarField&,
91 Istream&
92 )
93 :
95 {}
96
97
98 // Member Functions
99
100 //- Return the interpolation weighting factors
102 (
104 ) const
105 {
106 return this->mesh().surfaceInterpolation::weights();
107 }
108};
109
110
111template<class Type>
114{
116 (
117 vf,
118 vf.mesh().surfaceInterpolation::weights()
119 );
120}
121
122
123template<class Type>
126{
128 linearInterpolate(tvf());
129 tvf.clear();
130 return tinterp;
131}
132
133
134// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
135
136} // End namespace Foam
137
138// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
139
140#endif
141
142// ************************************************************************* //
const Mesh & mesh() const
Return mesh.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Definition: Istream.H:64
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:91
Central-differencing interpolation scheme class.
Definition: linear.H:58
linear(const fvMesh &mesh, Istream &)
Construct from Istream.
Definition: linear.H:80
linear(const fvMesh &mesh)
Construct from mesh.
Definition: linear.H:74
TypeName("linear")
Runtime type information.
linear(const fvMesh &mesh, const surfaceScalarField &, Istream &)
Construct from faceFlux and Istream.
Definition: linear.H:87
tmp< surfaceScalarField > weights(const GeometricField< Type, fvPatchField, volMesh > &) const
Return the interpolation weighting factors.
Definition: linear.H:101
bool interpolate() const noexcept
Same as isPointData()
Abstract base class for surface interpolation schemes.
const fvMesh & mesh() const
Return mesh reference.
A class for managing temporary objects.
Definition: tmp.H:65
Namespace for OpenFOAM.
tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > linearInterpolate(const GeometricField< Type, fvPatchField, volMesh > &vf)
Definition: linear.H:112
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73