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