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]: Reading XMDF with prism elements #3351

Closed
fagnelli opened this issue Aug 15, 2024 · 0 comments · Fixed by #3384
Closed

[BUG]: Reading XMDF with prism elements #3351

fagnelli opened this issue Aug 15, 2024 · 0 comments · Fixed by #3384
Labels
bug Something isn't working

Comments

@fagnelli
Copy link

Summarize the issue

The mesh export and import using XDMF file format does not appear to work for meshes with prismatic elements. It works for all other elements.

How to reproduce the bug

I prepared a small script to illustrate the error

Minimal Example (Python)

import numpy as np

# FeniCSx
from dolfinx import mesh, io
from mpi4py import MPI

# Define mesh parameters
comm = MPI.COMM_WORLD
nel = 10                                         # number of elements per domain

Dhi = mesh.create_box(comm, [np.array([0., 0., 0.]), np.array([1., 1., 1.])],
                     [nel,nel,nel], cell_type=mesh.CellType.prism)
with io.XDMFFile(comm, "box-pri6.xdmf", "w") as xdmf:
   xdmf.write_mesh(Dhi)
   
with io.XDMFFile(comm, "box-pri6.xdmf", "r") as xdmf:
    Dhf = xdmf.read_mesh()

Output (Python)

RuntimeError: Cannot recognise cell type. Unknown value: wedge

Version

0.8.0

DOLFINx git commit

No response

Installation

I used a Docker image on a Windows 11

Additional information

No response

@fagnelli fagnelli added the bug Something isn't working label Aug 15, 2024
jorgensd added a commit that referenced this issue Sep 11, 2024
github-merge-queue bot pushed a commit that referenced this issue Sep 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant