mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 06:05:58 -04:00
Rename variables for better readability
This commit is contained in:
parent
82606011c0
commit
f388ac2e1e
4 changed files with 11 additions and 12 deletions
|
|
@ -45,7 +45,7 @@ extern "C" bool run_CE; //!< run with continuous-energy data?
|
|||
extern bool source_latest; //!< write latest source at each batch?
|
||||
extern bool source_separate; //!< write source to separate file?
|
||||
extern bool source_write; //!< write source in HDF5 files?
|
||||
extern bool surface_source; //!< write surface source file?
|
||||
extern bool surf_src_write; //!< write surface source file?
|
||||
extern bool surf_src_read; //!< read surface source file?
|
||||
extern bool survival_biasing; //!< use survival biasing?
|
||||
extern bool temperature_multipole; //!< use multipole data?
|
||||
|
|
@ -87,7 +87,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 int64_t max_surf_banks; //!< maximum number of particles to be banked on surfaces
|
||||
extern int64_t max_surf_banks; //!< maximum number of particles to be banked on surfaces per process
|
||||
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]
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ bool run_CE {true};
|
|||
bool source_latest {false};
|
||||
bool source_separate {false};
|
||||
bool source_write {true};
|
||||
bool surface_source {false};
|
||||
bool surf_src_write {false};
|
||||
bool surf_src_read {false};
|
||||
bool survival_biasing {false};
|
||||
bool temperature_multipole {false};
|
||||
|
|
@ -626,15 +626,14 @@ void read_settings_xml()
|
|||
}
|
||||
|
||||
// Check if the user has specified to write surface source.
|
||||
if (check_for_node(root, "surface_source")) {
|
||||
surface_source = true;
|
||||
if (check_for_node(root, "surf_src_write")) {
|
||||
surf_src_write = true;
|
||||
// Get surface source node
|
||||
xml_node node_ss = root.child("surface_source");
|
||||
xml_node node_ss = root.child("surf_src_write");
|
||||
|
||||
// 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"));
|
||||
max_surf_banks = std::stoi(get_node_value(node_ss, "max_surf_banks"));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -294,7 +294,7 @@ void allocate_banks()
|
|||
simulation::source_bank.resize(simulation::work_per_rank);
|
||||
}
|
||||
|
||||
if (settings::surface_source) {
|
||||
if (settings::surf_src_write) {
|
||||
// Allocate surface source bank
|
||||
simulation::surf_src_bank.reserve(settings::max_surf_banks);
|
||||
}
|
||||
|
|
@ -391,7 +391,7 @@ void finalize_batch()
|
|||
}
|
||||
|
||||
// Write out surface source if requested.
|
||||
if (settings::surface_source && simulation::current_batch == settings::n_batches) {
|
||||
if (settings::surf_src_write && simulation::current_batch == settings::n_batches) {
|
||||
|
||||
auto filename = settings::path_output + "surface_source.h5";
|
||||
write_source_point(filename.c_str(), true); //!!
|
||||
|
|
|
|||
|
|
@ -82,8 +82,8 @@ IndependentSource::IndependentSource(pugi::xml_node node)
|
|||
}
|
||||
|
||||
// Check if it is a surface source file.
|
||||
if (check_for_node(node, "surf_src_file")) {
|
||||
settings::surf_src_read = get_node_value_bool(node, "surf_src_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")) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue