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::limitedSurfaceInterpolationScheme
29 Abstract base class for limited surface interpolation schemes.
32 limitedSurfaceInterpolationScheme.C
34 \*---------------------------------------------------------------------------*/
36 #ifndef limitedSurfaceInterpolationScheme_H
37 #define limitedSurfaceInterpolationScheme_H
39 #include "surfaceInterpolationScheme.H"
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 /*---------------------------------------------------------------------------*\
47 Class limitedSurfaceInterpolationScheme Declaration
48 \*---------------------------------------------------------------------------*/
51 class limitedSurfaceInterpolationScheme
53 public surfaceInterpolationScheme<Type>
55 // Private Member Functions
57 //- Disallow copy construct
58 limitedSurfaceInterpolationScheme
60 const limitedSurfaceInterpolationScheme&
63 //- Disallow default bitwise assignment
64 void operator=(const limitedSurfaceInterpolationScheme&);
71 const surfaceScalarField& faceFlux_;
76 //- Runtime type information
77 TypeName("limitedSurfaceInterpolationScheme");
80 // Declare run-time constructor selection tables
82 declareRunTimeSelectionTable
85 limitedSurfaceInterpolationScheme,
94 declareRunTimeSelectionTable
97 limitedSurfaceInterpolationScheme,
101 const surfaceScalarField& faceFlux,
104 (mesh, faceFlux, schemeData)
110 //- Construct from mesh and faceFlux
111 limitedSurfaceInterpolationScheme
114 const surfaceScalarField& faceFlux
117 surfaceInterpolationScheme<Type>(mesh),
122 //- Construct from mesh and Istream.
123 // The name of the flux field is read from the Istream and looked-up
124 // from the mesh objectRegistry
125 limitedSurfaceInterpolationScheme
131 surfaceInterpolationScheme<Type>(mesh),
134 mesh.lookupObject<surfaceScalarField>
144 //- Return new tmp interpolation scheme
145 static tmp<limitedSurfaceInterpolationScheme<Type> > New
151 //- Return new tmp interpolation scheme
152 static tmp<limitedSurfaceInterpolationScheme<Type> > New
155 const surfaceScalarField& faceFlux,
162 virtual ~limitedSurfaceInterpolationScheme();
167 //- Return the interpolation weighting factors
168 virtual tmp<surfaceScalarField> limiter
170 const GeometricField<Type, fvPatchField, volMesh>&
173 //- Return the interpolation weighting factors for the given field,
174 // by limiting the given weights with the given limiter
175 tmp<surfaceScalarField> weights
177 const GeometricField<Type, fvPatchField, volMesh>&,
178 const surfaceScalarField& CDweights,
179 tmp<surfaceScalarField> tLimiter
182 //- Return the interpolation weighting factors for the given field
183 virtual tmp<surfaceScalarField> weights
185 const GeometricField<Type, fvPatchField, volMesh>&
188 //- Return the flux consistent with interpolation
189 virtual tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
192 const GeometricField<Type, fvPatchField, volMesh>&
197 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
199 } // End namespace Foam
201 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
203 // Add the patch constructor functions to the hash tables
205 #define makelimitedSurfaceInterpolationTypeScheme(SS, Type) \
207 defineNamedTemplateTypeNameAndDebug(SS<Type>, 0); \
209 surfaceInterpolationScheme<Type>::addMeshConstructorToTable<SS<Type> > \
210 add##SS##Type##MeshConstructorToTable_; \
212 surfaceInterpolationScheme<Type>::addMeshFluxConstructorToTable<SS<Type> > \
213 add##SS##Type##MeshFluxConstructorToTable_; \
215 limitedSurfaceInterpolationScheme<Type>::addMeshConstructorToTable<SS<Type> > \
216 add##SS##Type##MeshConstructorToLimitedTable_; \
218 limitedSurfaceInterpolationScheme<Type>::addMeshFluxConstructorToTable<SS<Type> >\
219 add##SS##Type##MeshFluxConstructorToLimitedTable_;
221 #define makelimitedSurfaceInterpolationScheme(SS) \
223 makelimitedSurfaceInterpolationTypeScheme(SS, scalar) \
224 makelimitedSurfaceInterpolationTypeScheme(SS, vector) \
225 makelimitedSurfaceInterpolationTypeScheme(SS, sphericalTensor) \
226 makelimitedSurfaceInterpolationTypeScheme(SS, symmTensor) \
227 makelimitedSurfaceInterpolationTypeScheme(SS, tensor)
230 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
233 # include "limitedSurfaceInterpolationScheme.C"
236 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
240 // ************************************************************************* //