mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 06:05:58 -04:00
Merge pull request #1773 from AI-Pranto/surface-source
[Fix] 'std::out_of_range' error
This commit is contained in:
commit
a760ec075b
4 changed files with 6 additions and 6 deletions
|
|
@ -88,7 +88,7 @@ extern RunMode run_mode; //!< Run mode (eigenvalue, fixed src, e
|
|||
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 std::unordered_set<int> source_write_surf_id; //!< Surface ids where sources will be written
|
||||
extern int64_t max_particles; //!< maximum number of particles to be banked on surfaces per process
|
||||
extern int64_t max_surface_particles; //!< 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]
|
||||
|
|
|
|||
|
|
@ -152,8 +152,8 @@ class Settings:
|
|||
|
||||
:surface_ids: List of surface ids at which crossing particles are to be
|
||||
banked (int)
|
||||
:max_particles: Maximum number of particles to be banked on surfaces
|
||||
per process (int)
|
||||
:max_particles: Maximum number of particles to be banked on
|
||||
surfaces per process (int)
|
||||
survival_biasing : bool
|
||||
Indicate whether survival biasing is to be used
|
||||
tabular_legendre : dict
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ RunMode run_mode {RunMode::UNSET};
|
|||
std::unordered_set<int> sourcepoint_batch;
|
||||
std::unordered_set<int> statepoint_batch;
|
||||
std::unordered_set<int> source_write_surf_id;
|
||||
int64_t max_particles;
|
||||
int64_t max_surface_particles;
|
||||
TemperatureMethod temperature_method {TemperatureMethod::NEAREST};
|
||||
double temperature_tolerance {10.0};
|
||||
double temperature_default {293.6};
|
||||
|
|
@ -656,7 +656,7 @@ void read_settings_xml()
|
|||
|
||||
// Get maximum number of particles to be banked per surface
|
||||
if (check_for_node(node_ssw, "max_particles")) {
|
||||
max_particles = std::stoi(get_node_value(node_ssw, "max_particles"));
|
||||
max_surface_particles = std::stoll(get_node_value(node_ssw, "max_particles"));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -289,7 +289,7 @@ void allocate_banks()
|
|||
|
||||
if (settings::surf_source_write) {
|
||||
// Allocate surface source bank
|
||||
simulation::surf_source_bank.reserve(settings::max_particles);
|
||||
simulation::surf_source_bank.reserve(settings::max_surface_particles);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue