Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added decompose_polyhedra property in OpenFOAMReader #2563

Merged

Conversation

Failxxx
Copy link
Contributor

@Failxxx Failxxx commented May 5, 2022

Overview

This new feature exposes the DecomposePolyhedra property from vtk to OpenFOAMReader.

This resolves #2559.

Details

We would like to expose the DecomposePolyhedra property from the vtkOpenFOAMReader (class definition). So we decided to add a property named decompose_polyhedra to OpenFOAMReader.

@github-actions github-actions bot added the enhancement Changes that enhance the library label May 5, 2022
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

🚀 Thanks for opening your first pull request in PyVista! 🚀 Please make sure you read (skim 😉) our Contributing Guide and abide by our Code of Conduct.
A few things to keep in mind:

  • Remember to run the tests locally to make debugging issues easier.
  • If you need help writing tests, take a look at the existing ones for inspiration. If you do not know where to start, let @pyvista/developers know and we will walk you through it.
  • All new features should be documented. It helps to write the docstrings for your functions/classes before writing the code. This will help you think about your code design and results in better code.
  • No matter what, we are really grateful that you put in the effort to open this PR! ⭐

@codecov
Copy link

codecov bot commented May 5, 2022

Codecov Report

Merging #2563 (cf8a679) into main (87ea7d5) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main    #2563   +/-   ##
=======================================
  Coverage   93.72%   93.72%           
=======================================
  Files          75       75           
  Lines       16120    16128    +8     
=======================================
+ Hits        15108    15116    +8     
  Misses       1012     1012           

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.

Can you add a test for this behavior? We don't have suitable data, but we can test something like

reader.decompose_polyhedra = False
assert not decompose_polyhedra
reader.decompose_polyhedra = True
assert decompose_polyhedra

pyvista/utilities/reader.py Show resolved Hide resolved
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.

LGTM. Great first PR!

@akaszynski akaszynski merged commit e37b5b4 into pyvista:main May 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Changes that enhance the library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add DecomposePolyhedra option to OpenFOAMReader
3 participants