33 void Foam::starMesh::fixCollapsedEdges()
39 cellFaces_[celli] = cellShapes_[celli].faces();
47 faceList& curFaces = cellFaces_[celli];
51 face& vertexLabels = curFaces[facei];
53 bool duplicatesFound =
false;
57 label curLabel = vertexLabels[vI];
61 forAll(vertexLabels, searchI)
63 if (vertexLabels[searchI] == curLabel)
71 duplicatesFound =
true;
89 face newFace(vertexLabels.size());
90 label nNewVertices = 0;
99 label curLabel = vertexLabels[vI];
105 for (
label searchI = 0; searchI < nNewVertices; searchI++)
107 if (newFace[searchI] == curLabel)
117 newFace[nNewVertices] = curLabel;
122 newFace.setSize(nNewVertices);
128 if (nNewVertices < 3)
131 <<
"Face " << facei <<
" of cell " << celli
132 <<
" is colapsed down to a point or edge, which is " 133 <<
"not permitted" <<
endl 134 <<
"original face: " << vertexLabels <<
endl 135 <<
"purged face: " << newFace <<
endl 140 vertexLabels = newFace;
#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.
errorManip< error > abort(error &err)
void setSize(const label)
Reset size of List.