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
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048 #ifndef fvMesh_H
00049 #define fvMesh_H
00050
00051 #include "polyMesh.H"
00052 #include "lduMesh.H"
00053 #include "primitiveMesh.H"
00054 #include "fvBoundaryMesh.H"
00055 #include "surfaceInterpolation.H"
00056 #include "DimensionedField.H"
00057 #include "volFieldsFwd.H"
00058 #include "surfaceFieldsFwd.H"
00059 #include "pointFieldsFwd.H"
00060 #include "SlicedGeometricField.H"
00061 #include "slicedVolFieldsFwd.H"
00062 #include "slicedSurfaceFieldsFwd.H"
00063 #include "className.H"
00064
00065
00066
00067 namespace Foam
00068 {
00069
00070 class fvMeshLduAddressing;
00071 class volMesh;
00072
00073
00074
00075
00076
00077
00078 class fvMesh
00079 :
00080 public polyMesh,
00081 public lduMesh,
00082 public surfaceInterpolation
00083 {
00084
00085
00086
00087 fvBoundaryMesh boundary_;
00088
00089
00090
00091
00092 mutable fvMeshLduAddressing* lduPtr_;
00093
00094
00095
00096
00097
00098 mutable label curTimeIndex_;
00099
00100
00101 mutable void* VPtr_;
00102
00103
00104 mutable DimensionedField<scalar, volMesh>* V0Ptr_;
00105
00106
00107 mutable DimensionedField<scalar, volMesh>* V00Ptr_;
00108
00109
00110 mutable slicedSurfaceVectorField* SfPtr_;
00111
00112
00113 mutable surfaceScalarField* magSfPtr_;
00114
00115
00116 mutable slicedVolVectorField* CPtr_;
00117
00118
00119 mutable slicedSurfaceVectorField* CfPtr_;
00120
00121
00122 mutable surfaceScalarField* phiPtr_;
00123
00124
00125
00126
00127
00128
00129
00130 void clearGeomNotOldVol();
00131
00132
00133 void clearGeom();
00134
00135
00136 void clearAddressing();
00137
00138
00139
00140
00141 void makeSf() const;
00142 void makeMagSf() const;
00143
00144 void makeC() const;
00145 void makeCf() const;
00146
00147
00148
00149 fvMesh(const fvMesh&);
00150
00151
00152 void operator=(const fvMesh&);
00153
00154
00155 public:
00156
00157
00158
00159 typedef fvMesh Mesh;
00160 typedef fvBoundaryMesh BoundaryMesh;
00161
00162
00163
00164 ClassName("fvMesh");
00165
00166
00167
00168
00169
00170 explicit fvMesh(const IOobject& io);
00171
00172
00173
00174 fvMesh
00175 (
00176 const IOobject& io,
00177 const pointField& points,
00178 const faceList& faces,
00179 const labelList& allOwner,
00180 const labelList& allNeighbour,
00181 const bool syncPar = true
00182 );
00183
00184
00185
00186
00187 fvMesh
00188 (
00189 const IOobject& io,
00190 const pointField& points,
00191 const faceList& faces,
00192 const cellList& cells,
00193 const bool syncPar = true
00194 );
00195
00196
00197
00198
00199 virtual ~fvMesh();
00200
00201
00202
00203
00204
00205
00206
00207 void addFvPatches
00208 (
00209 const List<polyPatch*>&,
00210 const bool validBoundary = true
00211 );
00212
00213
00214
00215 virtual readUpdateState readUpdate();
00216
00217
00218
00219
00220
00221 const Time& time() const
00222 {
00223 return polyMesh::time();
00224 }
00225
00226
00227 virtual const objectRegistry& db() const
00228 {
00229 return *this;
00230 }
00231
00232
00233
00234
00235 const word& name() const
00236 {
00237 return polyMesh::name();
00238 }
00239
00240
00241 const fvBoundaryMesh& boundary() const;
00242
00243
00244 virtual const lduAddressing& lduAddr() const;
00245
00246
00247
00248 virtual lduInterfacePtrsList interfaces() const
00249 {
00250 return boundary().interfaces();
00251 }
00252
00253
00254 const unallocLabelList& owner() const
00255 {
00256 return lduAddr().lowerAddr();
00257 }
00258
00259
00260 const unallocLabelList& neighbour() const
00261 {
00262 return lduAddr().upperAddr();
00263 }
00264
00265
00266 const DimensionedField<scalar, volMesh>& V() const;
00267
00268
00269 const DimensionedField<scalar, volMesh>& V0() const;
00270
00271
00272 const DimensionedField<scalar, volMesh>& V00() const;
00273
00274
00275 const surfaceVectorField& Sf() const;
00276
00277
00278 const surfaceScalarField& magSf() const;
00279
00280
00281 const surfaceScalarField& phi() const;
00282
00283
00284 const volVectorField& C() const;
00285
00286
00287 const surfaceVectorField& Cf() const;
00288
00289
00290
00291
00292
00293 void clearOut();
00294
00295
00296 virtual void updateMesh(const mapPolyMesh& mpm);
00297
00298
00299 virtual tmp<scalarField> movePoints(const vectorField&);
00300
00301
00302 virtual void mapFields(const mapPolyMesh& mpm);
00303
00304
00305
00306 void removeFvBoundary();
00307
00308
00309 surfaceScalarField& setPhi();
00310
00311
00312 DimensionedField<scalar, volMesh>& setV0();
00313
00314
00315
00316
00317
00318 virtual bool writeObjects
00319 (
00320 IOstream::streamFormat fmt,
00321 IOstream::versionNumber ver,
00322 IOstream::compressionType cmp
00323 ) const;
00324
00325
00326 virtual bool write() const;
00327
00328
00329
00330
00331 bool operator!=(const fvMesh&) const;
00332 bool operator==(const fvMesh&) const;
00333 };
00334
00335
00336
00337
00338 }
00339
00340
00341
00342 #ifdef NoRepository
00343 # include "fvPatchFvMeshTemplates.C"
00344 #endif
00345
00346
00347
00348 #endif
00349
00350
Copyright © 2000-2007 OpenCFD Ltd