34 void Foam::meshReader::calcPointCells()
const 36 static const 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];
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_;
List< labelList > labelListList
A List of labelList.
List< faceList > faceListList
void inplaceReorder(const labelUList &oldToNew, ListType &)
Inplace reorder the elements of a list.
#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.
void inplaceRenumber(const labelUList &oldToNew, ListType &)
Inplace renumber the values of a list.
#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.
pointField points_
Points supporting the mesh.
vectorField pointField
pointField is a vectorField.
List< label > labelList
A List of labels.
errorManip< error > abort(error &err)