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::multivariateSurfaceInterpolationScheme
29 Abstract base class for multi-variate surface interpolation schemes.
32 multivariateSurfaceInterpolationScheme.C
34 \*---------------------------------------------------------------------------*/
36 #ifndef multivariateSurfaceInterpolationScheme_H
37 #define multivariateSurfaceInterpolationScheme_H
39 #include "surfaceInterpolationScheme.H"
40 #include "HashTable.H"
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 /*---------------------------------------------------------------------------*\
48 Class multivariateSurfaceInterpolationScheme Declaration
49 \*---------------------------------------------------------------------------*/
52 class multivariateSurfaceInterpolationScheme
62 public HashTable<const GeometricField<Type, fvPatchField, volMesh>*>
69 void add(const GeometricField<Type, fvPatchField, volMesh>& f)
80 //- Hold reference to mesh
83 //- HashTable of pointers to the field set
84 const fieldTable& fields_;
87 // Private Member Functions
89 //- Disallow default bitwise copy construct
90 multivariateSurfaceInterpolationScheme
92 const multivariateSurfaceInterpolationScheme&
95 //- Disallow default bitwise assignment
96 void operator=(const multivariateSurfaceInterpolationScheme&);
101 //- Runtime type information
102 virtual const word& type() const = 0;
105 // Declare run-time constructor selection tables
107 declareRunTimeSelectionTable
110 multivariateSurfaceInterpolationScheme,
114 const fieldTable& fields,
115 const surfaceScalarField& faceFlux,
118 (mesh, fields, faceFlux, is)
124 //- Construct for interpolating given field
125 multivariateSurfaceInterpolationScheme
128 const fieldTable& fields,
129 const surfaceScalarField& faceFlux,
136 //- Return a pointer to a new gradScheme created on freestore
137 static tmp<multivariateSurfaceInterpolationScheme<Type> > New
140 const fieldTable& fields,
141 const surfaceScalarField& faceFlux,
148 virtual ~multivariateSurfaceInterpolationScheme();
153 //- Return mesh reference
154 const fvMesh& mesh() const
159 //- Return fields to be interpolated
160 const fieldTable& fields() const
168 //- surfaceInterpolationScheme sub-class returned by operator(field)
169 // which is used as the interpolation scheme for the field
172 public surfaceInterpolationScheme<Type>
181 const GeometricField<Type, fvPatchField, volMesh>& field
184 surfaceInterpolationScheme<Type>(field.mesh())
190 //- Return the interpolation weighting factors
191 virtual tmp<surfaceScalarField> weights
193 const GeometricField<Type, fvPatchField, volMesh>& field
197 virtual tmp<surfaceInterpolationScheme<Type> > operator()
199 const GeometricField<Type, fvPatchField, volMesh>& field
204 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
206 } // End namespace Foam
208 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
210 // Add the patch constructor functions to the hash tables
212 #define makeMultivariateSurfaceInterpolationTypeScheme(SS, Type) \
214 defineNamedTemplateTypeNameAndDebug(SS<Type>, 0); \
216 multivariateSurfaceInterpolationScheme<Type>:: \
217 addIstreamConstructorToTable<SS<Type> > \
218 add##SS##Type##ConstructorToTable_;
221 #define makeMultivariateSurfaceInterpolationScheme(SS) \
223 makeMultivariateSurfaceInterpolationTypeScheme(SS, scalar) \
224 makeMultivariateSurfaceInterpolationTypeScheme(SS, vector) \
225 makeMultivariateSurfaceInterpolationTypeScheme(SS, sphericalTensor) \
226 makeMultivariateSurfaceInterpolationTypeScheme(SS, symmTensor) \
227 makeMultivariateSurfaceInterpolationTypeScheme(SS, tensor)
230 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
233 # include "multivariateSurfaceInterpolationScheme.C"
236 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
240 // ************************************************************************* //