mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 13:45:36 -04:00
Fix tally nuclide indexing error
This commit is contained in:
parent
3377241f4d
commit
cb87aeff7c
1 changed files with 2 additions and 3 deletions
|
|
@ -533,10 +533,9 @@ Tally::set_nuclides(pugi::xml_node node)
|
|||
if (get_node_value(node, "nuclides") == "all") {
|
||||
// This tally should bin every nuclide in the problem. It should also bin
|
||||
// the total material rates. To achieve this, set the nuclides_ vector to
|
||||
// 1, 2, 3, ..., -1.
|
||||
// 0, 1, 2, ..., -1.
|
||||
nuclides_.reserve(data::nuclides.size() + 1);
|
||||
//TODO: off-by-one
|
||||
for (auto i = 1; i < data::nuclides.size()+1; ++i)
|
||||
for (auto i = 0; i < data::nuclides.size(); ++i)
|
||||
nuclides_.push_back(i);
|
||||
nuclides_.push_back(-1);
|
||||
all_nuclides_ = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue