mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 06:05:58 -04:00
Hotfix: Remove errant openmc.Settings.random_ray check and removed of not useful warning in MG mode (#3344)
This commit is contained in:
parent
906548db20
commit
58f2a21771
2 changed files with 0 additions and 11 deletions
|
|
@ -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'))
|
||||
|
|
|
|||
|
|
@ -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.);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue