surfaceInterpolate.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 -------------------------------------------------------------------------------
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 InNamespace
27  Foam::fvc
28 
29 Description
30  Surface Interpolation
31 
32 SourceFiles
33  surfaceInterpolate.C
34 
35 \*---------------------------------------------------------------------------*/
36 
37 #ifndef surfaceInterpolate_H
38 #define surfaceInterpolate_H
39 
40 #include "tmp.H"
41 #include "volFieldsFwd.H"
42 #include "surfaceFieldsFwd.H"
44 #include "one.H"
45 
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 
48 namespace Foam
49 {
50 
51 /*---------------------------------------------------------------------------*\
52  Namespace fvc functions Declaration
53 \*---------------------------------------------------------------------------*/
54 
55 namespace fvc
56 {
57  //- Return weighting factors for scheme given from Istream
58  template<class Type>
59  static tmp<surfaceInterpolationScheme<Type>> scheme
60  (
61  const surfaceScalarField& faceFlux,
62  Istream& schemeData
63  );
64 
65  //- Return weighting factors for scheme given by name in dictionary
66  template<class Type>
67  static tmp<surfaceInterpolationScheme<Type>> scheme
68  (
69  const surfaceScalarField& faceFlux,
70  const word& name
71  );
72 
73 
74  //- Return weighting factors for scheme given from Istream
75  template<class Type>
76  static tmp<surfaceInterpolationScheme<Type>> scheme
77  (
78  const fvMesh& mesh,
79  Istream& schemeData
80  );
81 
82  //- Return weighting factors for scheme given by name in dictionary
83  template<class Type>
84  static tmp<surfaceInterpolationScheme<Type>> scheme
85  (
86  const fvMesh& mesh,
87  const word& name
88  );
89 
90 
91  //- Interpolate field onto faces using scheme given by Istream
92  template<class Type>
93  static tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> interpolate
94  (
95  const GeometricField<Type, fvPatchField, volMesh>& tvf,
96  const surfaceScalarField& faceFlux,
97  Istream& schemeData
98  );
99 
100  //- Interpolate field onto faces using scheme given by name in fvSchemes
101  template<class Type>
102  static tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> interpolate
103  (
104  const GeometricField<Type, fvPatchField, volMesh>& tvf,
105  const surfaceScalarField& faceFlux,
106  const word& name
107  );
108 
109  //- Interpolate field onto faces using scheme given by name in fvSchemes
110  template<class Type>
111  static tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> interpolate
112  (
113  const tmp<GeometricField<Type, fvPatchField, volMesh>>& tvf,
114  const surfaceScalarField& faceFlux,
115  const word& name
116  );
117 
118  //- Interpolate field onto faces using scheme given by name in fvSchemes
119  template<class Type>
120  static tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> interpolate
121  (
122  const GeometricField<Type, fvPatchField, volMesh>& tvf,
123  const tmp<surfaceScalarField>& faceFlux,
124  const word& name
125  );
126 
127  //- Interpolate field onto faces using scheme given by name in fvSchemes
128  template<class Type>
129  static tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> interpolate
130  (
131  const tmp<GeometricField<Type, fvPatchField, volMesh>>& tvf,
132  const tmp<surfaceScalarField>& faceFlux,
133  const word& name
134  );
135 
136 
137  //- Interpolate field onto faces using scheme given by Istream
138  template<class Type>
139  static tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> interpolate
140  (
141  const GeometricField<Type, fvPatchField, volMesh>& tvf,
142  Istream& schemeData
143  );
144 
145  //- Interpolate field onto faces using scheme given by name in fvSchemes
146  template<class Type>
147  static tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> interpolate
148  (
149  const GeometricField<Type, fvPatchField, volMesh>& tvf,
150  const word& name
151  );
152 
153  //- Interpolate field onto faces using scheme given by name in fvSchemes
154  template<class Type>
155  static tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> interpolate
156  (
157  const tmp<GeometricField<Type, fvPatchField, volMesh>>& tvf,
158  const word& name
159  );
160 
161 
162  //- Interpolate field onto faces using 'interpolate(<name>)'
163  template<class Type>
164  static tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> interpolate
165  (
166  const GeometricField<Type, fvPatchField, volMesh>& tvf
167  );
168 
169  //- Interpolate tmp field onto faces using 'interpolate(<name>)'
170  template<class Type>
171  static tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> interpolate
172  (
173  const tmp<GeometricField<Type, fvPatchField, volMesh>>& tvf
174  );
175 
176 
177  //- Interpolate boundary field onto faces (simply a type conversion)
178  template<class Type>
179  static tmp<FieldField<fvsPatchField, Type>> interpolate
180  (
181  const FieldField<fvPatchField, Type>& fvpff
182  );
183 
184  //- Interpolate boundary field onto faces (simply a type conversion)
185  template<class Type>
186  static tmp<FieldField<fvsPatchField, Type>> interpolate
187  (
188  const tmp<FieldField<fvPatchField, Type>>& tfvpff
189  );
190 
191  //- Interpolate 'one' returning 'one'
193  {
194  return Foam::one{};
195  }
196 
197 
198  //- Interpolate field onto faces
199  // and 'dot' with given surfaceVectorField Sf
200  template<class Type>
201  static
202  tmp
203  <
205  <
209  >
211  (
212  const surfaceVectorField& Sf,
214  );
215 
216  //- Interpolate tmp field onto faces
217  // and 'dot' with given surfaceVectorField Sf
218  template<class Type>
219  static
220  tmp
221  <
223  <
227  >
229  (
230  const surfaceVectorField& Sf,
232  );
233 }
234 
235 
236 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
237 
238 } // End namespace Foam
239 
240 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
241 
242 #ifdef NoRepository
243  #include "surfaceInterpolate.C"
244 #endif
245 
246 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
247 
248 #endif
249 
250 // ************************************************************************* //
volFieldsFwd.H
Foam::fvc::dotInterpolate
static tmp< GeometricField< typename innerProduct< vector, Type >::type, fvsPatchField, surfaceMesh > > dotInterpolate(const surfaceVectorField &Sf, const GeometricField< Type, fvPatchField, volMesh > &tvf)
Interpolate field onto faces.
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Foam::innerProduct
Definition: products.H:141
Foam::surfaceMesh
Mesh data needed to do the Finite Volume discretisation.
Definition: surfaceMesh.H:49
Foam::fvsPatchField
An abstract base class with a fat-interface to all derived classes covering all possible ways in whic...
Definition: fvsPatchField.H:68
Foam::fvc::scheme
static tmp< surfaceInterpolationScheme< Type > > scheme(const surfaceScalarField &faceFlux, Istream &schemeData)
Return weighting factors for scheme given from Istream.
Foam::one
A class representing the concept of 1 (one) that can be used to avoid manipulating objects known to b...
Definition: one.H:61
one.H
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:6
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::fvc::interpolate
static tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > interpolate(const GeometricField< Type, fvPatchField, volMesh > &tvf, const surfaceScalarField &faceFlux, Istream &schemeData)
Interpolate field onto faces using scheme given by Istream.
tmp.H
Foam::surfaceScalarField
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
Definition: surfaceFieldsFwd.H:54
surfaceFieldsFwd.H
Foam::name
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
Definition: exprTraits.C:59
Foam::GeometricField
Generic GeometricField class.
Definition: areaFieldsFwd.H:53
surfaceInterpolationScheme.H