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

@majosm majosm commented Apr 7, 2022

Copy link
Copy Markdown
Collaborator

Possibly supersedes #292.

@majosm

majosm commented Apr 7, 2022

Copy link
Copy Markdown
Collaborator Author

@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

alexfikl commented Apr 7, 2022

Copy link
Copy Markdown
Collaborator

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

majosm commented Apr 7, 2022

Copy link
Copy Markdown
Collaborator Author

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

majosm commented Apr 7, 2022

Copy link
Copy Markdown
Collaborator Author

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

inducer commented Apr 10, 2022

Copy link
Copy Markdown
Owner

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