Thanks for the suggestion. Unfortunately the first code snippet returns
—> 11 meshio.write(“mf.xdmf”, meshio.Mesh(points=geometry.points, cells={“line”: geometry.cells[“line”]},
12 cell_data={“line”: {“name_to_read”: geometry.cell_data[“line”][“gmsh:physical”]}}))
13
KeyError: ‘line’
Nevertheless, the file mesh.xdmf is created, so I could proceed with the 1st part of your 2nd snippet. Unfortunately I also got an error:
RuntimeError Traceback (most recent call last)
in
1 mesh = Mesh()
2 with XDMFFile(“mesh.xdmf”) as infile:
----> 3 infile.read(mesh)
4 mvc = MeshValueCollection(“size_t”, mesh, 1)RuntimeError:
*** -------------------------------------------------------------------------
*** DOLFIN encountered an error. If you are not able to resolve this issue
*** using the information listed below, you can ask for help at
*** fenics-support@googlegroups.com
*** Remember to include the error message listed below and, if possible,
*** include a minimal running example to reproduce the error.
*** -------------------------------------------------------------------------
*** Error: Unable to get dataset.
*** Reason: DOLFIN has not been configured with HDF5.
*** Where: This error was encountered inside XDMFFile.cpp.
*** Process: 0
*** DOLFIN version: 2018.2.0.dev0
*** Git changeset: d4731dd5de3c6dbdf6c18a6e2764beb5b624ff5b
*** -------------------------------------------------------------------------
But as far as I understand, I have just recompiled dolfin-git and python-dolfin-git (I use Arch Linux, both packages are in the AUR) which should have compiled with the HDF5 configuration. I am unsure how to fix any of the 2 errors…