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
26 Foam::multivariateUpwind
29 Upwind-difference form of the multivariate surfaceInterpolationScheme.
32 multivariateUpwindmake.C
34 \*---------------------------------------------------------------------------*/
36 #ifndef multivariateUpwind_H
37 #define multivariateUpwind_H
39 #include "multivariateSurfaceInterpolationScheme.H"
40 #include "surfaceFields.H"
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 /*---------------------------------------------------------------------------*\
48 Class multivariateUpwind Declaration
49 \*---------------------------------------------------------------------------*/
52 class multivariateUpwind
54 public multivariateSurfaceInterpolationScheme<Type>
58 const surfaceScalarField& faceFlux_;
61 // Private Member Functions
63 //- Disallow default bitwise copy construct
64 multivariateUpwind(const multivariateUpwind&);
66 //- Disallow default bitwise assignment
67 void operator=(const multivariateUpwind&);
72 //- Runtime type information
78 //- Construct for field, faceFlux and Istream
82 const typename multivariateSurfaceInterpolationScheme<Type>::
84 const surfaceScalarField& faceFlux,
88 multivariateSurfaceInterpolationScheme<Type>
101 //- surfaceInterpolationScheme sub-class returned by operator(field)
102 // which is used as the interpolation scheme for the field
105 public multivariateSurfaceInterpolationScheme<Type>::fieldScheme
109 const surfaceScalarField& faceFlux_;
117 const GeometricField<Type, fvPatchField, volMesh>& field,
118 const surfaceScalarField& faceFlux
121 multivariateSurfaceInterpolationScheme<Type>::
129 //- Return the interpolation weighting factors
130 tmp<surfaceScalarField> weights
132 const GeometricField<Type, fvPatchField, volMesh>&
135 return pos(faceFlux_);
139 tmp<surfaceInterpolationScheme<Type> > operator()
141 const GeometricField<Type, fvPatchField, volMesh>& field
144 return tmp<surfaceInterpolationScheme<Type> >
146 new fieldScheme(field, faceFlux_)
152 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
154 } // End namespace Foam
156 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
160 // ************************************************************************* //