Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

move out iqmc sweep counter #117

Merged
merged 2 commits into from
Sep 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions mcdc/kernel.py
Original file line number Diff line number Diff line change
Expand Up @@ -3015,6 +3015,7 @@ def AxV(phi, b, mcdc):
prepare_qmc_source(mcdc)
prepare_qmc_particles(mcdc)
mcdc["technique"]["iqmc_flux"] = np.zeros_like(mcdc["technique"]["iqmc_flux"])
mcdc["technique"]["iqmc_sweep_counter"] += 1
loop_source(0, mcdc)
# sum resultant flux on all processors
iqmc_distribute_flux(mcdc)
Expand Down Expand Up @@ -3043,6 +3044,7 @@ def RHS(mcdc):
prepare_qmc_source(mcdc)
prepare_qmc_particles(mcdc)
mcdc["technique"]["iqmc_flux"] = np.zeros_like(mcdc["technique"]["iqmc_flux"])
mcdc["technique"]["iqmc_sweep_counter"] += 1
loop_source(0, mcdc)
# sum resultant flux on all processors
iqmc_distribute_flux(mcdc)
Expand Down Expand Up @@ -3072,6 +3074,7 @@ def HxV(V, mcdc):
prepare_qmc_scattering_source(mcdc)
prepare_qmc_particles(mcdc)
mcdc["technique"]["iqmc_flux"] = np.zeros_like(mcdc["technique"]["iqmc_flux"])
mcdc["technique"]["iqmc_sweep_counter"] += 1
loop_source(0, mcdc)
# sum resultant flux on all processors
iqmc_distribute_flux(mcdc)
Expand Down Expand Up @@ -3104,6 +3107,7 @@ def FxV(V, mcdc):
prepare_qmc_fission_source(mcdc)
prepare_qmc_particles(mcdc)
mcdc["technique"]["iqmc_flux"] = np.zeros_like(mcdc["technique"]["iqmc_flux"])
mcdc["technique"]["iqmc_sweep_counter"] += 1
loop_source(0, mcdc)
# sum resultant flux on all processors
iqmc_distribute_flux(mcdc)
Expand Down Expand Up @@ -3139,6 +3143,7 @@ def preconditioner(V, mcdc, num_sweeps=3):
prepare_qmc_scattering_source(mcdc)
prepare_qmc_particles(mcdc)
mcdc["technique"]["iqmc_flux"] = np.zeros_like(mcdc["technique"]["iqmc_flux"])
mcdc["technique"]["iqmc_sweep_counter"] += 1
loop_source(0, mcdc)
# sum resultant flux on all processors
iqmc_distribute_flux(mcdc)
Expand Down
5 changes: 2 additions & 3 deletions mcdc/loop.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,6 @@ def loop_source(seed, mcdc):
# Progress bar indicator
N_prog = 0

if mcdc["technique"]["iQMC"]:
mcdc["technique"]["iqmc_sweep_counter"] += 1

# Loop over particle sources
for idx_work in range(mcdc["mpi_work_size"]):
seed_work = kernel.split_seed(idx_work, seed)
Expand Down Expand Up @@ -318,7 +315,9 @@ def source_iteration(mcdc):
mcdc["technique"]["iqmc_flux"] = np.zeros_like(mcdc["technique"]["iqmc_flux"])

# sweep particles
mcdc["technique"]["iqmc_sweep_counter"] += 1
loop_source(0, mcdc)

# sum resultant flux on all processors
kernel.iqmc_distribute_flux(mcdc)
mcdc["technique"]["iqmc_itt"] += 1
Expand Down
Loading