Skip to content

Commit

Permalink
Only read mesh type if present, else it's a regular mesh
Browse files Browse the repository at this point in the history
  • Loading branch information
pshriwise committed Dec 5, 2024
1 parent 9fcd4c5 commit d320b12
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion openmc/mesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def from_hdf5(cls, group: h5py.Group):
"""

mesh_type = group['type'][()].decode()
mesh_type = 'regular' if 'type' not in group else group['type'][()].decode()

mesh_id = int(group.name.split('/')[-1].lstrip('mesh '))
mesh_name = '' if not 'name' in group else group['name'][()].decode()
Expand Down

0 comments on commit d320b12

Please sign in to comment.