Skip to content

Commit

Permalink
Merge pull request #260 from ilhamv/fix_IC_generator
Browse files Browse the repository at this point in the history
Fix output processing for IC particle generators
  • Loading branch information
ilhamv authored Nov 24, 2024
2 parents 5450f2d + 0dba855 commit 5cc5117
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mcdc/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -1692,8 +1692,8 @@ def generate_hdf5(data, mcdc):

# IC generator
if mcdc["technique"]["IC_generator"]:
Nn = mcdc["technique"]["IC_bank_neutron"]["size"]
Np = mcdc["technique"]["IC_bank_precursor"]["size"]
Nn = mcdc["technique"]["IC_bank_neutron"]["size"][0]
Np = mcdc["technique"]["IC_bank_precursor"]["size"][0]
f.create_dataset(
"IC/neutrons",
data=mcdc["technique"]["IC_bank_neutron"]["particles"][:Nn],
Expand All @@ -1712,7 +1712,7 @@ def generate_hdf5(data, mcdc):
if mcdc["setting"]["save_particle"]:
# Gather source bank
# TODO: Parallel HDF5 and mitigation of large data passing
N = mcdc["bank_source"]["size"]
N = mcdc["bank_source"]["size"][0]
neutrons = MPI.COMM_WORLD.gather(mcdc["bank_source"]["particles"][:N])

# Master saves the particle
Expand Down

0 comments on commit 5cc5117

Please sign in to comment.