mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 05:35:49 -04:00
Allow plots.xml to be read if model.xml doesn't contain plots
This commit is contained in:
parent
d1036561a9
commit
35ef5b06f8
1 changed files with 10 additions and 2 deletions
|
|
@ -358,7 +358,7 @@ bool read_model_xml()
|
|||
for (const auto& input : other_inputs) {
|
||||
if (file_exists(settings::path_input + input)) {
|
||||
warning((fmt::format("Other XML file input(s) are present. These files "
|
||||
"will be ignored in favor of the {} file.",
|
||||
"may be ignored in favor of the {} file.",
|
||||
model_filename)));
|
||||
break;
|
||||
}
|
||||
|
|
@ -392,8 +392,16 @@ bool read_model_xml()
|
|||
// Initialize distribcell_filters
|
||||
prepare_distribcell();
|
||||
|
||||
if (check_for_node(root, "plots"))
|
||||
if (check_for_node(root, "plots")) {
|
||||
read_plots_xml(root.child("plots"));
|
||||
} else {
|
||||
// When no <plots> element is present in the model.xml file, check for a
|
||||
// regular plots.xml file
|
||||
std::string filename = settings::path_input + "plots.xml";
|
||||
if (file_exists(filename)) {
|
||||
read_plots_xml();
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue