Fixed Source Random Ray (#2988)

Co-authored-by: Gavin Ridley <gavin.keith.ridley@gmail.com>
Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
This commit is contained in:
John Tramm 2024-06-17 11:02:20 -05:00 committed by GitHub
parent b1b8a4c328
commit 5222b343a4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
21 changed files with 2064 additions and 369 deletions

View file

@ -191,7 +191,8 @@ void get_run_parameters(pugi::xml_node node_base)
}
// Get number of inactive batches
if (run_mode == RunMode::EIGENVALUE) {
if (run_mode == RunMode::EIGENVALUE ||
solver_type == SolverType::RANDOM_RAY) {
if (check_for_node(node_base, "inactive")) {
n_inactive = std::stoi(get_node_value(node_base, "inactive"));
}
@ -524,8 +525,9 @@ void read_settings_xml(pugi::xml_node root)
}
// If no source specified, default to isotropic point source at origin with
// Watt spectrum
if (model::external_sources.empty()) {
// Watt spectrum. No default source is needed in random ray mode.
if (model::external_sources.empty() &&
settings::solver_type != SolverType::RANDOM_RAY) {
double T[] {0.0};
double p[] {1.0};
model::external_sources.push_back(make_unique<IndependentSource>(