mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-26 21:25:36 -04:00
Add properties to settings w/ documentation, c++ loading of filename, and python round-trip test (#3808)
Co-authored-by: Patrick C Shriwise <pshriwise@gmail.com> Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
This commit is contained in:
parent
4bda85f17e
commit
dd6d31bfae
8 changed files with 129 additions and 4 deletions
|
|
@ -97,6 +97,7 @@ std::string path_sourcepoint;
|
|||
std::string path_statepoint;
|
||||
const char* path_statepoint_c {path_statepoint.c_str()};
|
||||
std::string weight_windows_file;
|
||||
std::string properties_file;
|
||||
|
||||
int32_t n_inactive {0};
|
||||
int32_t max_lost_particles {10};
|
||||
|
|
@ -751,6 +752,14 @@ void read_settings_xml(pugi::xml_node root)
|
|||
}
|
||||
}
|
||||
|
||||
// read properties from file
|
||||
if (check_for_node(root, "properties_file")) {
|
||||
properties_file = get_node_value(root, "properties_file");
|
||||
if (!file_exists(properties_file)) {
|
||||
fatal_error(fmt::format("File '{}' does not exist.", properties_file));
|
||||
}
|
||||
}
|
||||
|
||||
// Particle trace
|
||||
if (check_for_node(root, "trace")) {
|
||||
auto temp = get_node_array<int64_t>(root, "trace");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue