Skip to content
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

Segfault when defining sizing field in NodeData using gmsh #220

Open
konstantinweise opened this issue Jun 29, 2023 · 1 comment
Open

Segfault when defining sizing field in NodeData using gmsh #220

konstantinweise opened this issue Jun 29, 2023 · 1 comment

Comments

@konstantinweise
Copy link

Dear MMG developers,

I encountered an issue when defining the sizing field in a NodeData array. My MMG call is as follows:

mmg3d_O3 -v 6 -nosurf -hgrad -1 -rmc -in ernie_with_sizing_field.msh -out ernie_with_sizing_field_mmg.msh

I get a segfault and after compiling mmg in debug mode, I was able to identify that it crashes here:

psl->m[idx] = dbuf[0];

I also tried to use the original gmsh mesh without the NodeData field using the corresponding -sol file but it does not getting recognized and loaded at all. The command I used was:

mmg3d_O3 -v 6 -nosurf -hgrad -1 -rmc -in ernie_with_sizing_field.msh -out ernie_with_sizing_field_mmg.msh -sol ernie.sol

Finally, after convertig the file into the medit format using meshio, I was able to remesh the problem with the sizing field. The only working version was:

mmg3d_O3 -v 6 -nosurf -hgrad -1 -rmc -in ernie.mesh -out ernie_with_sizing_field_mmg.msh

I would like to avoid the conversion step and directly write the sizing field into the NodeData field.

I provided a download link for the files for testing: testing_meshes

Thanks a lot!

Best regards!

Konstantin

@TorgeW
Copy link

TorgeW commented Aug 10, 2023

I found the problem, mmg wants a exactly 3 integer-tags while usually a 4th one is used as well.
Would be nice if mmg would actually respect the number of integer tags and skip extra tags instead of breaking.

number-of-integer-tags # must be 3 for Mmg
Latex formula # ignored value
metric-type # type of metric ( 1:scalar, 3:vector, 9:tensor)
nbvals # number of metrics: must match with the number of nodes in the $Nodes field

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