From c6d2376bb077c44f728bd61a15487f308d6fe2da Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Tue, 1 Jun 2021 23:36:08 -0500 Subject: [PATCH] Disallow non-current scores with a surface filter --- src/tallies/tally.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/tallies/tally.cpp b/src/tallies/tally.cpp index 4c776528a4a..b159f43b03b 100644 --- a/src/tallies/tally.cpp +++ b/src/tallies/tally.cpp @@ -507,8 +507,11 @@ void Tally::set_scores(const vector& 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