mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
BUG: allowed sliver triangle to be collapsed down to illegal 2 vertex face.
Added simple check to disable collapsing faces to <3 vertices.
This commit is contained in:
@ -203,12 +203,45 @@ Foam::label Foam::removePoints::countPointUsage
|
|||||||
pointCanBeDeleted[pointI] = true;
|
pointCanBeDeleted[pointI] = true;
|
||||||
nDeleted++;
|
nDeleted++;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
edge0.clear();
|
edge0.clear();
|
||||||
edge1.clear();
|
edge1.clear();
|
||||||
|
|
||||||
|
|
||||||
|
// Protect any points on faces that would collapse down to nothing
|
||||||
|
// No particular intelligence so might protect too many points
|
||||||
|
forAll(mesh_.faces(), faceI)
|
||||||
|
{
|
||||||
|
const face& f = mesh_.faces()[faceI];
|
||||||
|
|
||||||
|
label nCollapse = 0;
|
||||||
|
forAll(f, fp)
|
||||||
|
{
|
||||||
|
if (pointCanBeDeleted[f[fp]])
|
||||||
|
{
|
||||||
|
nCollapse++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((f.size() - nCollapse) < 3)
|
||||||
|
{
|
||||||
|
// Just unmark enough points
|
||||||
|
forAll(f, fp)
|
||||||
|
{
|
||||||
|
if (pointCanBeDeleted[f[fp]])
|
||||||
|
{
|
||||||
|
pointCanBeDeleted[f[fp]] = false;
|
||||||
|
--nCollapse;
|
||||||
|
if (nCollapse == 0)
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Point can be deleted only if all processors want to delete it
|
// Point can be deleted only if all processors want to delete it
|
||||||
syncTools::syncPointList
|
syncTools::syncPointList
|
||||||
(
|
(
|
||||||
|
|||||||
Reference in New Issue
Block a user