33 void Foam::starMesh::createPolyCells()
45 cell& curCell = cellPolys_[celli];
47 curCell.
setSize(cellFaces_[celli].size());
54 maxFaces += cellFaces_[celli].
size();
57 Info<<
"Maximum possible number of faces in mesh: " << maxFaces <<
endl;
76 const faceList& curFaces = cellFaces_[celli];
82 labelList faceOfNeiCell(curFaces.size(), -1);
84 label nNeighbours = 0;
90 if (cellPolys_[celli][facei] >= 0)
continue;
94 const face& curFace = curFaces[facei];
103 const labelList& curNeighbours = PointCells[curPoints[pointi]];
106 forAll(curNeighbours, neiI)
108 label curNei = curNeighbours[neiI];
115 const faceList& searchFaces = cellFaces_[curNei];
117 forAll(searchFaces, neiFacei)
119 if (searchFaces[neiFacei] == curFace)
125 neiCells[facei] = curNei;
126 faceOfNeiCell[facei] = neiFacei;
141 for (
label neiSearch = 0; neiSearch < nNeighbours; neiSearch++)
149 if (neiCells[ncI] > -1 && neiCells[ncI] < minNei)
152 minNei = neiCells[ncI];
159 meshFaces_[nInternalFaces_] = curFaces[nextNei];
162 cellPolys_[celli][nextNei] = nInternalFaces_;
165 cellPolys_[neiCells[nextNei]][faceOfNeiCell[nextNei]] =
169 neiCells[nextNei] = -1;
177 <<
"Error in internal face insertion" List< labelList > labelListList
A List of labelList.
#define forAll(list, i)
Loop across all elements in list.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
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.
errorManip< error > abort(error &err)
void setSize(const label)
Reset size of List.