1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright held by original author
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>
59 //- Schemes dictionary
63 const surfaceScalarField& faceFlux_;
66 surfaceScalarField weights_;
69 // Private Member Functions
71 //- Disallow default bitwise copy construct
72 multivariateSelectionScheme(const multivariateSelectionScheme&);
74 //- Disallow default bitwise assignment
75 void operator=(const multivariateSelectionScheme&);
80 //- Runtime type information
81 TypeName("multivariateSelection");
86 //- Construct for field, faceFlux and Istream
87 multivariateSelectionScheme
90 const typename multivariateSurfaceInterpolationScheme<Type>::
92 const surfaceScalarField& faceFlux,
99 //- surfaceInterpolationScheme sub-class returned by operator(field)
100 // which is used as the interpolation scheme for the field
103 public multivariateSurfaceInterpolationScheme<Type>::fieldScheme
107 const surfaceScalarField& weights_;
115 const GeometricField<Type, fvPatchField, volMesh>& field,
116 const surfaceScalarField& weights
119 multivariateSurfaceInterpolationScheme<Type>::
127 //- Return the interpolation weighting factors
128 tmp<surfaceScalarField> weights
130 const GeometricField<Type, fvPatchField, volMesh>&
137 tmp<surfaceInterpolationScheme<Type> > operator()
139 const GeometricField<Type, fvPatchField, volMesh>& field
142 return tmp<surfaceInterpolationScheme<Type> >
144 new fieldScheme(field, weights_)
150 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
152 } // End namespace Foam
154 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
157 # include "multivariateSelectionScheme.C"
160 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
164 // ************************************************************************* //