mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-29 06:35:48 -04:00
Fixed failing tests
This commit is contained in:
parent
4914dddf4c
commit
07ac6d9e3a
1 changed files with 24 additions and 43 deletions
|
|
@ -553,62 +553,43 @@ class MGXS(object):
|
|||
cv.check_value('mgxs_type', mgxs_type, MGXS_TYPES)
|
||||
|
||||
if mgxs_type == 'total':
|
||||
mgxs = TotalXS(domain, domain_type, energy_groups, num_polar,
|
||||
num_azimuthal)
|
||||
mgxs = TotalXS(domain, domain_type, energy_groups)
|
||||
elif mgxs_type == 'transport':
|
||||
mgxs = TransportXS(domain, domain_type, energy_groups, num_polar,
|
||||
num_azimuthal)
|
||||
mgxs = TransportXS(domain, domain_type, energy_groups)
|
||||
elif mgxs_type == 'nu-transport':
|
||||
mgxs = NuTransportXS(domain, domain_type, energy_groups, num_polar,
|
||||
num_azimuthal)
|
||||
mgxs = NuTransportXS(domain, domain_type, energy_groups)
|
||||
elif mgxs_type == 'absorption':
|
||||
mgxs = AbsorptionXS(domain, domain_type, energy_groups, num_polar,
|
||||
num_azimuthal)
|
||||
mgxs = AbsorptionXS(domain, domain_type, energy_groups)
|
||||
elif mgxs_type == 'capture':
|
||||
mgxs = CaptureXS(domain, domain_type, energy_groups, num_polar,
|
||||
num_azimuthal)
|
||||
mgxs = CaptureXS(domain, domain_type, energy_groups)
|
||||
elif mgxs_type == 'fission':
|
||||
mgxs = FissionXS(domain, domain_type, energy_groups, num_polar,
|
||||
num_azimuthal)
|
||||
mgxs = FissionXS(domain, domain_type, energy_groups)
|
||||
elif mgxs_type == 'nu-fission':
|
||||
mgxs = NuFissionXS(domain, domain_type, energy_groups, num_polar,
|
||||
num_azimuthal)
|
||||
mgxs = NuFissionXS(domain, domain_type, energy_groups)
|
||||
elif mgxs_type == 'kappa-fission':
|
||||
mgxs = KappaFissionXS(domain, domain_type, energy_groups,
|
||||
num_polar, num_azimuthal)
|
||||
mgxs = KappaFissionXS(domain, domain_type, energy_groups)
|
||||
elif mgxs_type == 'scatter':
|
||||
mgxs = ScatterXS(domain, domain_type, energy_groups, num_polar,
|
||||
num_azimuthal)
|
||||
mgxs = ScatterXS(domain, domain_type, energy_groups)
|
||||
elif mgxs_type == 'nu-scatter':
|
||||
mgxs = NuScatterXS(domain, domain_type, energy_groups, num_polar,
|
||||
num_azimuthal)
|
||||
mgxs = NuScatterXS(domain, domain_type, energy_groups)
|
||||
elif mgxs_type == 'scatter matrix':
|
||||
mgxs = ScatterMatrixXS(domain, domain_type, energy_groups,
|
||||
num_polar, num_azimuthal)
|
||||
mgxs = ScatterMatrixXS(domain, domain_type, energy_groups)
|
||||
elif mgxs_type == 'nu-scatter matrix':
|
||||
mgxs = NuScatterMatrixXS(domain, domain_type, energy_groups,
|
||||
num_polar, num_azimuthal)
|
||||
mgxs = NuScatterMatrixXS(domain, domain_type, energy_groups)
|
||||
elif mgxs_type == 'multiplicity matrix':
|
||||
mgxs = MultiplicityMatrixXS(domain, domain_type, energy_groups,
|
||||
num_polar, num_azimuthal)
|
||||
mgxs = MultiplicityMatrixXS(domain, domain_type, energy_groups)
|
||||
elif mgxs_type == 'nu-fission matrix':
|
||||
mgxs = NuFissionMatrixXS(domain, domain_type, energy_groups,
|
||||
num_polar, num_azimuthal)
|
||||
mgxs = NuFissionMatrixXS(domain, domain_type, energy_groups)
|
||||
elif mgxs_type == 'chi':
|
||||
mgxs = Chi(domain, domain_type, energy_groups, num_polar,
|
||||
num_azimuthal)
|
||||
mgxs = Chi(domain, domain_type, energy_groups)
|
||||
elif mgxs_type == 'chi-prompt':
|
||||
mgxs = ChiPrompt(domain, domain_type, energy_groups, num_polar,
|
||||
num_azimuthal)
|
||||
mgxs = ChiPrompt(domain, domain_type, energy_groups)
|
||||
elif mgxs_type == 'inverse-velocity':
|
||||
mgxs = InverseVelocity(domain, domain_type, energy_groups,
|
||||
num_polar, num_azimuthal)
|
||||
mgxs = InverseVelocity(domain, domain_type, energy_groups)
|
||||
elif mgxs_type == 'prompt-nu-fission':
|
||||
mgxs = PromptNuFissionXS(domain, domain_type, energy_groups,
|
||||
num_polar, num_azimuthal)
|
||||
mgxs = PromptNuFissionXS(domain, domain_type, energy_groups)
|
||||
elif mgxs_type == 'prompt-nu-fission matrix':
|
||||
mgxs = PromptNuFissionMatrixXS(domain, domain_type, energy_groups,
|
||||
num_polar, num_azimuthal)
|
||||
mgxs = PromptNuFissionMatrixXS(domain, domain_type, energy_groups)
|
||||
|
||||
mgxs.by_nuclide = by_nuclide
|
||||
mgxs.name = name
|
||||
|
|
@ -970,7 +951,7 @@ class MGXS(object):
|
|||
# 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, 0, -1):
|
||||
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)
|
||||
else:
|
||||
|
|
@ -1844,7 +1825,7 @@ class MGXS(object):
|
|||
np.searchsorted(self.energy_groups.group_edges, df_bins)
|
||||
del df['energy high [eV]']
|
||||
columns += ['group in']
|
||||
elif 'energyout low [eV]' in df:
|
||||
if 'energyout low [eV]' in df:
|
||||
df.rename(columns={'energyout low [eV]': 'group out'},
|
||||
inplace=True)
|
||||
df_bins = df['group out']
|
||||
|
|
@ -2187,7 +2168,7 @@ class MatrixMGXS(MGXS):
|
|||
# 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, 0, -1):
|
||||
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)
|
||||
else:
|
||||
|
|
@ -4363,7 +4344,7 @@ class ScatterMatrixXS(MatrixMGXS):
|
|||
# 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, 0, -1):
|
||||
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
|
||||
|
|
@ -5508,7 +5489,7 @@ class Chi(MGXS):
|
|||
# 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, 0, -1):
|
||||
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)
|
||||
else:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue