Hotfix: Remove errant openmc.Settings.random_ray check and removed of not useful warning in MG mode (#3344)

This commit is contained in:
Adam Nelson 2025-03-14 11:57:33 -05:00 committed by GitHub
parent 906548db20
commit 58f2a21771
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 0 additions and 11 deletions

View file

@ -1174,7 +1174,6 @@ class Settings:
raise ValueError(
f'Invalid domain type: {type(domain)}. Expected '
'openmc.Material, openmc.Cell, or openmc.Universe.')
cv.check_type('adjoint', value, bool)
elif key == 'sample_method':
cv.check_value('sample method', value,
('prng', 'halton'))

View file

@ -37,22 +37,12 @@ void ScattData::base_init(int order, const xt::xtensor<int, 1>& in_gmin,
mult[gin] = in_mult[gin];
// Make sure the multiplicity does not have 0s
unsigned long int num_converted = 0;
for (int go = 0; go < mult[gin].size(); go++) {
if (mult[gin][go] == 0.) {
num_converted += 1;
mult[gin][go] = 1.;
}
}
if (num_converted > 0) {
// Raise a warning to the user if we did have to do the conversion
std::string msg =
std::to_string(num_converted) +
" entries in the Multiplicity Matrix were changed from 0 to 1";
warning(msg);
}
// Make sure the energy is normalized
double norm = std::accumulate(energy[gin].begin(), energy[gin].end(), 0.);