Skip to content

Commit

Permalink
remove dt from flux tally
Browse files Browse the repository at this point in the history
  • Loading branch information
spasmann committed Jan 24, 2024
1 parent 0f2c487 commit 633a9f7
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions mcdc/kernel.py
Original file line number Diff line number Diff line change
Expand Up @@ -2555,7 +2555,7 @@ def iqmc_score_tallies(P, distance, mcdc):
if (mesh["z"][z] != -INF) and (mesh["z"][z] != INF):
dz = mesh["z"][z + 1] - mesh["z"][z]

dV = dx * dy * dz * dt
dV = dx * dy * dz

flux = iqmc_flux(SigmaT, w, distance, dV)
score_bin["flux"][:, t, x, y, z] += flux
Expand Down Expand Up @@ -2762,7 +2762,6 @@ def iqmc_generate_material_idx(mcdc):
Nx = len(mesh["x"]) - 1
Ny = len(mesh["y"]) - 1
Nz = len(mesh["z"]) - 1
dx = dy = dz = 1
# variables for cell finding functions
trans = np.zeros((3,))
# create particle to utilize cell finding functions
Expand All @@ -2772,12 +2771,14 @@ def iqmc_generate_material_idx(mcdc):
P_temp["material_ID"] = -1
P_temp["cell_ID"] = -1

t_mid = 0.5 * (mesh["t"][1:] + mesh["t"][:-1])
x_mid = 0.5 * (mesh["x"][1:] + mesh["x"][:-1])
y_mid = 0.5 * (mesh["y"][1:] + mesh["y"][:-1])
z_mid = 0.5 * (mesh["z"][1:] + mesh["z"][:-1])

# loop through every cell
for t in range(Nt):
for l in range(Nt):
t = t_mid[l]
for i in range(Nx):
x = x_mid[i]
for j in range(Ny):
Expand All @@ -2798,7 +2799,7 @@ def iqmc_generate_material_idx(mcdc):
material_ID = get_particle_material(P_temp, mcdc)

# assign material index
mcdc["technique"]["iqmc"]["material_idx"][t, i, j, k] = material_ID
mcdc["technique"]["iqmc"]["material_idx"][l, i, j, k] = material_ID


@njit
Expand Down

0 comments on commit 633a9f7

Please sign in to comment.