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 limitedSurfaceInterpolationScheme_H
00037 #define limitedSurfaceInterpolationScheme_H
00038
00039 #include "surfaceInterpolationScheme.H"
00040
00041
00042
00043 namespace Foam
00044 {
00045
00046
00047
00048
00049
00050 template<class Type>
00051 class limitedSurfaceInterpolationScheme
00052 :
00053 public surfaceInterpolationScheme<Type>
00054 {
00055
00056
00057
00058 limitedSurfaceInterpolationScheme
00059 (
00060 const limitedSurfaceInterpolationScheme&
00061 );
00062
00063
00064 void operator=(const limitedSurfaceInterpolationScheme&);
00065
00066
00067 protected:
00068
00069
00070
00071 const surfaceScalarField& faceFlux_;
00072
00073
00074 public:
00075
00076
00077 TypeName("limitedSurfaceInterpolationScheme");
00078
00079
00080
00081
00082 declareRunTimeSelectionTable
00083 (
00084 tmp,
00085 limitedSurfaceInterpolationScheme,
00086 Mesh,
00087 (
00088 const fvMesh& mesh,
00089 Istream& schemeData
00090 ),
00091 (mesh, schemeData)
00092 );
00093
00094 declareRunTimeSelectionTable
00095 (
00096 tmp,
00097 limitedSurfaceInterpolationScheme,
00098 MeshFlux,
00099 (
00100 const fvMesh& mesh,
00101 const surfaceScalarField& faceFlux,
00102 Istream& schemeData
00103 ),
00104 (mesh, faceFlux, schemeData)
00105 );
00106
00107
00108
00109
00110
00111 limitedSurfaceInterpolationScheme
00112 (
00113 const fvMesh& mesh,
00114 const surfaceScalarField& faceFlux
00115 )
00116 :
00117 surfaceInterpolationScheme<Type>(mesh),
00118 faceFlux_(faceFlux)
00119 {}
00120
00121
00122
00123
00124
00125 limitedSurfaceInterpolationScheme
00126 (
00127 const fvMesh& mesh,
00128 Istream& is
00129 )
00130 :
00131 surfaceInterpolationScheme<Type>(mesh),
00132 faceFlux_
00133 (
00134 mesh.lookupObject<surfaceScalarField>
00135 (
00136 word(is)
00137 )
00138 )
00139 {}
00140
00141
00142
00143
00144
00145 static tmp<limitedSurfaceInterpolationScheme<Type> > New
00146 (
00147 const fvMesh& mesh,
00148 Istream& schemeData
00149 );
00150
00151
00152 static tmp<limitedSurfaceInterpolationScheme<Type> > New
00153 (
00154 const fvMesh& mesh,
00155 const surfaceScalarField& faceFlux,
00156 Istream& schemeData
00157 );
00158
00159
00160
00161
00162 virtual ~limitedSurfaceInterpolationScheme();
00163
00164
00165
00166
00167
00168 virtual tmp<surfaceScalarField> limiter
00169 (
00170 const GeometricField<Type, fvPatchField, volMesh>&
00171 ) const = 0;
00172
00173
00174 virtual tmp<surfaceScalarField> weights
00175 (
00176 const GeometricField<Type, fvPatchField, volMesh>&
00177 ) const;
00178 };
00179
00180
00181
00182
00183 }
00184
00185
00186
00187
00188
00189 #define makelimitedSurfaceInterpolationTypeScheme(SS, Type) \
00190 \
00191 defineNamedTemplateTypeNameAndDebug(SS<Type>, 0); \
00192 \
00193 surfaceInterpolationScheme<Type>::addMeshConstructorToTable<SS<Type> > \
00194 add##SS##Type##MeshConstructorToTable_; \
00195 \
00196 surfaceInterpolationScheme<Type>::addMeshFluxConstructorToTable<SS<Type> > \
00197 add##SS##Type##MeshFluxConstructorToTable_; \
00198 \
00199 limitedSurfaceInterpolationScheme<Type>::addMeshConstructorToTable<SS<Type> > \
00200 add##SS##Type##MeshConstructorToLimitedTable_; \
00201 \
00202 limitedSurfaceInterpolationScheme<Type>::addMeshFluxConstructorToTable<SS<Type> >\
00203 add##SS##Type##MeshFluxConstructorToLimitedTable_;
00204
00205 #define makelimitedSurfaceInterpolationScheme(SS) \
00206 \
00207 makelimitedSurfaceInterpolationTypeScheme(SS, scalar) \
00208 makelimitedSurfaceInterpolationTypeScheme(SS, vector) \
00209 makelimitedSurfaceInterpolationTypeScheme(SS, tensor) \
00210 makelimitedSurfaceInterpolationTypeScheme(SS, sphericalTensor)
00211
00212
00213
00214
00215 #ifdef NoRepository
00216 # include "limitedSurfaceInterpolationScheme.C"
00217 #endif
00218
00219
00220
00221 #endif
00222
00223