Fix error in checking paired faces in ExternalFaces filter

The `ExternalFaces` filter uses hash codes to find duplicate (i.e.
internal) faces. The issue with hash codes is that you have to deal with
unique entries that have identical hashes. The worklet to count how many
unique, unmatched faces were associated with each hash code was correct.
However, the code to then grab the ith unique face in a hash was wrong.
This has been fixed.

Fixes #789
This commit is contained in:
Kenneth Moreland 2023-07-03 18:56:42 -04:00
parent f9d88bc3c5
commit 194ddb5b41
2 changed files with 13 additions and 1 deletions

@ -0,0 +1,8 @@
# Fixed error in checking paired faces in ExternalFaces filter
The `ExternalFaces` filter uses hash codes to find duplicate (i.e.
internal) faces. The issue with hash codes is that you have to deal with
unique entries that have identical hashes. The worklet to count how many
unique, unmatched faces were associated with each hash code was correct.
However, the code to then grab the ith unique face in a hash was wrong.
This has been fixed.

@ -452,8 +452,12 @@ private:
cellSet.GetIndices(originCells[myIndex]),
myFace);
bool foundPair = false;
for (vtkm::IdComponent otherIndex = myIndex + 1; otherIndex < numCellsOnHash; otherIndex++)
for (vtkm::IdComponent otherIndex = 0; otherIndex < numCellsOnHash; otherIndex++)
{
if (otherIndex == myIndex)
{
continue;
}
vtkm::Id3 otherFace;
vtkm::exec::CellFaceCanonicalId(originFaces[otherIndex],
cellSet.GetCellShape(originCells[otherIndex]),