Adding check for tracklength estimator with libmesh.

This commit is contained in:
Patrick Shriwise 2020-04-28 00:10:40 -05:00
parent b54bbad9d9
commit dd609b4191

View file

@ -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<MeshFilter*>(model::tally_filters[i].get());
int32_t mesh {-1};
if (df) { mesh = df->mesh(); }
auto lm = dynamic_cast<LibMesh*>(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()