Skip to content

Commit

Permalink
Add uq parameter to saved input_deck
Browse files Browse the repository at this point in the history
  • Loading branch information
clemekay committed Apr 27, 2024
1 parent d3b018e commit c58b497
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions mcdc/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -859,8 +859,6 @@ def dictlist_to_h5group(dictlist, input_group, name):

def dict_to_h5group(dict_, group):
for k, v in dict_.items():
if k == 'uq':
x = 1
if type(v) == dict:
dict_to_h5group(dict_[k], group.create_group(k))
elif v is None:
Expand Down Expand Up @@ -1018,6 +1016,12 @@ def generate_hdf5(mcdc):
"IC/fission", data=mcdc["technique"]["IC_fission"] / Nn
)

if mcdc["technique"]["uq"]:
del f['input_deck/technique/uq']
uq_group = f.create_group('input_deck/technique/uq')
dictlist_to_h5group(input_deck.uq_deltas["nuclides"], uq_group, "nuclide")
dictlist_to_h5group(input_deck.uq_deltas["materials"], uq_group, "material")

# Save particle?
if mcdc["setting"]["save_particle"]:
# Gather source bank
Expand Down

0 comments on commit c58b497

Please sign in to comment.