mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 14:15:42 -04:00
Fix old surface source reading on settings
This commit is contained in:
parent
aa838872c4
commit
f1216d8b51
1 changed files with 3 additions and 8 deletions
|
|
@ -652,17 +652,12 @@ void read_settings_xml()
|
|||
// Get surface source read node
|
||||
xml_node node_ssr = root.child("surf_src_read");
|
||||
|
||||
settings::path_source = "surface_source.h5";
|
||||
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")) {
|
||||
settings::path_source = get_node_value(node_ssr, "path", false, true);
|
||||
path = get_node_value(node_ssr, "path", false, true);
|
||||
}
|
||||
|
||||
// Check if surface source file exists
|
||||
if (!file_exists(settings::path_source)) {
|
||||
fatal_error(fmt::format("Source file '{}' does not exist.",
|
||||
settings::path_source));
|
||||
}
|
||||
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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue