Skip to content

Commit f69149b

Browse files
authored
Merge pull request #1844 from paulromano/surface-tally-bug
Disallow non-current scores with a surface filter
2 parents f629ea0 + c6d2376 commit f69149b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/tallies/tally.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,8 +507,11 @@ void Tally::set_scores(const vector<std::string>& scores)
507507
if (type_ == TallyType::SURFACE || type_ == TallyType::MESH_SURFACE) {
508508
if (scores_.size() != 1)
509509
fatal_error("Cannot tally other scores in the same tally as surface "
510-
"currents");
510+
"currents.");
511511
}
512+
if ((surface_present || meshsurface_present) && scores_[0] != SCORE_CURRENT)
513+
fatal_error("Cannot tally score other than 'current' when using a surface "
514+
"or mesh-surface filter.");
512515
}
513516

514517
void

0 commit comments

Comments
 (0)