Skip to content

Optionally return volume-tag-to-element map from read_gmsh #320

Merged
inducer merged 4 commits into
inducer:mainfrom
majosm:read-gmsh-return-volume-tags
Apr 10, 2022
Merged

Optionally return volume-tag-to-element map from read_gmsh #320
inducer merged 4 commits into
inducer:mainfrom
majosm:read-gmsh-return-volume-tags

Conversation

@majosm
Copy link
Copy Markdown
Collaborator

@majosm majosm commented Apr 7, 2022

Possibly supersedes #292.

@majosm
Copy link
Copy Markdown
Collaborator Author

majosm commented Apr 7, 2022

@inducer, @alexfikl Any ideas how I could appease pylint here?

************* Module meshmode.mesh.io
[926](https://github.com/inducer/meshmode/runs/5873887120?check_suite_focus=true#step:3:926)
meshmode/mesh/io.py:354:14: E1101: Instance of 'tuple' has no 'vertices' member (no-member)
[927](https://github.com/inducer/meshmode/runs/5873887120?check_suite_focus=true#step:3:927)
meshmode/mesh/io.py:356:16: E1101: Instance of 'tuple' has no 'vertices' member (no-member)
[928](https://github.com/inducer/meshmode/runs/5873887120?check_suite_focus=true#step:3:928)
************* Module test_mesh
[929](https://github.com/inducer/meshmode/runs/5873887120?check_suite_focus=true#step:3:929)
test/test_mesh.py:548:12: E1101: Instance of 'tuple' has no 'groups' member (no-member)
[930](https://github.com/inducer/meshmode/runs/5873887120?check_suite_focus=true#step:3:930)
test/test_mesh.py:549:48: E1101: Instance of 'tuple' has no 'vertices' member (no-member)
[931](https://github.com/inducer/meshmode/runs/5873887120?check_suite_focus=true#step:3:931)
test/test_mesh.py:712:26: E1101: Instance of 'tuple' has no 'groups' member (no-member)
[932](https://github.com/inducer/meshmode/runs/5873887120?check_suite_focus=true#step:3:932)
test/test_mesh.py:879:15: E1101: Instance of 'tuple' has no 'groups' member (no-member)
[933](https://github.com/inducer/meshmode/runs/5873887120?check_suite_focus=true#step:3:933)
test/test_mesh.py:886:42: E1101: Instance of 'tuple' has no 'vertices' member (no-member)
[934](https://github.com/inducer/meshmode/runs/5873887120?check_suite_focus=true#step:3:934)
test/test_mesh.py:893:30: E1101: Instance of 'tuple' has no 'vertices' member (no-member)

It doesn't seem to like the fact that the result type of read_gmsh depends on its arguments (it thinks it's always a tuple, when AFAICT it's not.)

@alexfikl
Copy link
Copy Markdown
Collaborator

alexfikl commented Apr 7, 2022

Any ideas how I could appease pylint here?

As far as I know, pylint isn't smart enough to figure this out, so probably best to just add some ignores :\

or maybe just confuse it sufficiently...
@majosm
Copy link
Copy Markdown
Collaborator Author

majosm commented Apr 7, 2022

Looks like 5d9dcb9 fixed it, somehow...

@majosm majosm marked this pull request as ready for review April 7, 2022 21:08
@majosm majosm requested a review from inducer April 7, 2022 21:08
@majosm
Copy link
Copy Markdown
Collaborator Author

majosm commented Apr 7, 2022

Seems like this is the way to go; it's cleaner than anything I've been able to come up with otherwise. In some ways it's unsatisfying, because it sidesteps my sense that if we're tagging surfaces inside the mesh, we ought to be tagging volumes as well; but I haven't been able to find a nice way to integrate that into the current code structure. I guess this approach could still be consistent with that, as long as we think about a given Mesh as only ever representing a single volume.

@inducer inducer merged commit 488b613 into inducer:main Apr 10, 2022
@inducer
Copy link
Copy Markdown
Owner

inducer commented Apr 10, 2022

LGTM, thanks!

This was referenced Apr 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants