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