Skip to content

Commit

Permalink
Working on uq tests
Browse files Browse the repository at this point in the history
  • Loading branch information
clemekay committed Apr 27, 2024
1 parent dd524ec commit d3b018e
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 11 deletions.
6 changes: 3 additions & 3 deletions mcdc/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -859,6 +859,8 @@ 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 @@ -886,9 +888,7 @@ def generate_hdf5(mcdc):
dictlist_to_h5group(input_deck.sources, input_group, "source")
dict_to_h5group(input_deck.tally, input_group.create_group("tally"))
dict_to_h5group(input_deck.setting, input_group.create_group("setting"))
dict_to_h5group(
input_deck.technique, input_group.create_group("technique")
)
dict_to_h5group(input_deck.technique, input_group.create_group("technique"))

# Tally
T = mcdc["tally"]
Expand Down
19 changes: 11 additions & 8 deletions test/verification/analytic/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,14 @@ def run(N_hist, name, N_batch=1):

for name in task.keys():
os.chdir(name)
N_min = task[name]["N_lim"][0]
N_max = task[name]["N_lim"][1]
N = task[name]["N"]
for N_hist in np.logspace(N_min, N_max, N):
N_hist = int(N_hist)
print(name, N_hist)
run(N_hist, name)
os.chdir(r"..")
if "N_batch" in task[name]:
x = 1
else:
N_min = task[name]["N_lim"][0]
N_max = task[name]["N_lim"][1]
N = task[name]["N"]
for N_hist in np.logspace(N_min, N_max, N):
N_hist = int(N_hist)
print(name, N_hist)
run(N_hist, name)
os.chdir(r"..")
4 changes: 4 additions & 0 deletions test/verification/analytic/variance_deconv/reference.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import numpy as np

# Parameters

0 comments on commit d3b018e

Please sign in to comment.