00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036 #ifndef convectionScheme_H
00037 #define convectionScheme_H
00038
00039 #include "tmp.H"
00040 #include "volFieldsFwd.H"
00041 #include "surfaceFieldsFwd.H"
00042 #include "typeInfo.H"
00043 #include "runTimeSelectionTables.H"
00044 #include "multivariateSurfaceInterpolationScheme.H"
00045
00046
00047
00048 namespace Foam
00049 {
00050
00051 template<class Type>
00052 class fvMatrix;
00053
00054 class fvMesh;
00055
00056
00057
00058 namespace fv
00059 {
00060
00061
00062
00063
00064
00065 template<class Type>
00066 class convectionScheme
00067 :
00068 public refCount
00069 {
00070
00071
00072 const fvMesh& mesh_;
00073
00074
00075
00076
00077
00078 convectionScheme(const convectionScheme&);
00079
00080
00081 void operator=(const convectionScheme&);
00082
00083
00084 public:
00085
00086
00087 virtual const word& type() const = 0;
00088
00089
00090
00091
00092 declareRunTimeSelectionTable
00093 (
00094 tmp,
00095 convectionScheme,
00096 Istream,
00097 (
00098 const fvMesh& mesh,
00099 const surfaceScalarField& faceFlux,
00100 Istream& schemeData
00101 ),
00102 (mesh, faceFlux, schemeData)
00103 );
00104
00105 declareRunTimeSelectionTable
00106 (
00107 tmp,
00108 convectionScheme,
00109 Multivariate,
00110 (
00111 const fvMesh& mesh,
00112 const typename multivariateSurfaceInterpolationScheme<Type>::
00113 fieldTable& fields,
00114 const surfaceScalarField& faceFlux,
00115 Istream& schemeData
00116 ),
00117 (mesh, fields, faceFlux, schemeData)
00118 );
00119
00120
00121
00122
00123
00124 convectionScheme
00125 (
00126 const fvMesh& mesh,
00127 const surfaceScalarField&
00128 )
00129 :
00130 mesh_(mesh)
00131 {}
00132
00133
00134
00135
00136
00137 static tmp<convectionScheme<Type> > New
00138 (
00139 const fvMesh& mesh,
00140 const surfaceScalarField& faceFlux,
00141 Istream& schemeData
00142 );
00143
00144
00145
00146
00147 static tmp<convectionScheme<Type> > New
00148 (
00149 const fvMesh& mesh,
00150 const typename multivariateSurfaceInterpolationScheme<Type>::
00151 fieldTable& fields,
00152 const surfaceScalarField& faceFlux,
00153 Istream& schemeData
00154 );
00155
00156
00157
00158
00159 virtual ~convectionScheme();
00160
00161
00162
00163
00164
00165 const fvMesh& mesh() const
00166 {
00167 return mesh_;
00168 }
00169
00170 virtual tmp<GeometricField<Type, fvPatchField, surfaceMesh> >
00171 interpolate
00172 (
00173 const surfaceScalarField&,
00174 const GeometricField<Type, fvPatchField, volMesh>&
00175 ) const = 0;
00176
00177 virtual tmp<GeometricField<Type, fvPatchField, surfaceMesh> > flux
00178 (
00179 const surfaceScalarField&,
00180 const GeometricField<Type, fvPatchField, volMesh>&
00181 ) const = 0;
00182
00183 virtual tmp<fvMatrix<Type> > fvmDiv
00184 (
00185 const surfaceScalarField&,
00186 GeometricField<Type, fvPatchField, volMesh>&
00187 ) const = 0;
00188
00189 virtual tmp<GeometricField<Type, fvPatchField, volMesh> > fvcDiv
00190 (
00191 const surfaceScalarField&,
00192 const GeometricField<Type, fvPatchField, volMesh>&
00193 ) const = 0;
00194 };
00195
00196
00197
00198
00199 }
00200
00201
00202
00203 }
00204
00205
00206
00207
00208
00209 #define makeFvConvectionTypeScheme(SS, Type) \
00210 \
00211 defineNamedTemplateTypeNameAndDebug(SS<Type>, 0); \
00212 \
00213 convectionScheme<Type>::addIstreamConstructorToTable<SS<Type> > \
00214 add##SS##Type##IstreamConstructorToTable_;
00215
00216
00217 #define makeFvConvectionScheme(SS) \
00218 \
00219 makeFvConvectionTypeScheme(SS, scalar) \
00220 makeFvConvectionTypeScheme(SS, vector) \
00221 makeFvConvectionTypeScheme(SS, tensor) \
00222 makeFvConvectionTypeScheme(SS, sphericalTensor)
00223
00224
00225 #define makeMultivariateFvConvectionTypeScheme(SS, Type) \
00226 \
00227 defineNamedTemplateTypeNameAndDebug(SS<Type>, 0); \
00228 \
00229 convectionScheme<Type>::addMultivariateConstructorToTable<SS<Type> > \
00230 add##SS##Type##MultivariateConstructorToTable_;
00231
00232
00233 #define makeMultivariateFvConvectionScheme(SS) \
00234 \
00235 makeMultivariateFvConvectionTypeScheme(SS, scalar) \
00236 makeMultivariateFvConvectionTypeScheme(SS, vector) \
00237 makeMultivariateFvConvectionTypeScheme(SS, tensor) \
00238 makeMultivariateFvConvectionTypeScheme(SS, sphericalTensor)
00239
00240
00241
00242
00243 #ifdef NoRepository
00244 # include "convectionScheme.C"
00245 #endif
00246
00247
00248
00249 #endif
00250
00251