mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 06:05:58 -04:00
Relocate surf_src_read setting check to be compatible with changes on external source logic
This commit is contained in:
parent
f1216d8b51
commit
a9af38a4dd
1 changed files with 14 additions and 14 deletions
|
|
@ -441,6 +441,20 @@ void read_settings_xml()
|
|||
}
|
||||
}
|
||||
|
||||
// Check if the user has specified to read surface source
|
||||
if (check_for_node(root, "surf_src_read")) {
|
||||
surf_src_read = true;
|
||||
// Get surface source read node
|
||||
xml_node node_ssr = root.child("surf_src_read");
|
||||
|
||||
std::string path = "surface_source.h5";
|
||||
// Check if the user has specified different file for surface source reading
|
||||
if (check_for_node(node_ssr, "path")) {
|
||||
path = get_node_value(node_ssr, "path", false, true);
|
||||
}
|
||||
model::external_sources.push_back(std::make_unique<FileSource>(path));
|
||||
}
|
||||
|
||||
// If no source specified, default to isotropic point source at origin with Watt spectrum
|
||||
if (model::external_sources.empty()) {
|
||||
model::external_sources.push_back(std::make_unique<IndependentSource>(
|
||||
|
|
@ -646,20 +660,6 @@ void read_settings_xml()
|
|||
}
|
||||
}
|
||||
|
||||
// Check if the user has specified to read surface source
|
||||
if (check_for_node(root, "surf_src_read")) {
|
||||
surf_src_read = true;
|
||||
// Get surface source read node
|
||||
xml_node node_ssr = root.child("surf_src_read");
|
||||
|
||||
std::string path = "surface_source.h5";
|
||||
// Check if the user has specified different file for surface source reading
|
||||
if (check_for_node(node_ssr, "path")) {
|
||||
path = get_node_value(node_ssr, "path", false, true);
|
||||
}
|
||||
model::external_sources.push_back(std::make_unique<FileSource>(path));
|
||||
}
|
||||
|
||||
// If source is not seperate and is to be written out in the statepoint file,
|
||||
// make sure that the sourcepoint batch numbers are contained in the
|
||||
// statepoint list
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue