mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-25 20:45:35 -04:00
Refactor fixed source sampling so call to custom library is made from call to sample_external_source()
This commit is contained in:
parent
6c188f2578
commit
ce135cc4a9
3 changed files with 10 additions and 15 deletions
|
|
@ -457,12 +457,7 @@ void initialize_history(Particle* p, int64_t index_source)
|
|||
simulation::work_index[mpi::rank] + index_source;
|
||||
uint64_t seed = init_seed(id, STREAM_SOURCE);
|
||||
// sample from external source distribution or custom library then set
|
||||
Particle::Bank site;
|
||||
if (!settings::path_source_library.empty()) {
|
||||
site = sample_custom_source_library(&seed);
|
||||
} else {
|
||||
site = sample_external_source(&seed);
|
||||
}
|
||||
auto site = sample_external_source(&seed);
|
||||
p->from_source(&site);
|
||||
} else if (settings::run_mode == RunMode::EIGENVALUE) {
|
||||
// set defaults for eigenvalue simulations from primary bank
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue