Set the maximum number of particles to be banked on surfaces

This commit is contained in:
YoungHui Park 2020-07-06 13:40:04 -05:00
parent d48b7df594
commit abca6e580d
2 changed files with 11 additions and 1 deletions

View file

@ -86,6 +86,7 @@ extern std::vector<std::string> res_scat_nuclides; //!< Nuclides using res. ups
extern RunMode run_mode; //!< Run mode (eigenvalue, fixed src, etc.)
extern std::unordered_set<int> sourcepoint_batch; //!< Batches when source should be written
extern std::unordered_set<int> statepoint_batch; //!< Batches when state should be written
extern int max_surf_banks; //!< maximum number of particles to be banked on surfaces
extern TemperatureMethod temperature_method; //!< method for choosing temperatures
extern double temperature_tolerance; //!< Tolerance in [K] on choosing temperatures
extern double temperature_default; //!< Default T in [K]

View file

@ -99,6 +99,7 @@ std::vector<std::string> res_scat_nuclides;
RunMode run_mode {RunMode::UNSET};
std::unordered_set<int> sourcepoint_batch;
std::unordered_set<int> statepoint_batch;
int max_surf_banks;
TemperatureMethod temperature_method {TemperatureMethod::NEAREST};
double temperature_tolerance {10.0};
double temperature_default {293.6};
@ -625,7 +626,15 @@ void read_settings_xml()
// Check if the user has specified to write surface source.
if (check_for_node(root, "surface_source")) {
surface_source = get_node_value_bool(root, "surface_source");
surface_source = true;
// Get surface source node
xml_node node_ss = root.child("surface_source");
// Get maximum number of particles to be banked per surface.
if (check_for_node(node_ss, "max_surf_banks")) {
max_surf_banks = std::stoi(get_node_value(node_ss,
"max_surf_banks"));
}
}
// If source is not seperate and is to be written out in the statepoint file,