Skip to content

Commit

Permalink
Merge pull request #1844 from paulromano/surface-tally-bug
Browse files Browse the repository at this point in the history
Disallow non-current scores with a surface filter
  • Loading branch information
pshriwise authored Jun 8, 2021
2 parents f629ea0 + c6d2376 commit f69149b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/tallies/tally.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -507,8 +507,11 @@ void Tally::set_scores(const vector<std::string>& scores)
if (type_ == TallyType::SURFACE || type_ == TallyType::MESH_SURFACE) {
if (scores_.size() != 1)
fatal_error("Cannot tally other scores in the same tally as surface "
"currents");
"currents.");
}
if ((surface_present || meshsurface_present) && scores_[0] != SCORE_CURRENT)
fatal_error("Cannot tally score other than 'current' when using a surface "
"or mesh-surface filter.");
}

void
Expand Down

0 comments on commit f69149b

Please sign in to comment.