Improve error message regarding particle filter

This commit is contained in:
Paul Romano 2023-04-08 14:38:10 +02:00
parent 04b458a7ed
commit c907c85675

View file

@ -191,9 +191,9 @@ Tally::Tally(pugi::xml_node node)
case SCORE_DELAYED_NU_FISSION:
case SCORE_PROMPT_NU_FISSION:
case SCORE_DECAY_RATE:
warning("Particle filter is not used with photon transport"
" on and " +
reaction_name(score) + " score.");
warning("You are tallying the '" + reaction_name(score) +
"' score and haven't used a particle filter. This score will "
"include contributions from all particles.");
break;
}
}
@ -1283,7 +1283,8 @@ extern "C" int openmc_remove_tally(int32_t index)
if (index < 0 || index > model::tallies.size()) {
return OPENMC_E_OUT_OF_BOUNDS;
}
// grab tally so it's ID can be obtained to remove the (ID,index) pair from tally_map
// grab tally so it's ID can be obtained to remove the (ID,index) pair from
// tally_map
auto& tally = model::tallies[index];
// delete the tally via iterator pointing to correct position
// this calls the Tally destructor, removing the tally from the map as well