mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 14:15:42 -04:00
Fix bug in WeightWindowGenerator for empty energy bounds (#3263)
This commit is contained in:
parent
549cc0973c
commit
6d731934f4
1 changed files with 4 additions and 1 deletions
|
|
@ -897,7 +897,10 @@ class WeightWindowGenerator:
|
|||
mesh_id = int(get_text(elem, 'mesh'))
|
||||
mesh = meshes[mesh_id]
|
||||
|
||||
energy_bounds = [float(x) for x in get_text(elem, 'energy_bounds').split()]
|
||||
if (energy_bounds := get_text(elem, 'energy_bounds')) is not None:
|
||||
energy_bounds = [float(x) for x in energy_bounds.split()]
|
||||
else:
|
||||
energy_bounds = None
|
||||
particle_type = get_text(elem, 'particle_type')
|
||||
|
||||
wwg = cls(mesh, energy_bounds, particle_type)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue