mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-26 13:15:39 -04:00
Change the way surface source reading flag is given
This commit is contained in:
parent
c4b39cdb6c
commit
f2bdae918c
2 changed files with 19 additions and 5 deletions
|
|
@ -646,6 +646,25 @@ 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_ss = root.child("surf_src_read");
|
||||
|
||||
settings::path_source = "surface_source.h5";
|
||||
// Check if the user has specified different file for surface source reading
|
||||
if (check_for_node(node_ss, "file")) {
|
||||
settings::path_source = get_node_value(node_ss, "file", 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));
|
||||
}
|
||||
}
|
||||
|
||||
// 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
|
||||
|
|
|
|||
|
|
@ -81,11 +81,6 @@ IndependentSource::IndependentSource(pugi::xml_node node)
|
|||
settings::path_source));
|
||||
}
|
||||
|
||||
// Check if it is a surface source file.
|
||||
if (check_for_node(node, "surf_src_read")) {
|
||||
settings::surf_src_read = get_node_value_bool(node, "surf_src_read");
|
||||
}
|
||||
|
||||
} else if (check_for_node(node, "library")) {
|
||||
settings::path_source_library = get_node_value(node, "library", false, true);
|
||||
if (!file_exists(settings::path_source_library)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue