mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 14:15:42 -04:00
Update src/distribution.cpp
Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
This commit is contained in:
parent
d7622c1b5d
commit
3fde9412f4
1 changed files with 1 additions and 4 deletions
|
|
@ -323,10 +323,7 @@ double Mixture::sample(uint64_t* seed) const
|
|||
p, [](const DistPair& pair, double p) { return pair.first < p; });
|
||||
|
||||
// This should not happen. Catch it
|
||||
// TODO: Remove this check, when the code is trusted to always operate
|
||||
if (it == distribution_.cend()) {
|
||||
fatal_error("Bad Sampling in Mixture Distribution.");
|
||||
}
|
||||
Ensures(it != distribution_.cend());
|
||||
|
||||
// Sample the choosen distribution
|
||||
return it->second->sample(seed);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue