All Classes Namespaces Files Functions Variables Typedefs Friends Macros Groups
directionInterpolate.H
Go to the documentation of this file.
1 namespace Foam
2 {
3 
4 //- Interpolate field vf according to direction dir
5 template<class Type>
6 tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> interpolate
7 (
8  const GeometricField<Type, fvPatchField, volMesh>& vf,
9  const surfaceScalarField& dir,
10  const word& reconFieldName = word::null
11 )
12 {
13  Foam::word schemeName ("upwind");
14  dictionary fluxScheme;
15  fluxScheme.set<word>("interpolate", schemeName);
16 
17  tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> tsf
18  (
20  (
21  vf,
22  dir,
23  fluxScheme.lookup("interpolate")
24 // "reconstruct("
25 // + (reconFieldName != word::null ? reconFieldName : vf.name())
26 // + ')'
27  )
28  );
29 
30  GeometricField<Type, fvsPatchField, surfaceMesh>& sf = tsf.ref();
31 
32  sf.rename(vf.name() + '_' + dir.name());
33 
34  return tsf;
35 }
36 
37 }
tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > interpolate(const GeometricField< Type, fvPatchField, volMesh > &vf, const surfaceScalarField &dir, const word &reconFieldName=word::null)
Interpolate field vf according to direction dir.