34 void Foam::starMesh::createPolyBoundary()
36 label nBoundaryFacesFound = 0;
38 polyBoundaryPatchStartIndices_.
setSize(boundary_.
size());
40 label nCreatedFaces = nInternalFaces_;
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 <<
"Problem with face: " << curFace
94 <<
"\nProbably multiple definitions " 95 <<
"of a single boundary face. " <<
endl 96 <<
"Other boundary face: " 97 << curCellFaces[cellFacei]
100 Info<<
"PROSTAR Command: vset,news,vlis";
101 forAll(curCellFaces[cellFacei], spI)
107 curCellFaces[cellFacei][spI] > -1
108 && curCellFaces[cellFacei][spI]
109 < starPointID_.
size()
114 [curCellFaces[cellFacei][spI]];
121 Info<<
" $ bset,add,vset,all" <<
endl;
126 <<
"Problem with face: " << curFace
127 <<
"\nProbably trying to define a " 128 <<
"boundary face on a previously " 129 <<
"matched internal face. " << endl
131 << curCellFaces[cellFacei]
134 Info<<
"PROSTAR Command: vset,news,vlis";
135 forAll(curCellFaces[cellFacei], spI)
141 curCellFaces[cellFacei][spI] > -1
142 && curCellFaces[cellFacei][spI]
143 < starPointID_.
size()
148 [curCellFaces[cellFacei][spI]];
155 Info<<
" $ bset,add,vset,all" <<
endl;
160 cellPolys_[facePointCells[celli]][cellFacei] =
163 nBoundaryFacesFound++;
177 label nMissingFaceFound = 0;
181 const labelList& curFaces = cellPolys_[celli];
185 if (curFaces[facei] < 0)
187 const face& missingFace = cellFaces_[celli][facei];
190 <<
"Missing face found in cell " << celli
191 <<
".\nType: " << cellShapes_[celli].model().name()
192 <<
". STAR cell number: " << starCellID_[celli]
193 <<
". Face: " << missingFace <<
endl;
197 Info<<
"PROSTAR Command: vset,news,vlis";
203 missingFace[spI] > -1
204 && missingFace[spI] < starPointID_.
size()
207 Info<<
"," << starPointID_[missingFace[spI]];
214 Info<<
" $ bset,add,vset,all" <<
endl;
219 if (nMissingFaceFound > 0)
221 Info<<
"Number of unmatched faces: " << nMissingFaceFound <<
endl;
225 meshFaces_.
setSize(nCreatedFaces);
233 const labelList& curFaces = cellPolys_[celli];
237 markupFaces[curFaces[facei]]++;
241 for (
label i = nInternalFaces_; i < markupFaces.size(); i++)
246 label nProblemFacesFound = 0;
248 forAll(markupFaces, facei)
250 if (markupFaces[facei] != 2)
252 const face& problemFace = meshFaces_[facei];
255 <<
"Problem with face " << facei <<
": addressed " 256 << markupFaces[facei] <<
" times (should be 2!). Face: " 257 << problemFace <<
endl;
259 nProblemFacesFound++;
261 Info<<
"PROSTAR Command: vset,news,vlis";
267 problemFace[spI] > -1
268 && problemFace[spI] < starPointID_.
size()
271 Info<<
"," << starPointID_[problemFace[spI]];
278 Info<<
" $ bset,add,vset,all" <<
endl;
282 if (nProblemFacesFound > 0)
284 Info<<
"Number of incorrectly matched faces: " 285 << nProblemFacesFound <<
endl;
288 Info<<
"Number of boundary faces: " << nBoundaryFacesFound <<
endl;
289 Info<<
"Total number of faces: " << nCreatedFaces <<
endl;
294 Foam::starMesh::polyBoundaryPatches(
const polyMesh& pMesh)
296 List<polyPatch*>
p(boundary_.
size());
304 boundary_[patchi].size(),
305 polyBoundaryPatchStartIndices_[patchi],
List< labelList > labelListList
A List of labelList.
#define forAll(list, i)
Loop across all elements in list.
FvWallInfoData< WallInfo, label > label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
void size(const label)
Override size to be inconsistent with allocated storage.
Ostream & endl(Ostream &os)
Add newline and flush stream.
List< label > labelList
A List of labels.
void setSize(const label)
Reset size of List.
static autoPtr< polyPatch > New(const word &patchType, const word &name, const label size, const label start, const label index, const polyBoundaryMesh &bm)
Return a pointer to a new patch created on freestore from.
#define InfoInFunction
Report an information message using Foam::Info.