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 public:
00076
00077
00078 virtual const word& type() const = 0;
00079
00080
00081
00082
00083 declareRunTimeSelectionTable
00084 (
00085 tmp,
00086 convectionScheme,
00087 Istream,
00088 (
00089 const fvMesh& mesh,
00090 const surfaceScalarField& faceFlux,
00091 Istream& schemeData
00092 ),
00093 (mesh, faceFlux, schemeData)
00094 );
00095
00096 declareRunTimeSelectionTable
00097 (
00098 tmp,
00099 convectionScheme,
00100 Multivariate,
00101 (
00102 const fvMesh& mesh,
00103 const typename multivariateSurfaceInterpolationScheme<Type>::
00104 fieldTable& fields,
00105 const surfaceScalarField& faceFlux,
00106 Istream& schemeData
00107 ),
00108 (mesh, fields, faceFlux, schemeData)
00109 );
00110
00111
00112
00113
00114
00115 convectionScheme(const convectionScheme&);
00116
00117
00118 convectionScheme
00119 (
00120 const fvMesh& mesh,
00121 const surfaceScalarField&
00122 )
00123 :
00124 mesh_(mesh)
00125 {}
00126
00127
00128
00129
00130
00131 static tmp<convectionScheme<Type> > New
00132 (
00133 const fvMesh& mesh,
00134 const surfaceScalarField& faceFlux,
00135 Istream& schemeData
00136 );
00137
00138
00139
00140
00141 static tmp<convectionScheme<Type> > New
00142 (
00143 const fvMesh& mesh,
00144 const typename multivariateSurfaceInterpolationScheme<Type>::
00145 fieldTable& fields,
00146 const surfaceScalarField& faceFlux,
00147 Istream& schemeData
00148 );
00149
00150
00151
00152
00153 virtual ~convectionScheme();
00154
00155
00156
00157
00158
00159 const fvMesh& mesh() const
00160 {
00161 return mesh_;
00162 }
00163
00164 virtual tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
00165 interpolate
00166 (
00167 const surfaceScalarField&,
00168 const GeometricField<Type, fvPatchField, volMesh>&
00169 ) const = 0;
00170
00171 virtual tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > flux
00172 (
00173 const surfaceScalarField&,
00174 const GeometricField<Type, fvPatchField, volMesh>&
00175 ) const = 0;
00176
00177 virtual tmp<fvMatrix<Type> > fvmDiv
00178 (
00179 const surfaceScalarField&,
00180 GeometricField<Type, fvPatchField, volMesh>&
00181 ) const = 0;
00182
00183 virtual tmp<GeometricField<Type, fvPatchField, volMesh> > fvcDiv
00184 (
00185 const surfaceScalarField&,
00186 const GeometricField<Type, fvPatchField, volMesh>&
00187 ) const = 0;
00188
00189
00190
00191
00192 void operator=(const convectionScheme<Type>&);
00193 };
00194
00195
00196
00197
00198 }
00199
00200
00201
00202 }
00203
00204
00205
00206
00207
00208 #define makeFvConvectionTypeScheme(SS, Type) \
00209 \
00210 defineNamedTemplateTypeNameAndDebug(SS<Type>, 0); \
00211 \
00212 convectionScheme<Type>::addIstreamConstructorToTable<SS<Type> > \
00213 add##SS##Type##IstreamConstructorToTable_;
00214
00215
00216 #define makeFvConvectionScheme(SS) \
00217 \
00218 makeFvConvectionTypeScheme(SS, scalar) \
00219 makeFvConvectionTypeScheme(SS, vector) \
00220 makeFvConvectionTypeScheme(SS, sphericalTensor) \
00221 makeFvConvectionTypeScheme(SS, symmTensor) \
00222 makeFvConvectionTypeScheme(SS, tensor)
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, sphericalTensor) \
00238 makeMultivariateFvConvectionTypeScheme(SS, symmTensor) \
00239 makeMultivariateFvConvectionTypeScheme(SS, tensor)
00240
00241
00242
00243
00244 #ifdef NoRepository
00245 # include "convectionScheme.C"
00246 #endif
00247
00248
00249
00250 #endif
00251
00252