Added fixes for fission bank overflow memory issue.

This commit is contained in:
John Tramm 2021-07-01 16:24:17 +00:00
parent 423971637e
commit 484858dfc1
2 changed files with 22 additions and 10 deletions

View file

@ -96,6 +96,10 @@ void sort_fission_bank()
const auto& site = simulation::fission_bank[i];
int64_t offset = site.parent_id - 1 - simulation::work_index[mpi::rank];
int64_t idx = simulation::progeny_per_particle[offset] + site.progeny_id;
if (idx >= simulation::fission_bank.size()) {
fatal_error("Mismatch detected between sum of all particle progeny and "
"shared fission bank size.");
}
sorted_bank[idx] = site;
}