surfaceInterpolate.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 InNamespace
25  Foam::fvc
26 
27 Description
28  Surface Interpolation
29 
30 SourceFiles
31  surfaceInterpolate.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef surfaceInterpolate_H
36 #define surfaceInterpolate_H
37 
38 #include "tmp.H"
39 #include "volFieldsFwd.H"
40 #include "surfaceFieldsFwd.H"
42 #include "one.H"
43 
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 
46 namespace Foam
47 {
48 
49 /*---------------------------------------------------------------------------*\
50  Namespace fvc functions Declaration
51 \*---------------------------------------------------------------------------*/
52 
53 namespace fvc
54 {
55  //- Return weighting factors for scheme given from Istream
56  template<class Type>
58  (
59  const surfaceScalarField& faceFlux,
60  Istream& schemeData
61  );
62 
63  //- Return weighting factors for scheme given by name in dictionary
64  template<class Type>
66  (
67  const surfaceScalarField& faceFlux,
68  const word& name
69  );
70 
71 
72  //- Return weighting factors for scheme given from Istream
73  template<class Type>
75  (
76  const fvMesh& mesh,
77  Istream& schemeData
78  );
79 
80  //- Return weighting factors for scheme given by name in dictionary
81  template<class Type>
83  (
84  const fvMesh& mesh,
85  const word& name
86  );
87 
88 
89  //- Interpolate field onto faces using scheme given by Istream
90  template<class Type>
92  (
93  const VolField<Type>& tvf,
94  const surfaceScalarField& faceFlux,
95  Istream& schemeData
96  );
97 
98  //- Interpolate field onto faces using scheme given by name in fvSchemes
99  template<class Type>
101  (
102  const VolField<Type>& tvf,
103  const surfaceScalarField& faceFlux,
104  const word& name
105  );
106 
107  //- Interpolate field onto faces using scheme given by name in fvSchemes
108  template<class Type>
110  (
111  const tmp<VolField<Type>>& tvf,
112  const surfaceScalarField& faceFlux,
113  const word& name
114  );
115 
116  //- Interpolate field onto faces using scheme given by name in fvSchemes
117  template<class Type>
119  (
120  const VolField<Type>& tvf,
121  const tmp<surfaceScalarField>& faceFlux,
122  const word& name
123  );
124 
125  //- Interpolate field onto faces using scheme given by name in fvSchemes
126  template<class Type>
128  (
129  const tmp<VolField<Type>>& tvf,
130  const tmp<surfaceScalarField>& faceFlux,
131  const word& name
132  );
133 
134 
135  //- Interpolate field onto faces using scheme given by Istream
136  template<class Type>
138  (
139  const VolField<Type>& tvf,
140  Istream& schemeData
141  );
142 
143  //- Interpolate field onto faces using scheme given by name in fvSchemes
144  template<class Type>
146  (
147  const VolField<Type>& tvf,
148  const word& name
149  );
150 
151  //- Interpolate field onto faces using scheme given by name in fvSchemes
152  template<class Type>
154  (
155  const tmp<VolField<Type>>& tvf,
156  const word& name
157  );
158 
159 
160  //- Interpolate field onto faces using 'interpolate(<name>)'
161  template<class Type>
163  (
164  const VolField<Type>& tvf
165  );
166 
167  //- Interpolate tmp field onto faces using 'interpolate(<name>)'
168  template<class Type>
170  (
171  const tmp<VolField<Type>>& tvf
172  );
173 
174 
175  //- Interpolate boundary field onto faces (simply a type conversion)
176  template<class Type>
178  (
179  const FieldField<fvPatchField, Type>& fvpff
180  );
181 
182  //- Interpolate boundary field onto faces (simply a type conversion)
183  template<class Type>
185  (
186  const tmp<FieldField<fvPatchField, Type>>& tfvpff
187  );
188 
189  //- Interpolate 'one' returning 'one'
190  inline one interpolate(const one&)
191  {
192  return one();
193  }
194 
195 
196  //- Interpolate field onto faces
197  // and 'dot' with given surfaceVectorField Sf
198  template<class Type>
201  (
202  const surfaceVectorField& Sf,
203  const VolField<Type>& tvf
204  );
205 
206  //- Interpolate tmp field onto faces
207  // and 'dot' with given surfaceVectorField Sf
208  template<class Type>
211  (
212  const surfaceVectorField& Sf,
213  const tmp<VolField<Type>>& tvf
214  );
215 }
216 
217 
218 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
219 
220 } // End namespace Foam
221 
222 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
223 
224 #ifdef NoRepository
225  #include "surfaceInterpolate.C"
226 #endif
227 
228 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
229 
230 #endif
231 
232 // ************************************************************************* //
Generic field type.
Definition: FieldField.H:77
Generic GeometricField class.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Definition: Istream.H:60
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:101
A class representing the concept of 1 (scalar(1)) used to avoid unnecessary manipulations for objects...
Definition: one.H:51
A class for managing temporary objects.
Definition: tmp.H:55
A class for handling words, derived from string.
Definition: word.H:62
static tmp< surfaceInterpolationScheme< Type > > scheme(const surfaceScalarField &faceFlux, Istream &schemeData)
Return weighting factors for scheme given from Istream.
static tmp< SurfaceField< Type > > interpolate(const VolField< Type > &tvf, const surfaceScalarField &faceFlux, Istream &schemeData)
Interpolate field onto faces using scheme given by Istream.
static tmp< SurfaceField< typename innerProduct< vector, Type >::type > > dotInterpolate(const surfaceVectorField &Sf, const VolField< Type > &tvf)
Interpolate field onto faces.
Namespace for OpenFOAM.
word name(const complex &)
Return a string representation of a complex.
Definition: complex.C:47