mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 21:55:41 -04:00
Adding check for tracklength estimator with libmesh.
This commit is contained in:
parent
b54bbad9d9
commit
dd609b4191
1 changed files with 15 additions and 0 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue