35 bool Foam::starMesh::starEqualFace
37 const face& boundaryFace,
45 bool cellFaceHappy =
false;
49 forAll(cellFace, cellFaceLabelI)
51 const label curCellFaceLabel = cellFace[cellFaceLabelI];
53 forAll(boundaryFace, bouFaceLabelI)
55 if (boundaryFace[bouFaceLabelI] == curCellFaceLabel)
70 bool boundaryFaceHappy =
true;
72 forAll(boundaryFace, bouFaceLabelI)
74 const label curBouFaceLabel = boundaryFace[bouFaceLabelI];
78 forAll(cellFace, cellFaceLabelI)
80 if (curBouFaceLabel == cellFace[cellFaceLabelI])
87 boundaryFaceHappy = boundaryFaceHappy &&
found;
90 return (cellFaceHappy && boundaryFaceHappy);
94 void Foam::starMesh::markBoundaryFaces()
97 boundaryCellIndices_.setSize(boundary_.size());
98 boundaryCellFaceIndices_.setSize(boundary_.size());
108 curBoundaryCellIDs.
setSize(patchFaces.size());
109 curBoundaryCellFaceIDs.setSize(patchFaces.size());
117 const face& curFace = patchFaces[facei];
120 forAll(facePoints, pointi)
123 PointCells[facePoints[pointi]];
125 forAll(facePointCells, celli)
127 const label curCellIndex = facePointCells[celli];
130 cellFaces_[curCellIndex];
132 forAll(curCellFaces, cellFacei)
134 if (starEqualFace(curFace, curCellFaces[cellFacei]))
140 curBoundaryCellIDs[facei] = curCellIndex;
141 curBoundaryCellFaceIDs[facei] = cellFacei;
153 <<
" does not have neighbour cell."
154 <<
" Face : " <<
endl << curFace <<
endl
155 <<
"PROSTAR Command: vset,news,vlis";
162 && curFace[spI] < starPointIndex_.size()
165 Info<<
"," << starPointIndex_[curFace[spI]];
174 <<
" $ bset,add,vset,all"
182 void Foam::starMesh::collectBoundaryFaces()
184 Info<<
"Collecting boundary faces" <<
endl;
191 const labelList& curBoundaryCellFaceIDs =
192 boundaryCellFaceIndices_[
patchi];
194 forAll(curBoundaryCellIDs, facei)
197 cellFaces_[curBoundaryCellIDs[facei]]
198 [curBoundaryCellFaceIDs[facei]];
202 Info<<
"Finished collecting boundary faces" <<
endl;
#define forAll(list, i)
Loop across all elements in list.
void setSize(const label)
Reset size of List.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
List< label > labelList
A List of labels.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Ostream & endl(Ostream &os)
Add newline and flush stream.
errorManip< error > abort(error &err)
List< labelList > labelListList
A List of labelList.