starMesh.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
00049
00050 #ifndef starMesh_H
00051 #define starMesh_H
00052
00053 #include "polyMesh.H"
00054 #include "cellShape.H"
00055 #include "cellList.H"
00056 #include "polyPatchList.H"
00057 #include "coupledFacePair.H"
00058 #include "IFstream.H"
00059
00060
00061
00062 #ifndef namespaceFoam
00063 #define namespaceFoam
00064 using namespace Foam;
00065 #endif
00066
00067
00068
00069
00070
00071
00072 class starMesh
00073 {
00074
00075
00076
00077 fileName casePrefix_;
00078
00079
00080 const Time& runTime_;
00081
00082
00083 pointField points_;
00084
00085
00086 cellShapeList cellShapes_;
00087
00088
00089 faceListList boundary_;
00090
00091
00092 wordList patchTypes_;
00093
00094
00095 word defaultFacesName_;
00096
00097
00098 word defaultFacesType_;
00099
00100
00101 wordList patchNames_;
00102
00103
00104 wordList patchPhysicalTypes_;
00105
00106
00107 labelList starPointLabelLookup_;
00108
00109
00110 labelList starPointID_;
00111
00112
00113 labelList starCellID_;
00114
00115
00116 labelList starCellLabelLookup_;
00117
00118
00119 labelList starCellPermutation_;
00120
00121
00122 faceListList cellFaces_;
00123
00124
00125
00126 labelListList boundaryCellIDs_;
00127
00128
00129
00130 labelListList boundaryCellFaceIDs_;
00131
00132
00133 faceList meshFaces_;
00134
00135
00136 cellList cellPolys_;
00137
00138
00139 label nInternalFaces_;
00140
00141
00142 labelList polyBoundaryPatchStartIndices_;
00143
00144
00145
00146
00147 mutable labelListList* pointCellsPtr_;
00148
00149
00150 PtrList<coupledFacePair> couples_;
00151
00152
00153 bool isShapeMesh_;
00154
00155
00156
00157
00158 static const scalar smallMergeTol_;
00159
00160
00161 static const scalar cpMergePointTol_;
00162
00163
00164 static const cellModel* unknownPtr_;
00165 static const cellModel* tetPtr_;
00166 static const cellModel* pyrPtr_;
00167 static const cellModel* tetWedgePtr_;
00168 static const cellModel* prismPtr_;
00169 static const cellModel* wedgePtr_;
00170 static const cellModel* hexPtr_;
00171
00172 static const cellModel* sammTrim1Ptr_;
00173 static const cellModel* sammTrim2Ptr_;
00174 static const cellModel* sammTrim3Ptr_;
00175 static const cellModel* sammTrim4Ptr_;
00176 static const cellModel* sammTrim5Ptr_;
00177 static const cellModel* sammTrim8Ptr_;
00178
00179
00180 static const label regularAddressingTable[6][8];
00181
00182
00183 static const label sammAddressingTable[9][12];
00184
00185 static const label sammFacePermutationTable[24][8];
00186
00187 static const label shapeFaceLookup[19][9];
00188
00189
00190
00191
00192
00193 starMesh(const starMesh&);
00194
00195
00196 void operator=(const starMesh&);
00197
00198
00199
00200 static label readVtxLabel(IFstream&);
00201
00202
00203 static scalar readVtxCmpt(IFstream&);
00204
00205
00206 static void readToNl(IFstream&);
00207
00208
00209 void readPoints(const scalar scaleFactor);
00210
00211
00212 void readCells();
00213
00214 void addRegularCell
00215 (
00216 const labelList& labels,
00217 const label nCreatedCells
00218 );
00219
00220 void addSAMMcell
00221 (
00222 const labelList& labels,
00223 const label nCreatedCells
00224 );
00225
00226
00227 void readBoundary();
00228
00229
00230
00231 void fixCollapsedEdges();
00232
00233
00234 void readCouples();
00235
00236
00237 void createCoupleMatches();
00238
00239
00240 void calcPointCells() const;
00241
00242 const labelListList& pointCells() const;
00243
00244
00245 void markBoundaryFaces();
00246
00247
00248 void collectBoundaryFaces();
00249
00250
00251
00252 bool starEqualFace
00253 (
00254 const face& boundaryFace,
00255 const face& cellFace
00256 ) const;
00257
00258
00259 void mergeCoupleFacePoints();
00260
00261
00262
00263 struct pointIndex
00264 {
00265 label label_;
00266 double index_;
00267 };
00268
00269
00270 void purgeCellShapes();
00271
00272
00273 void createPolyCells();
00274
00275
00276
00277 void createPolyBoundary();
00278
00279
00280 void createPolyMeshData();
00281
00282
00283 List<polyPatch*> polyBoundaryPatches(const polyMesh&);
00284
00285
00286
00287 void clearExtraStorage();
00288
00289
00290 public:
00291
00292
00293
00294
00295 starMesh
00296 (
00297 const fileName& prefix,
00298 const Time& rt,
00299 const scalar scaleFactor
00300 );
00301
00302
00303
00304
00305 ~starMesh();
00306
00307
00308
00309
00310
00311 void writeMesh();
00312 };
00313
00314
00315
00316
00317 #endif
00318
00319
Copyright © 2000-2009 OpenCFD Ltd