sammMesh.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 #ifndef sammMesh_H
00039 #define sammMesh_H
00040
00041 #include "polyMesh.H"
00042 #include "cellShape.H"
00043 #include "cellList.H"
00044 #include "polyPatchList.H"
00045
00046 #ifndef namespaceFoam
00047 #define namespaceFoam
00048 using namespace Foam;
00049 #endif
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059 class sammMesh
00060 {
00061
00062
00063
00064 fileName casePrefix_;
00065
00066
00067 const Time& runTime_;
00068
00069
00070 pointField points_;
00071
00072
00073 cellShapeList cellShapes_;
00074
00075
00076 faceListList boundary_;
00077
00078
00079 wordList patchTypes_;
00080
00081
00082 word defaultFacesName_;
00083
00084
00085 word defaultFacesType_;
00086
00087
00088 wordList patchNames_;
00089
00090
00091 wordList patchPhysicalTypes_;
00092
00093
00094 labelList starPointLabelLookup_;
00095
00096
00097 labelList starCellLabelLookup_;
00098
00099
00100 faceListList cellFaces_;
00101
00102
00103 faceList meshFaces_;
00104
00105
00106 cellList cellPolys_;
00107
00108
00109 label nInternalFaces_;
00110
00111
00112 labelList polyBoundaryPatchStartIndices_;
00113
00114
00115
00116
00117 mutable labelListList* pointCellsPtr_;
00118
00119
00120 bool isShapeMesh_;
00121
00122
00123
00124
00125 static const cellModel* unknownPtr_;
00126 static const cellModel* hexPtr_;
00127 static const cellModel* wedgePtr_;
00128 static const cellModel* prismPtr_;
00129 static const cellModel* pyrPtr_;
00130 static const cellModel* tetPtr_;
00131 static const cellModel* tetWedgePtr_;
00132
00133 static const cellModel* sammTrim1Ptr_;
00134 static const cellModel* sammTrim2Ptr_;
00135 static const cellModel* sammTrim3Ptr_;
00136 static const cellModel* sammTrim4Ptr_;
00137 static const cellModel* sammTrim5Ptr_;
00138 static const cellModel* sammTrim8Ptr_;
00139
00140 static const label shapeFaceLookup[19][9];
00141
00142
00143
00144 static List<const cellModel*> sammShapeLookup;
00145 static List<const label*> sammAddressingTable;
00146
00147
00148
00149
00150 sammMesh(const sammMesh&);
00151
00152
00153 void operator=(const sammMesh&);
00154
00155
00156
00157 void fillSammCellShapeTable();
00158 void fillSammAddressingTable();
00159
00160
00161
00162 void readPoints(const scalar scaleFactor);
00163
00164
00165
00166 void readCells();
00167
00168 void addRegularCell
00169 (
00170 const labelList& labels,
00171 const label nCreatedCells
00172 );
00173
00174 void addSAMMcell
00175 (
00176 const label typeFlag,
00177 const labelList& globalLabels,
00178 const label nCreatedCells
00179 );
00180
00181
00182
00183 void readBoundary();
00184
00185
00186
00187
00188 void fixCollapsedEdges();
00189
00190
00191 void readCouples();
00192
00193
00194 void calcPointCells() const;
00195
00196 const labelListList& pointCells() const;
00197
00198
00199 void createBoundaryFaces();
00200
00201
00202
00203 bool sammEqualFace
00204 (
00205 const face& boundaryFace,
00206 const face& cellFace
00207 ) const;
00208
00209
00210 void purgeCellShapes();
00211
00212
00213 void createPolyCells();
00214
00215
00216
00217 void createPolyBoundary();
00218
00219
00220 void createPolyMeshData();
00221
00222
00223 List<polyPatch* > polyBoundaryPatches(const polyMesh&);
00224
00225
00226 public:
00227
00228
00229
00230
00231
00232
00233
00234 sammMesh
00235 (
00236 const fileName& prefix,
00237 const Time& rt,
00238 const scalar scaleFactor
00239 );
00240
00241
00242
00243
00244 ~sammMesh();
00245
00246
00247
00248
00249
00250 void writeMesh();
00251
00252
00253
00254
00255
00256
00257
00258
00259
00260 };
00261
00262
00263
00264
00265 #endif
00266
00267
Copyright © 2000-2009 OpenCFD Ltd