Skip to content

Commit

Permalink
detect TopologyType="Mixed" in XDMF 2 nschloe#600
Browse files Browse the repository at this point in the history
  • Loading branch information
gdmcbain committed Dec 19, 2019
1 parent 1f5e725 commit 3f11ea3
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions meshio/xdmf/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,12 @@ def read_xdmf2(self, root): # noqa: C901
data_items = list(c)
if len(data_items) != 1:
raise ReadError()
meshio_type = xdmf_to_meshio_type[c.attrib["TopologyType"]]
cells[meshio_type] = self._read_data_item(data_items[0])
topology_type = c.attrib["TopologyType"]
if topology_type == "Mixed":
cells = translate_mixed_cells(data_items[0])
else:
meshio_type = xdmf_to_meshio_type[topology_type]
cells[meshio_type] = self._read_data_item(data_items[0])

elif c.tag == "Geometry":
if "GeometryType" in c.attrib and c.attrib["GeometryType"] != "XYZ":
Expand Down

0 comments on commit 3f11ea3

Please sign in to comment.