Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

akaszynski
Copy link
Member

Check polyhedron faces when comparing the equivalency of two UnstructuredGrids.

@pyvista-bot pyvista-bot added the bug Uh-oh! Something isn't working as expected. label Sep 13, 2025
@akaszynski akaszynski changed the title check polyhedron_faces Check polyhedron_faces when determining equivalency Sep 13, 2025
@pyvista-bot
Copy link
Contributor

pyvista-bot commented Sep 13, 2025

@pyvista-bot pyvista-bot temporarily deployed to pull request September 13, 2025 05:50 Inactive
Copy link

codecov bot commented Sep 13, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.40%. Comparing base (c556a05) to head (4e308fd).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7951   +/-   ##
=======================================
  Coverage   96.40%   96.40%           
=======================================
  Files         150      150           
  Lines       32682    32684    +2     
  Branches     4118     4118           
=======================================
+ Hits        31508    31510    +2     
  Misses        570      570           
  Partials      604      604           

@MatthewFlamm
Copy link
Contributor

Why this instead of the cell array to cover all cell types?

@akaszynski
Copy link
Member Author

Why this instead of the cell array to cover all cell types?

At least in the versions I've tested (9.4 and 9.5.X), polyhedron cells are stored in two separate vtkCellArrays.

There's a discussion on why and how this was changed:
https://discourse.vtk.org/t/polyhedral-cells-storing-faces-as-vtkcellarray/5656

Given the failures for earlier versions, we're going to have to include backwards compatibility for this check.

@pyvista-bot pyvista-bot temporarily deployed to pull request September 13, 2025 14:57 Inactive
Copy link
Contributor

@MatthewFlamm MatthewFlamm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Should we also be checking the cell array is equal for other cell types?

@akaszynski
Copy link
Member Author

Should we also be checking the cell array is equal for other cell types?

I don't think so. We only included it here to make sure that we're genuinely changing the polyhedrons and not the underlying cell array. It's helpful for this test since VTK has been changing their API and if it's changed again, we can catch it here.

@MatthewFlamm
Copy link
Contributor

I don't think so. We only included it here to make sure that we're genuinely changing the polyhedrons and not the underlying cell array. It's helpful for this test since VTK has been changing their API and if it's changed again, we can catch it here.

Sorry I wasnt clear. I didn't mean due this test here. I meant to check the cell arrays during the equivalency check? I don't see this currently.

@akaszynski
Copy link
Member Author

I don't think so. We only included it here to make sure that we're genuinely changing the polyhedrons and not the underlying cell array. It's helpful for this test since VTK has been changing their API and if it's changed again, we can catch it here.

Sorry I wasnt clear. I didn't mean due this test here. I meant to check the cell arrays during the equivalency check? I don't see this currently.

It we don't we should.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Uh-oh! Something isn't working as expected.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants