34 void Foam::meshReader::calcPointCells()
const
36 const static label UNIT_POINT_CELLS = 12;
41 <<
"pointCells already calculated"
52 ptCells[i].setSize(UNIT_POINT_CELLS);
70 const faceList& faces = cFaces[cellI];
80 label curPoint = labels[j];
81 labelList& curPointCells = ptCells[curPoint];
82 label curCount = cellCount[curPoint];
87 for (label
f = 0;
f < curCount;
f++)
89 if (curPointCells[
f] == cellI)
99 if (curPointCells.size() <= curCount)
101 curPointCells.
setSize(curPointCells.size()*2);
105 curPointCells[curCount] = cellI;
108 cellCount[curPoint]++;
121 ptCells[i].setSize(cellCount[i]);
122 if (cellCount[i] > 0)
124 oldToNew[i] = pointI++;
129 if (nPoints > pointI)
131 Info<<
"removing " << (nPoints - pointI) <<
" unused points" <<
endl;
139 adjustedPoints.setSize(nPoints);
143 ptCells.setSize(nPoints);
168 return *pointCellsPtr_;