1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
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 the
13 Free Software Foundation; either version 2 of the License, or (at your
14 option) any later version.
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
21 You should have received a copy of the GNU General Public License
22 along with OpenFOAM; if not, write to the Free Software Foundation,
23 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
29 Central-differencing interpolation scheme class
34 \*---------------------------------------------------------------------------*/
39 #include "surfaceInterpolationScheme.H"
40 #include "volFields.H"
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 /*---------------------------------------------------------------------------*\
48 Class linear Declaration
49 \*---------------------------------------------------------------------------*/
54 public surfaceInterpolationScheme<Type>
56 // Private Member Functions
58 //- Disallow default bitwise assignment
59 void operator=(const linear&);
64 //- Runtime type information
70 //- Construct from mesh
71 linear(const fvMesh& mesh)
73 surfaceInterpolationScheme<Type>(mesh)
76 //- Construct from Istream
77 linear(const fvMesh& mesh, Istream&)
79 surfaceInterpolationScheme<Type>(mesh)
82 //- Construct from faceFlux and Istream
86 const surfaceScalarField&,
90 surfaceInterpolationScheme<Type>(mesh)
96 //- Return the interpolation weighting factors
97 tmp<surfaceScalarField> weights
99 const GeometricField<Type, fvPatchField, volMesh>&
102 return this->mesh().surfaceInterpolation::weights();
108 tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
109 linearInterpolate(const GeometricField<Type, fvPatchField, volMesh>& vf)
111 return surfaceInterpolationScheme<Type>::interpolate
114 vf.mesh().surfaceInterpolation::weights()
120 tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
121 linearInterpolate(const tmp<GeometricField<Type, fvPatchField, volMesh> >& tvf)
123 tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > tinterp =
124 linearInterpolate(tvf());
130 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
132 } // End namespace Foam
134 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
138 // ************************************************************************* //