Fixing Universe.plot seed. (#2647)

Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
This commit is contained in:
Patrick Shriwise 2023-08-19 00:51:08 -05:00 committed by GitHub
parent 0964024442
commit fa245b0087
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 45 additions and 3 deletions

View file

@ -22,6 +22,7 @@
#include "openmc/mesh.h"
#include "openmc/message_passing.h"
#include "openmc/output.h"
#include "openmc/plot.h"
#include "openmc/random_lcg.h"
#include "openmc/simulation.h"
#include "openmc/source.h"
@ -390,6 +391,12 @@ void read_settings_xml(pugi::xml_node root)
}
}
// Copy plotting random number seed if specified
if (check_for_node(root, "plot_seed")) {
auto seed = std::stoll(get_node_value(root, "plot_seed"));
model::plotter_seed = seed;
}
// Copy random number seed if specified
if (check_for_node(root, "seed")) {
auto seed = std::stoll(get_node_value(root, "seed"));