Merge pull request #1844 from paulromano/surface-tally-bug

Disallow non-current scores with a surface filter
This commit is contained in:
Patrick Shriwise 2021-06-08 16:01:12 -05:00 committed by GitHub
commit f69149b66a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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