Skip to content

Commit 7c966c3

Browse files
Copilotjtramm
andcommitted
Implement error detection for multiple point sources in same subdivided region
Co-authored-by: jtramm <1009059+jtramm@users.noreply.github.com>
1 parent 1fe4165 commit 7c966c3

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/random_ray/flat_source_domain.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1092,6 +1092,12 @@ void FlatSourceDomain::convert_external_sources()
10921092
// point_source_map to determine if there are any point source terms
10931093
// that should be applied.
10941094
SourceRegionKey key {sr, mesh_bin};
1095+
auto it = point_source_map_.find(key);
1096+
if (it != point_source_map_.end()) {
1097+
fatal_error("Multiple point sources detected in the same subdivided "
1098+
"source region. This is not supported in the random ray "
1099+
"solver.");
1100+
}
10951101
point_source_map_[key] = es;
10961102
} else {
10971103
// If we are not using mesh subdivision, we can apply the external

0 commit comments

Comments
 (0)