Skip to content

[Mixed-type mesh] make pygmsh optionally returns meshio object #437

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

Open
BinWang0213 opened this issue Mar 8, 2021 · 2 comments
Open

[Mixed-type mesh] make pygmsh optionally returns meshio object #437

BinWang0213 opened this issue Mar 8, 2021 · 2 comments

Comments

@BinWang0213
Copy link
Contributor

Hi,

I'm using pygmsh and native gmsh api to generate recombined hex-dominant mesh. I may have mixed-type element (say, Hex + Prism).

So this will trigger an error in extract_to_meshio():

assert len(elem_types) == 1

Could you make generate_mesh() optionally returns meshio object?

@nschloe
Copy link
Owner

nschloe commented Mar 9, 2021

MWE please.

@BinWang0213
Copy link
Contributor Author

Here you go
test.zip

Info    : Reading 'sf.pos'...
Info    : Done reading 'sf.pos'
Traceback (most recent call last):
  File "test.py", line 53, in <module>
    mesh = geom.generate_mesh()
  File "D:\anaconda3\lib\site-packages\pygmsh\common\geometry.py", line 363, in generate_mesh
    return extract_to_meshio()
  File "D:\anaconda3\lib\site-packages\pygmsh\helpers.py", line 102, in extract_to_meshio
    assert len(elem_types) == 1
AssertionError

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

No branches or pull requests

2 participants