From 7b8bc4ae9041c55c97f6295581be6f2a40f984d5 Mon Sep 17 00:00:00 2001 From: Patrick Shriwise Date: Thu, 10 Mar 2022 15:20:40 -0600 Subject: [PATCH] Updating comments --- openmc/weight_windows.py | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/openmc/weight_windows.py b/openmc/weight_windows.py index 4dabe2a1f0..197a01eb72 100644 --- a/openmc/weight_windows.py +++ b/openmc/weight_windows.py @@ -570,21 +570,20 @@ def wwinp_to_wws(path): e_bounds *= 1E6 # create an array for weight window lower bounds + # # MCNP ordering for weight windows matches that of OpenMC + # # ('xyz' with x changing fastest) ww_lb = np.zeros((*mesh.dimension, ne)) for ijk in mesh.indices: idx = tuple([v - 1 for v in ijk] + [slice(None)]) ww_lb[idx] = [float(next(wwinp)) for _ in range(ne)] - # for e in range(ne): - # # MCNP ordering for weight windows matches that of OpenMC - # # ('xyz' with x changing fastest) - # ww_vals = [float(next(wwinp)) for _ in range(n_elements)] - # ww_lb[e, :] = np.asarray(ww_vals).reshape(mesh.dimension) - settings = WeightWindows(id=None, - mesh=mesh, - lower_ww_bounds=ww_lb.flatten(), - upper_bound_ratio=5.0, - energy_bins=e_bounds, - particle_type=particle) - wws.append(settings) + + # create a WeightWindows object and add it to the output list + ww = WeightWindows(id=None, + mesh=mesh, + lower_ww_bounds=ww_lb.flatten(), + upper_bound_ratio=5.0, + energy_bins=e_bounds, + particle_type=particle) + wws.append(ww) return wws \ No newline at end of file