Import XDMF msh to FEnicS problem


44
views
0
18 days ago by
Dear all,

I am trying to import XDMF mesh to FEniCS using the following script:

from dolfin import *
import matplotlib.pyplot as plt
import time
import os
import math

import meshio

mesh = meshio.read('test.xdmf')


However, it shows 

/home/teekad/.local/lib/python2.7/site-packages/h5py/__init__.py:36: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
  from ._conv import register_converters as _register_converters
/home/teekad/.local/lib/python2.7/site-packages/h5py/__init__.py:45: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
  from . import h5a, h5d, h5ds, h5f, h5fd, h5g, h5r, h5s, h5t, h5p, h5z
/home/teekad/.local/lib/python2.7/site-packages/h5py/_hl/group.py:22: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
  from .. import h5g, h5i, h5o, h5r, h5t, h5l, h5p
/home/teekad/.local/lib/python2.7/site-packages/h5py/__init__.py:72: UserWarning: h5py is running against HDF5 1.10.0 when it was built against 1.10.2, this may cause problems
  '{0}.{1}.{2}'.format(*version.hdf5_built_version_tuple)
Traceback (most recent call last):
  File "pe_threef_test_por.py", line 8, in <module>
    mesh = meshio.read('test.xdmf')
  File "/home/teekad/.local/lib/python2.7/site-packages/meshio/helpers.py", line 153, in read
    return format_to_reader[file_format].read(filename)
  File "/home/teekad/.local/lib/python2.7/site-packages/meshio/xdmf_io.py", line 25, in read
    return XdmfReader(filename).read()
  File "/home/teekad/.local/lib/python2.7/site-packages/meshio/xdmf_io.py", line 183, in read
    return self.read_xdmf3(root)
  File "/home/teekad/.local/lib/python2.7/site-packages/meshio/xdmf_io.py", line 353, in read_xdmf3
    points = self.read_data_item(data_item)
  File "/home/teekad/.local/lib/python2.7/site-packages/meshio/xdmf_io.py", line 227, in read_data_item
    f = h5py.File(full_hdf5_path, "r")
  File "/home/teekad/.local/lib/python2.7/site-packages/h5py/_hl/files.py", line 311, in __init__
    fapl = make_fapl(driver, libver, **kwds)
  File "/home/teekad/.local/lib/python2.7/site-packages/h5py/_hl/files.py", line 102, in make_fapl
    plist.set_libver_bounds(low, high)
  File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
  File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
  File "h5py/h5p.pyx", line 1070, in h5py.h5p.PropFAID.set_libver_bounds
ValueError: Invalid high library version bound (invalid high library version bound)


if I do this way,

f = XDMFFile("test.xdmf")
mesh = Mesh()
f.read(mesh)


This happens

*** Error:   Unable to recognise cell type.
*** Reason:  Unknown value "".
*** Where:   This error was encountered inside XDMFFile.cpp.
*** Process: 0


I attached both .msh and .xdmf files in this post.

Thank you very much!

File attached: test.xdmf (792 Bytes)

File attached: test.h5 (38.9 KB)

File attached: test2_0fr_rev00.msh (27.21 KB)

Community: FEniCS Project
Please login to add an answer/comment or follow this question.

Similar posts:
Search »