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:
parent
f9d88bc3c5
commit
194ddb5b41
8
docs/changelog/external-face-miss-pair.md
Normal file
8
docs/changelog/external-face-miss-pair.md
Normal file
@ -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]),
|
||||
|
Loading…
Reference in New Issue
Block a user