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 faConvectionScheme_H
00037 #define faConvectionScheme_H
00038
00039 #include "tmp.H"
00040 #include "areaFieldsFwd.H"
00041 #include "edgeFieldsFwd.H"
00042 #include "typeInfo.H"
00043 #include "runTimeSelectionTables.H"
00044
00045
00046
00047 namespace Foam
00048 {
00049
00050 template<class Type>
00051 class faMatrix;
00052
00053 class faMesh;
00054
00055
00056
00057 namespace fa
00058 {
00059
00060
00061
00062
00063
00064 template<class Type>
00065 class convectionScheme
00066 :
00067 public refCount
00068 {
00069
00070
00071 const faMesh& mesh_;
00072
00073
00074
00075
00076
00077 convectionScheme(const convectionScheme&);
00078
00079
00080 void operator=(const convectionScheme&);
00081
00082
00083 public:
00084
00085
00086
00087 declareRunTimeSelectionTable
00088 (
00089 tmp,
00090 convectionScheme,
00091 Istream,
00092 (
00093 const faMesh& mesh,
00094 const edgeScalarField& faceFlux,
00095 Istream& schemeData
00096 ),
00097 (mesh, faceFlux, schemeData)
00098 );
00099
00100
00101
00102
00103
00104 convectionScheme
00105 (
00106 const faMesh& mesh,
00107 const edgeScalarField& faceFlux
00108 )
00109 :
00110 mesh_(mesh)
00111 {}
00112
00113
00114
00115
00116
00117 static tmp<convectionScheme<Type> > New
00118 (
00119 const faMesh& mesh,
00120 const edgeScalarField& faceFlux,
00121 Istream& schemeData
00122 );
00123
00124
00125
00126
00127 virtual ~convectionScheme();
00128
00129
00130
00131
00132
00133 const faMesh& mesh() const
00134 {
00135 return mesh_;
00136 }
00137
00138 virtual tmp<GeometricField<Type, faPatchField, edgeMesh> > flux
00139 (
00140 const edgeScalarField&,
00141 const GeometricField<Type, faPatchField, areaMesh>&
00142 ) const = 0;
00143
00144 virtual tmp<faMatrix<Type> > famDiv
00145 (
00146 const edgeScalarField&,
00147 GeometricField<Type, faPatchField, areaMesh>&
00148 ) const = 0;
00149
00150 virtual tmp<GeometricField<Type, faPatchField, areaMesh> > facDiv
00151 (
00152 const edgeScalarField&,
00153 const GeometricField<Type, faPatchField, areaMesh>&
00154 ) const = 0;
00155 };
00156
00157
00158
00159
00160 }
00161
00162
00163
00164 }
00165
00166
00167
00168
00169
00170 #define makeFaConvectionTypeScheme(SS, Type) \
00171 \
00172 defineNamedTemplateTypeNameAndDebug(SS<Type>, 0); \
00173 \
00174 convectionScheme<Type>::addIstreamConstructorToTable<SS<Type> > \
00175 add##SS##Type##IstreamConstructorToTable_;
00176
00177
00178 #define makeFaConvectionScheme(SS) \
00179 \
00180 makeFaConvectionTypeScheme(SS, scalar) \
00181 makeFaConvectionTypeScheme(SS, vector) \
00182 makeFaConvectionTypeScheme(SS, tensor)
00183
00184
00185
00186 #ifdef NoRepository
00187 # include "faConvectionScheme.C"
00188 #endif
00189
00190
00191
00192 #endif
00193
00194