Skip to content

[BUG] meshio does deal with wedge/prism element type for medit .mesh file format #1508

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

Open
JulienCHAPELAT opened this issue Feb 7, 2025 · 1 comment

Comments

@JulienCHAPELAT
Copy link

JulienCHAPELAT commented Feb 7, 2025

Describe the bug

It is not possible the write a mesh with wedge/prism in the medit .mesh file format.

To Reproduce

with the .msh file (see below)

import meshio
mesh = meshio.read("wedge.msh")
meshio.write("wedge.mesh", mesh)

Diagnose

As with gmsh API, it seems not possible to export wedge/prism in the medit .mesh file format.

File to reproduce

I can not upload a .msh or .mesh file here, so here is the right content:

For the .msh

$MeshFormat
4.1 0 8
$EndMeshFormat
$Entities
0 0 0 2
1 0 0 0 0 0 0 0 0 
2 0 0 0 1 1 1 0 0 
$EndEntities
$Nodes
2 6 1 6
3 1 0 6
1
2
3
4
5
6
0 0 0
1 0 0
0 1 0
0 0 1
1 0 1
0 1 1
3 2 0 0
$EndNodes
$Elements
1 1 1 1
3 2 6 1
1 1 2 3 4 5 6 
$EndElements

For the resulting .mesh

MeshVersionFormatted 2

Dimension 3

Vertices
6
0.0 0.0 0.0 1
1.0 0.0 0.0 1
0.5 1.0 0.0 1
0.0 0.0 1.0 1
1.0 0.0 1.0 1
0.5 1.0 1.0 1

Prisms
1
1 2 3 4 5 6 100

End
@JulienCHAPELAT
Copy link
Author

The ordering from an INRIA report

Image

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

1 participant