-
-
Notifications
You must be signed in to change notification settings - Fork 397
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
more streamlined handling of point and cell data #704
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes I see your approach here. We all assume that there may exist several int
dtyped point or cell data in the mesh (say a user defined a point array as the number of cells that each point is connected to), and you use the first one as the tag
for interoperability.
Actually I still prefer maintaining a list of these official tag data for each format, since explicit is better than implicit
- Either really provide a global list of these keys
- Either point
mesh.point_tags
to a particular data array
But that is implicit, too. The user never sees the "official tag list", it's a member of some function or class. When she writes a file, it's completely unclear why one set has been selected instead of another. The way we have it right now, at least we have a warning about it. If the user thinks it's the wrong cell_data written out, she needs to provide only one cell_data item. That's as explicit as it gets. |
Okay. So I suppose currently for practical use we must save "gmsh:physical" first in the Do you plan to add a test file for testing interoperability? Also the MED format needs to be included. It's by far the most comprehensive format: point / cell data as well as point / cell tags are supported. What about exposing the |
If you want "gmsh:physical" to be saved, then I suggest this to be the only cell_data you pass.
We can do that.
Do you mean *_sets? (Otherwise I don't know what you mean.) |
Actually for practical use downstream when reading Gmsh MSH 4.1, I recommend users ignore "gmsh:physical" and instead read The complication is Gmsh version.. This is only for reading MSH 4.1, which is genersted by default by Gmsh 4. Older Gmsh can't generate MSH 4.1, only MSH 2.2. I believe Gmsh 3 is still distributed by a number of Linux package managers. It would be easy enough to populate the .cell_sets` on reading any format with a simple cell-colouring (Gmsh's MSH 2.2, MEDIT, …), just with a bit of redundancy. But what about attempting this in the property |
For mesh formats that can only write one point/cell data array of int data, unconditionally pick the first one found and warn if there are more candidates.