34 void starMesh::createPolyBoundary()
36 label nBoundaryFacesFound = 0;
38 polyBoundaryPatchStartIndices_.setSize(boundary_.size());
40 label nCreatedFaces = nInternalFaces_;
46 const faceList& curShapePatch = boundary_[patchI];
48 polyBoundaryPatchStartIndices_[patchI] = nCreatedFaces;
50 forAll (curShapePatch, faceI)
54 const face& curFace = curShapePatch[faceI];
56 meshFaces_[nCreatedFaces] = curFace;
65 PointCells[facePoints[pointI]];
67 forAll(facePointCells, cellI)
70 cellFaces_[facePointCells[cellI]];
72 forAll(curCellFaces, cellFaceI)
74 if (curCellFaces[cellFaceI] == curFace)
82 cellPolys_[facePointCells[cellI]][cellFaceI]
88 cellPolys_[facePointCells[cellI]][cellFaceI]
93 <<
"void starMesh::createPolyBoundary()"
94 <<
": Problem with face: " << curFace
95 <<
"\nProbably multiple definitions "
96 <<
"of a single boundary face. " <<
endl
97 <<
"Other boundary face: "
98 << curCellFaces[cellFaceI]
101 Info <<
"PROSTAR Command: vset,news,vlis";
102 forAll (curCellFaces[cellFaceI], spI)
108 curCellFaces[cellFaceI][spI] > -1
109 && curCellFaces[cellFaceI][spI]
110 < starPointID_.
size()
116 [curCellFaces[cellFaceI][spI]];
123 Info <<
" $ bset,add,vset,all" <<
endl;
128 <<
"void starMesh::createPolyBoundary()"
129 <<
": Problem with face: " << curFace
130 <<
"\nProbably trying to define a "
131 <<
"boundary face on a previously "
132 <<
"matched internal face. " << endl
134 << curCellFaces[cellFaceI]
137 Info <<
"PROSTAR Command: vset,news,vlis";
138 forAll (curCellFaces[cellFaceI], spI)
144 curCellFaces[cellFaceI][spI] > -1
145 && curCellFaces[cellFaceI][spI]
146 < starPointID_.
size()
152 [curCellFaces[cellFaceI][spI]];
159 Info <<
" $ bset,add,vset,all" <<
endl;
164 cellPolys_[facePointCells[cellI]][cellFaceI] =
167 nBoundaryFacesFound++;
181 label nMissingFaceFound = 0;
183 forAll (cellPolys_, cellI)
185 const labelList& curFaces = cellPolys_[cellI];
189 if (curFaces[faceI] < 0)
191 const face& missingFace = cellFaces_[cellI][faceI];
193 Info <<
"starMesh::createPolyBoundary() : "
194 <<
"missing face found in cell " << cellI
195 <<
".\nType: " << cellShapes_[cellI].model().name()
196 <<
". STAR cell number: " << starCellID_[cellI]
197 <<
". Face: " << missingFace <<
endl;
201 Info <<
"PROSTAR Command: vset,news,vlis";
207 missingFace[spI] > -1
208 && missingFace[spI] < starPointID_.
size()
211 Info <<
"," << starPointID_[missingFace[spI]];
218 Info <<
" $ bset,add,vset,all" <<
endl;
223 if (nMissingFaceFound > 0)
225 Info <<
"Number of unmatched faces: " << nMissingFaceFound <<
endl;
229 meshFaces_.setSize(nCreatedFaces);
233 labelList markupFaces(meshFaces_.size(), 0);
235 forAll (cellPolys_, cellI)
237 const labelList& curFaces = cellPolys_[cellI];
241 markupFaces[curFaces[faceI]]++;
245 for (label i = nInternalFaces_; i < markupFaces.size(); i++)
250 label nProblemFacesFound = 0;
252 forAll (markupFaces, faceI)
254 if (markupFaces[faceI] != 2)
256 const face& problemFace = meshFaces_[faceI];
258 Info <<
"starMesh::createPolyBoundary() : "
259 <<
"problem with face " << faceI <<
": addressed "
260 << markupFaces[faceI] <<
" times (should be 2!). Face: "
261 << problemFace <<
endl;
263 nProblemFacesFound++;
265 Info <<
"PROSTAR Command: vset,news,vlis";
271 problemFace[spI] > -1
272 && problemFace[spI] < starPointID_.
size()
275 Info <<
"," << starPointID_[problemFace[spI]];
282 Info <<
" $ bset,add,vset,all" <<
endl;
286 if (nProblemFacesFound > 0)
288 Info <<
"Number of incorrectly matched faces: "
289 << nProblemFacesFound <<
endl;
292 Info <<
"Number of boundary faces: " << nBoundaryFacesFound <<
endl;
293 Info <<
"Total number of faces: " << nCreatedFaces <<
endl;
301 forAll (boundary_, patchI)
307 boundary_[patchI].size(),
308 polyBoundaryPatchStartIndices_[patchI],