linearEdgeInterpolation.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) 2016-2017 Wikki Ltd
9 -------------------------------------------------------------------------------
10 License
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 
26 Class
27  Foam::linearEdgeInterpolation
28 
29 Description
30  Central-differencing interpolation scheme class
31 
32 SourceFiles
33  linearEdgeInterpolation.C
34 
35 \*---------------------------------------------------------------------------*/
36 
37 #ifndef linearEdgeInterpolation_H
38 #define linearEdgeInterpolation_H
39 
41 #include "areaFields.H"
42 
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 
45 namespace Foam
46 {
47 
48 /*---------------------------------------------------------------------------*\
49  Class linear Declaration
50 \*---------------------------------------------------------------------------*/
51 
52 template<class Type>
54 :
55  virtual public edgeInterpolationScheme<Type>
56 {
57  // Private Member Functions
58 
59  //- No copy assignment
60  void operator=(const linearEdgeInterpolation&) = delete;
61 
62 public:
63 
64  //- Runtime type information
65  TypeName("linear");
66 
67 
68  // Constructors
69 
70  //- Construct from mesh
72  :
74  {}
75 
76  //- Construct from Istream
78  :
80  {}
81 
82  //- Construct from faceFlux and Istream
84  (
85  const faMesh& mesh,
86  const edgeScalarField&,
87  Istream&
88  )
89  :
91  {}
92 
93 
94  // Member Functions
95 
96  //- Return the interpolation weighting factors
98  (
100  ) const
101  {
102  return this->mesh().edgeInterpolation::weights();
103  }
104 };
105 
106 
107 template<class Type>
110 {
112  (
113  vf,
114  vf.mesh().edgeInterpolation::weights()
115  );
116 }
117 
118 
119 template<class Type>
120 tmp<GeometricField<Type, faePatchField, edgeMesh>>
122 (
124 )
125 {
127  linearEdgeInterpolate(tvf());
128  tvf.clear();
129  return tinterp;
130 }
131 
132 
133 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
134 
135 } // End namespace Foam
136 
137 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
138 
139 #endif
140 
141 // ************************************************************************* //
edgeInterpolationScheme.H
Foam::edgeInterpolationScheme
Abstract base class for edge interpolation schemes.
Definition: edgeInterpolationScheme.H:57
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Foam::edgeInterpolationScheme::mesh
const faMesh & mesh() const
Return mesh reference.
Definition: edgeInterpolationScheme.H:138
Foam::linearEdgeInterpolation::linearEdgeInterpolation
linearEdgeInterpolation(const faMesh &mesh)
Construct from mesh.
Definition: linearEdgeInterpolation.H:70
Foam::linearEdgeInterpolation::linearEdgeInterpolation
linearEdgeInterpolation(const faMesh &mesh, Istream &)
Construct from Istream.
Definition: linearEdgeInterpolation.H:76
Foam::linearEdgeInterpolation::weights
tmp< edgeScalarField > weights(const GeometricField< Type, faPatchField, areaMesh > &) const
Return the interpolation weighting factors.
Definition: linearEdgeInterpolation.H:97
Foam::Istream
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Definition: Istream.H:61
Foam::linearEdgeInterpolation::TypeName
TypeName("linear")
Runtime type information.
areaFields.H
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::linearEdgeInterpolate
tmp< GeometricField< Type, faePatchField, edgeMesh > > linearEdgeInterpolate(const GeometricField< Type, faPatchField, areaMesh > &vf)
Definition: linearEdgeInterpolation.H:108
Foam::edgeInterpolationScheme::interpolate
static tmp< GeometricField< Type, faePatchField, edgeMesh > > interpolate(const GeometricField< Type, faPatchField, areaMesh > &, const tmp< edgeScalarField > &, const tmp< edgeScalarField > &)
Return the face-interpolate of the given cell field.
Definition: edgeInterpolationScheme.C:138
Foam::linearEdgeInterpolation
Central-differencing interpolation scheme class.
Definition: linearEdgeInterpolation.H:52
Foam::faMesh
Finite area mesh. Used for 2-D non-Euclidian finite area method.
Definition: faMesh.H:82
Foam::GeometricField< scalar, faePatchField, edgeMesh >