mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 22:26:08 -04:00
Correcting extraction of surface type from hdf5 formats.
This commit is contained in:
parent
d12eed03a2
commit
49e22c9091
1 changed files with 7 additions and 3 deletions
|
|
@ -453,15 +453,19 @@ class Surface(IDManagerMixin, ABC):
|
|||
|
||||
"""
|
||||
|
||||
# If this is a DAGMC surface, do nothing for now
|
||||
geom_type = group['geom_type'][()].decode()
|
||||
if geom_type == 'dagmc':
|
||||
return
|
||||
|
||||
surface_id = int(group.name.split('/')[-1].lstrip('surface '))
|
||||
name = group['name'][()].decode() if 'name' in group else ''
|
||||
surf_type = group['geom_type'][()].decode()
|
||||
if surf_type == 'dagmc':
|
||||
return
|
||||
|
||||
bc = group['boundary_type'][()].decode()
|
||||
coeffs = group['coefficients'][...]
|
||||
kwargs = {'boundary_type': bc, 'name': name, 'surface_id': surface_id}
|
||||
|
||||
surf_type = group['type'][()].decode()
|
||||
cls = _SURFACE_CLASSES[surf_type]
|
||||
|
||||
return cls(*coeffs, **kwargs)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue