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