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

Bug in gmsh api writer. #13143

Closed
wants to merge 1 commit into from
Closed

Conversation

luca-heltai
Copy link
Member

@luca-heltai luca-heltai commented Dec 28, 2021

I've added two tests that do the following things:

  • create a hyper_cube triangulation
  • write it using gmsh api
  • read it back using gmsh api
  • write it again using gmsh api
  • copy the two meshes to the output file (they should be identical, up to maybe different node numberings in different versions of gmsh, but not for this simple case)

If only the default boundary id (0) is used, everything is ok (test gmsh_api_05). If I colorize the grid, then the gmsh api writer GridOut::write_msh(tria, string) fails to write nodes information (gmsh_api_06).

In the second case, I get as msh file the following:

$MeshFormat
4.1 0 8
$EndMeshFormat
$PhysicalNames
3
1 1 "BoundaryID:1"
1 2 "BoundaryID:2"
1 3 "BoundaryID:3"
$EndPhysicalNames
$Entities
0 3 1 0
2 1 0 0 1 1 0 1 1 0 
3 0 0 0 1 0 0 1 2 0 
4 0 1 0 1 1 0 1 3 0 
1 0 0 0 1 1 0 1 4 0 
$EndEntities
$Elements
4 4 1 4
1 2 1 1
2 2 4 
1 3 1 1
3 1 2 
1 4 1 1
4 3 4 
2 1 3 1
1 1 2 4 3 
$EndElements

Everything is fine, except there is no $Nodes section. I created the output of gmsh_api_06 by hand.

I have not worked on a fix yet, but when the fix is ready, the second test should pass.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant