Refactor fixed source sampling so call to custom library is made from call to sample_external_source()

This commit is contained in:
davidjohnlong 2020-03-12 17:02:22 +00:00
parent 6c188f2578
commit ce135cc4a9
3 changed files with 10 additions and 15 deletions

View file

@ -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