From dd609b4191ea4fb95ad4d762eb42b4748e79b72e Mon Sep 17 00:00:00 2001 From: Patrick Shriwise Date: Tue, 28 Apr 2020 00:10:40 -0500 Subject: [PATCH] Adding check for tracklength estimator with libmesh. --- src/tallies/tally.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/tallies/tally.cpp b/src/tallies/tally.cpp index 038bcec649..04fc238967 100644 --- a/src/tallies/tally.cpp +++ b/src/tallies/tally.cpp @@ -282,6 +282,21 @@ Tally::Tally(pugi::xml_node node) "Invalid estimator '{}' on tally {}", est, id_)}; } } + +#ifdef LIBMESH + // ensure a tracklength tally isn't used with a libMesh filter + for (auto i : this->filters_) { + auto df = dynamic_cast(model::tally_filters[i].get()); + int32_t mesh {-1}; + if (df) { mesh = df->mesh(); } + auto lm = dynamic_cast(model::meshes[mesh].get()); + if (lm && estimator_ == TallyEstimator::TRACKLENGTH) { + fatal_error("A tracklength estimator cannot be used with " + "an unstructured LibMesh tally."); + } + } +#endif + } Tally::~Tally()