Skip to content

Commit

Permalink
back in black
Browse files Browse the repository at this point in the history
  • Loading branch information
jpmorgan98 committed Jan 28, 2024
1 parent 650d73c commit 8114dc2
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 24 deletions.
42 changes: 21 additions & 21 deletions mcdc/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,9 +221,9 @@ def prepare():
for i in range(N_material):
for name in type_.material.names:
if name in ["nuclide_IDs", "nuclide_densities"]:
mcdc["materials"][i][name][
: mcdc["materials"][i]["N_nuclide"]
] = input_deck.materials[i][name]
mcdc["materials"][i][name][: mcdc["materials"][i]["N_nuclide"]] = (
input_deck.materials[i][name]
)
else:
mcdc["materials"][i][name] = input_deck.materials[i][name]

Expand Down Expand Up @@ -486,14 +486,14 @@ def prepare():
for i in range(M):
idm = input_deck.uq_deltas["materials"][i]["ID"]
mcdc["technique"]["uq_"]["materials"][i]["info"]["ID"] = idm
mcdc["technique"]["uq_"]["materials"][i]["info"][
"distribution"
] = input_deck.uq_deltas["materials"][i]["distribution"]
mcdc["technique"]["uq_"]["materials"][i]["info"]["distribution"] = (
input_deck.uq_deltas["materials"][i]["distribution"]
)
for name in input_deck.uq_deltas["materials"][i]["flags"]:
mcdc["technique"]["uq_"]["materials"][i]["flags"][name] = True
mcdc["technique"]["uq_"]["materials"][i]["delta"][
name
] = input_deck.uq_deltas["materials"][i][name]
mcdc["technique"]["uq_"]["materials"][i]["delta"][name] = (
input_deck.uq_deltas["materials"][i][name]
)
flags = mcdc["technique"]["uq_"]["materials"][i]["flags"]
if flags["capture"] or flags["scatter"] or flags["fission"]:
flags["total"] = True
Expand All @@ -502,26 +502,26 @@ def prepare():
flags["nu_f"] = True
if mcdc["materials"][idm]["N_nuclide"] > 1:
for name in type_.uq_mat.names:
mcdc["technique"]["uq_"]["materials"][i]["mean"][
name
] = input_deck.materials[idm][name]
mcdc["technique"]["uq_"]["materials"][i]["mean"][name] = (
input_deck.materials[idm][name]
)

N = len(input_deck.uq_deltas["nuclides"])
for i in range(N):
mcdc["technique"]["uq_"]["nuclides"][i]["info"][
"distribution"
] = input_deck.uq_deltas["nuclides"][i]["distribution"]
mcdc["technique"]["uq_"]["nuclides"][i]["info"]["distribution"] = (
input_deck.uq_deltas["nuclides"][i]["distribution"]
)
idn = input_deck.uq_deltas["nuclides"][i]["ID"]
mcdc["technique"]["uq_"]["nuclides"][i]["info"]["ID"] = idn
for name in type_.uq_nuc.names:
mcdc["technique"]["uq_"]["nuclides"][i]["mean"][
name
] = input_deck.nuclides[idn][name]
mcdc["technique"]["uq_"]["nuclides"][i]["mean"][name] = (
input_deck.nuclides[idn][name]
)
for name in input_deck.uq_deltas["nuclides"][i]["flags"]:
mcdc["technique"]["uq_"]["nuclides"][i]["flags"][name] = True
mcdc["technique"]["uq_"]["nuclides"][i]["delta"][
name
] = input_deck.uq_deltas["nuclides"][i][name]
mcdc["technique"]["uq_"]["nuclides"][i]["delta"][name] = (
input_deck.uq_deltas["nuclides"][i][name]
)
flags = mcdc["technique"]["uq_"]["nuclides"][i]["flags"]
if flags["capture"] or flags["scatter"] or flags["fission"]:
flags["total"] = True
Expand Down
4 changes: 1 addition & 3 deletions mcdc/visualizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,7 @@ def create_cell_geometry(cell, current_time, surface_list, start_time, end_time)

# get radius from the surface card
radius = float(
math.sqrt(
abs(surface_list[surface_ID]["J"][0, 0] - x**2 - y**2 - z**2)
)
math.sqrt(abs(surface_list[surface_ID]["J"][0, 0] - x**2 - y**2 - z**2))
)

# Add or subtract the sphere based on the CSG input
Expand Down

0 comments on commit 8114dc2

Please sign in to comment.