From 8b95bd4ee0fa0ca6e5f054ac5918c3c56da42f4f Mon Sep 17 00:00:00 2001 From: Patrick Shriwise Date: Fri, 17 Jun 2022 13:24:36 -0500 Subject: [PATCH 1/2] Write material id in DAGMC lost particle message --- src/dagmc.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/dagmc.cpp b/src/dagmc.cpp index e780d2e77f..0368dbfa76 100644 --- a/src/dagmc.cpp +++ b/src/dagmc.cpp @@ -596,8 +596,12 @@ std::pair DAGCell::distance( dist = INFINITY; if (!dagmc_ptr_->is_implicit_complement(vol) || model::universe_map[dag_univ->id_] == model::root_universe) { + int32_t material_id = p->material() == MATERIAL_VOID + ? -1 + : model::materials[p->material()]->id(); p->mark_as_lost( - fmt::format("No intersection found with DAGMC cell {}", id_)); + fmt::format("No intersection found with DAGMC cell {}, material {}", + id_, material_id)); } } From 1f05c3b016119426b2fe98c8870fda1b2d4f6289 Mon Sep 17 00:00:00 2001 From: Patrick Shriwise Date: Sun, 19 Jun 2022 00:59:05 -0500 Subject: [PATCH 2/2] Updating marked as lost message for clarity --- src/dagmc.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/dagmc.cpp b/src/dagmc.cpp index 0368dbfa76..8ce5aabdad 100644 --- a/src/dagmc.cpp +++ b/src/dagmc.cpp @@ -596,9 +596,9 @@ std::pair DAGCell::distance( dist = INFINITY; if (!dagmc_ptr_->is_implicit_complement(vol) || model::universe_map[dag_univ->id_] == model::root_universe) { - int32_t material_id = p->material() == MATERIAL_VOID - ? -1 - : model::materials[p->material()]->id(); + std::string material_id = p->material() == MATERIAL_VOID + ? "-1 (VOID)" + : std::to_string(model::materials[p->material()]->id()); p->mark_as_lost( fmt::format("No intersection found with DAGMC cell {}, material {}", id_, material_id));