33 void Foam::sammMesh::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());
91 label nNewVertices = 0;
100 label curLabel = vertexLabels[vI];
106 for (
label searchI = 0; searchI < nNewVertices; searchI++)
108 if (newFace[searchI] == curLabel)
118 newFace[nNewVertices] = curLabel;
123 newFace.setSize(nNewVertices);
129 if (nNewVertices < 3)
132 <<
"face " << facei <<
" of cell " << celli
133 <<
" is collapsed down to a point or edge, which is " 134 <<
"not permitted" <<
endl 135 <<
"original face: " << vertexLabels <<
endl 136 <<
"purged face: " << newFace <<
endl 141 vertexLabels = newFace;
#define forAll(list, i)
Loop across all elements in list.
FvWallInfoData< WallInfo, label > 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.