-
Notifications
You must be signed in to change notification settings - Fork 83
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
WIP: serialize subdomains & boundaries #681
Conversation
This is with 59a474d. |
The idea for boundaries needs rethinking since a cell can have more than one facet on a boundary. |
Pressing ahead anyway for the moment, assuming that that doesn't happen (and checking for that) |
What about binary-encoding the facets of each cell that are on the boundary? 9e8cbe8 (2 ** np.arange(mesh.t.shape[0])) @ np.isin(mesh.t2f, boundary) |
It seems to work on a |
I don't want us to invent a new representation because it won't be compatible with existing tools. E.g., ElmerFEM which I'm using in an upcoming project uses |
A nice thing about this approach is that one can change meshio.write(Path(__file__).with_name(f"{name}.vtk"), mio) from Doesn't work for |
Oops, didn't see your comment. Sorry. Yeah, O. K., I'll keep this approach for in-house. |
So basically the issue is that How about |
I think the fairest way to answer this would be to say that meshio tries not impose any interpretation on But no, meshio has no concept of subdomains or sub-boundaries. If any mesh file format does, meshio more or less ignores it, maybe treating it as There is "gmsh:physical" and "medit:ref" and maybe a couple of others.
and the data-structures |
What's going on in MSH 4.1? Is there some kind of implicit boundary representation? |
Let's move the discussion to #261. |
Reopening to include new commits demonstrating that this approach works automatically for "interfaces" #683 without needing to distinguish them from boundaries. |
Superseded by #680. |
Fixes #261.
This is to explore some alternative ideas inspired by consideration of #680 that don't involve dealing with
meshio.Mesh.cell_sets
.