1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2004-2010 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
13 the Free Software Foundation, either version 3 of the License, or
14 (at your 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, see <http://www.gnu.org/licenses/>.
28 Interpolation scheme class using weights looked-up from the objectRegistry.
33 \*---------------------------------------------------------------------------*/
38 #include "surfaceInterpolationScheme.H"
39 #include "volFields.H"
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 /*---------------------------------------------------------------------------*\
47 Class weighted Declaration
48 \*---------------------------------------------------------------------------*/
53 public surfaceInterpolationScheme<Type>
55 // Private member data
57 const surfaceScalarField& weights_;
60 // Private Member Functions
62 //- Disallow default bitwise assignment
63 void operator=(const weighted&);
68 //- Runtime type information
74 //- Construct from weights
75 weighted(const surfaceScalarField& weights)
77 surfaceInterpolationScheme<Type>(weights.mesh()),
81 //- Construct from Istream
82 weighted(const fvMesh& mesh, Istream& is)
84 surfaceInterpolationScheme<Type>(mesh),
87 this->mesh().objectRegistry::template
88 lookupObject<const surfaceScalarField>
95 //- Construct from faceFlux and Istream
99 const surfaceScalarField&,
103 surfaceInterpolationScheme<Type>(mesh),
106 this->mesh().objectRegistry::template
107 lookupObject<const surfaceScalarField>
117 //- Return the interpolation weighting factors
118 tmp<surfaceScalarField> weights
120 const GeometricField<Type, fvPatchField, volMesh>&
128 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
130 } // End namespace Foam
132 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
136 // ************************************************************************* //