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::multivariateSelectionScheme
29 Generic multi-variate discretisation scheme class for which any of the
30 NVD, CNVD or NVDV schemes may be selected for each variable.
33 multivariateSelectionScheme.C
35 \*---------------------------------------------------------------------------*/
37 #ifndef multivariateSelectionScheme_H
38 #define multivariateSelectionScheme_H
40 #include "multivariateSurfaceInterpolationScheme.H"
41 #include "surfaceFields.H"
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48 /*---------------------------------------------------------------------------*\
49 Class multivariateSelectionScheme Declaration
50 \*---------------------------------------------------------------------------*/
53 class multivariateSelectionScheme
55 public multivariateSurfaceInterpolationScheme<Type>
60 const surfaceScalarField& faceFlux_;
61 surfaceScalarField weights_;
64 // Private Member Functions
66 //- Disallow default bitwise copy construct
67 multivariateSelectionScheme(const multivariateSelectionScheme&);
69 //- Disallow default bitwise assignment
70 void operator=(const multivariateSelectionScheme&);
75 //- Runtime type information
76 TypeName("multivariateSelection");
81 //- Construct for field, faceFlux and Istream
82 multivariateSelectionScheme
85 const typename multivariateSurfaceInterpolationScheme<Type>::
87 const surfaceScalarField& faceFlux,
94 //- surfaceInterpolationScheme sub-class returned by operator(field)
95 // which is used as the interpolation scheme for the field
98 public multivariateSurfaceInterpolationScheme<Type>::fieldScheme
102 const surfaceScalarField& weights_;
110 const GeometricField<Type, fvPatchField, volMesh>& field,
111 const surfaceScalarField& weights
114 multivariateSurfaceInterpolationScheme<Type>::
122 //- Return the interpolation weighting factors
123 tmp<surfaceScalarField> weights
125 const GeometricField<Type, fvPatchField, volMesh>&
132 tmp<surfaceInterpolationScheme<Type> > operator()
134 const GeometricField<Type, fvPatchField, volMesh>& field
137 return tmp<surfaceInterpolationScheme<Type> >
139 new fieldScheme(field, weights_)
145 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
147 } // End namespace Foam
149 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
152 # include "multivariateSelectionScheme.C"
155 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
159 // ************************************************************************* //