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

transposition of meshio cell_data keys #301

Closed
gdmcbain opened this issue Jan 7, 2020 · 1 comment
Closed

transposition of meshio cell_data keys #301

gdmcbain opened this issue Jan 7, 2020 · 1 comment

Comments

@gdmcbain
Copy link
Contributor

gdmcbain commented Jan 7, 2020

As mentioned in the context of 0.4.0 release #299, nschloe/meshio#626 has transposed the keys of meshio.Mesh.cell_data to name before cell-type. This is in meshio master but hasn't been released yet.

Using meshio master, this breaks ex21.py which raises

/home/geordie/src/scikit-fem/skfem/importers/meshio.py:114: UserWarning: Unable to load tagged boundaries/subdomains.
  warnings.warn("Unable to load tagged boundaries/subdomains.")
Traceback (most recent call last):
  File "docs/examples/ex21.py", line 28, in <module>
    dofs['fixed'].nodal['u^1'],
TypeError: tuple indices must be integers or slices, not str

The problem is that the transposition needs to be reflected in

if meshio_type in m.cell_data and 'gmsh:physical' in m.cell_data[meshio_type]:
elements_tag = m.cell_data[meshio_type]['gmsh:physical']

and elsewhere following.

@gdmcbain
Copy link
Contributor Author

Subsumed by #321.

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