From 1fe41658fdbde7a83591f9de4eed077611ff63b3 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 26 Jun 2025 17:10:37 +0000 Subject: [PATCH 1/5] Initial plan From 7c966c31e32bda26ea42a257ddd312f2459229a9 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 26 Jun 2025 17:19:26 +0000 Subject: [PATCH 2/5] Implement error detection for multiple point sources in same subdivided region Co-authored-by: jtramm <1009059+jtramm@users.noreply.github.com> --- src/random_ray/flat_source_domain.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/random_ray/flat_source_domain.cpp b/src/random_ray/flat_source_domain.cpp index 41e93ec945d..f9f82a9d63c 100644 --- a/src/random_ray/flat_source_domain.cpp +++ b/src/random_ray/flat_source_domain.cpp @@ -1092,6 +1092,12 @@ void FlatSourceDomain::convert_external_sources() // point_source_map to determine if there are any point source terms // that should be applied. SourceRegionKey key {sr, mesh_bin}; + auto it = point_source_map_.find(key); + if (it != point_source_map_.end()) { + fatal_error("Multiple point sources detected in the same subdivided " + "source region. This is not supported in the random ray " + "solver."); + } point_source_map_[key] = es; } else { // If we are not using mesh subdivision, we can apply the external From b7c6bd4fc774db37d02711ee1b33d2d8c8e7090e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 26 Jun 2025 18:33:00 +0000 Subject: [PATCH 3/5] Update error message wording to indicate temporary limitation Co-authored-by: jtramm <1009059+jtramm@users.noreply.github.com> --- src/random_ray/flat_source_domain.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/random_ray/flat_source_domain.cpp b/src/random_ray/flat_source_domain.cpp index f9f82a9d63c..59b6b933f17 100644 --- a/src/random_ray/flat_source_domain.cpp +++ b/src/random_ray/flat_source_domain.cpp @@ -1095,7 +1095,7 @@ void FlatSourceDomain::convert_external_sources() auto it = point_source_map_.find(key); if (it != point_source_map_.end()) { fatal_error("Multiple point sources detected in the same subdivided " - "source region. This is not supported in the random ray " + "source region. This is not currently supported in the random ray " "solver."); } point_source_map_[key] = es; From 72114421091bc7cae039f06949e2474f3b32f615 Mon Sep 17 00:00:00 2001 From: John Tramm Date: Fri, 27 Jun 2025 08:42:25 -0500 Subject: [PATCH 4/5] Update src/random_ray/flat_source_domain.cpp Co-authored-by: Jon Shimwell --- src/random_ray/flat_source_domain.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/random_ray/flat_source_domain.cpp b/src/random_ray/flat_source_domain.cpp index 59b6b933f17..884745a4d69 100644 --- a/src/random_ray/flat_source_domain.cpp +++ b/src/random_ray/flat_source_domain.cpp @@ -1094,9 +1094,9 @@ void FlatSourceDomain::convert_external_sources() SourceRegionKey key {sr, mesh_bin}; auto it = point_source_map_.find(key); if (it != point_source_map_.end()) { - fatal_error("Multiple point sources detected in the same subdivided " - "source region. This is not currently supported in the random ray " - "solver."); + fatal_error( + "Multiple point sources detected in the same subdivided source region." + "This is not currently supported in the random ray solver."); } point_source_map_[key] = es; } else { From 875a0ec17a512cbcaa368af2eb31af4914783f42 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 27 Jun 2025 13:46:26 +0000 Subject: [PATCH 5/5] Fix C++ formatting for multi-line string in error message Co-authored-by: jtramm <1009059+jtramm@users.noreply.github.com> --- src/random_ray/flat_source_domain.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/random_ray/flat_source_domain.cpp b/src/random_ray/flat_source_domain.cpp index 884745a4d69..ef42d88446c 100644 --- a/src/random_ray/flat_source_domain.cpp +++ b/src/random_ray/flat_source_domain.cpp @@ -1095,7 +1095,8 @@ void FlatSourceDomain::convert_external_sources() auto it = point_source_map_.find(key); if (it != point_source_map_.end()) { fatal_error( - "Multiple point sources detected in the same subdivided source region." + "Multiple point sources detected in the same subdivided source " + "region." "This is not currently supported in the random ray solver."); } point_source_map_[key] = es;