-
-
Notifications
You must be signed in to change notification settings - Fork 169
fix physical tags when generating the mesh #423
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
base: main
Are you sure you want to change the base?
fix physical tags when generating the mesh #423
Conversation
|
I not super-happy with the way I fixed this issue, but it works for my applications. |
|
Do not merge. The geometrical tag must also be set to get this properly working, I am adding it. |
12a4d83 to
8abc3cb
Compare
|
The branch is ready for review. |
Neither. I don't understand why this PR switches away from cell_sets to cell_data + field_data. I've now fixed the corresponding bug simply by deprecating empty labels. Is there anything else in the PR that's worth merging? |
The problem goes beyond the referenced bug. A mesh constructed in nor in My problem is simple: I want to print out a mesh that I can open in So I see 2 ways out: |
Yeah, that should be made possible. Note that you can always fall back to gmsh like geom.generate_mesh()
gmsh.write("mesh3D.msh")I'm wondering how gmsh itself writes the file, and if the issue should not be fixed in meshio after all. |
That works. Why not add that to the
Physical and geometrical (in I'll point out that even |
Yeah, why not actually. Just added it as |
A yes, right. Every cell is guaranteed to have both of those tags so we can treat it as a function (aka I can't quite read the PR, still. Perhaps it could be made clearer, I don't know. For example, instead of cell_data["gmsh:physical"] = [
numpy.array([0 for _ in range(len(cells[i][1]))]) for i in range(len(cells))
)one could go cell_data["gmsh:physical"] = [
numpy.array([0 for _ in range(len(cell[1]))]) for cell in cells
)but I still don't understand what signficance Considering the gmsh error your describe, I think we need a |
8abc3cb to
edb9a8e
Compare
I improved there with
After some thoughts, I believe the best way would be to always fill in a I will pursue this if you deem it mergeable.
I will add a separate bug report (and hopefully a merge request) about this. |
It should be
Let's first get the |
edb9a8e to
b79f580
Compare
|
This might have been fixed by #486. |
unfortunately not fixed yet. |
b79f580 to
ec0ee4f
Compare
|
Okay, perhaps this becomes clearer with a test. Could you add one? |
see #488 |
|
Thanks for the test! We need one that fails before this PR, though, and passes with the PR. |
ec0ee4f to
5f04e2d
Compare
|
|
my bad, I asserted the read mesh in the |
Closes #397.