openmc
openmc copied to clipboard
Weight window bounds ordering
The ordering of weight window values is a little confusing right now. We currently accept an arbitrarily shaped ndarray and assume its ordering is the number of mesh elements in each dimension followed by the number of energy groups: nx, ny, nz, ne (listed from changing fastest to changing slowest). This is very easy to get incorrect however and detecting errors in the ordering is diffucult.
I'll propose here that we:
- Enforce the shape of the lower_ww_bounds/upper_ww_bounds attributes to be (nx, ny, nz, ne). (If a flat array/iterable is passed in, reshape it ourselves and provide a warning). We'll then write out the flat array as proposed in #2113.
- Document this more clearly on the WeightWindow class.