mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 22:26:08 -04:00
Fix bug with 0 interpolation value when reading incoherent inelastic data
This commit is contained in:
parent
90c3e37180
commit
43ddacf5b1
1 changed files with 6 additions and 0 deletions
|
|
@ -124,6 +124,12 @@ CorrelatedAngleEnergy::CorrelatedAngleEnergy(hid_t group)
|
|||
m = mu.shape()[1] - offset_mu;
|
||||
}
|
||||
|
||||
// For incoherent inelastic thermal scattering, the angle distributions
|
||||
// may be given as discrete mu values. In this case, interpolation values
|
||||
// of zero appear in the HDF5 file. Here we change it to a 1 so that
|
||||
// int2interp doesn't fail.
|
||||
if (interp_mu == 0) interp_mu = 1;
|
||||
|
||||
auto interp = int2interp(interp_mu);
|
||||
auto xs = xt::view(mu, 0, xt::range(offset_mu, offset_mu + m));
|
||||
auto ps = xt::view(mu, 1, xt::range(offset_mu, offset_mu + m));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue