1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 1991-2008 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
25 \*---------------------------------------------------------------------------*/
27 #include "volFields.H"
28 #include "surfaceFields.H"
31 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
36 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
38 template<class Type, class Scheme>
39 multivariateScheme<Type, Scheme>::multivariateScheme
42 const typename multivariateSurfaceInterpolationScheme<Type>::
44 const surfaceScalarField& faceFlux,
48 multivariateSurfaceInterpolationScheme<Type>
55 Scheme::LimiterType(schemeData),
61 "multivariateWeights",
62 mesh.time().timeName(),
69 typename multivariateSurfaceInterpolationScheme<Type>::
70 fieldTable::const_iterator iter = this->fields().begin();
72 surfaceScalarField limiter =
73 Scheme(mesh, faceFlux_, *this).limiter(*iter());
75 for (++iter; iter != this->fields().end(); ++iter)
80 Scheme(mesh, faceFlux_, *this).limiter(*iter())
85 limiter*mesh.surfaceInterpolation::weights()
86 + (scalar(1) - limiter)*upwind<Type>(mesh, faceFlux_).weights();
90 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
92 } // End namespace Foam
94 // ************************************************************************* //