openmc icon indicating copy to clipboard operation
openmc copied to clipboard

Weight window bounds ordering

Open pshriwise opened this issue 3 years ago • 0 comments

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:

  1. 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.
  2. Document this more clearly on the WeightWindow class.

pshriwise avatar Jul 18 '22 19:07 pshriwise