mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-26 05:05:30 -04:00
bug fixes based on testing the new capability
This commit is contained in:
parent
c6ba362ff1
commit
07fb1bcd7f
2 changed files with 16 additions and 7 deletions
|
|
@ -995,6 +995,15 @@ class Library(object):
|
|||
xsdata = openmc.XSdata(name, self.energy_groups,
|
||||
representation=representation)
|
||||
xsdata.num_delayed_groups = self.num_delayed_groups
|
||||
if self.num_polar or self.num_azimuthal:
|
||||
if self.num_polar:
|
||||
xsdata.num_polar = self.num_polar
|
||||
else:
|
||||
xsdata.num_polar = 1
|
||||
if self.num_azimuthal:
|
||||
xsdata.num_azimuthal = self.num_azimuthal
|
||||
else:
|
||||
xsdata.num_azimuthal = 1
|
||||
|
||||
if nuclide != 'total':
|
||||
xsdata.atomic_weight_ratio = self._nuclides[nuclide][1]
|
||||
|
|
|
|||
|
|
@ -4332,13 +4332,13 @@ class ScatterMatrixXS(MatrixMGXS):
|
|||
dont_squeeze = (1, 2, 3)
|
||||
else:
|
||||
dont_squeeze = (1, 2)
|
||||
# Squeeze will return a ValueError if the axis has a size
|
||||
# greater than 1, so try each axis in axes one at a time,
|
||||
# and do our own check to preclude the ValueError
|
||||
initial_shape = len(xs.shape)
|
||||
for axis in range(initial_shape - 1, -1, -1):
|
||||
if axis not in dont_squeeze and xs.shape[axis] == 1:
|
||||
xs = np.squeeze(xs, axis=axis)
|
||||
# Squeeze will return a ValueError if the axis has a size
|
||||
# greater than 1, so try each axis in axes one at a time,
|
||||
# and do our own check to preclude the ValueError
|
||||
initial_shape = len(xs.shape)
|
||||
for axis in range(initial_shape - 1, -1, -1):
|
||||
if axis not in dont_squeeze and xs.shape[axis] == 1:
|
||||
xs = np.squeeze(xs, axis=axis)
|
||||
return xs
|
||||
|
||||
def get_pandas_dataframe(self, groups='all', nuclides='all', moment='all',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue