Merge branch 'develop' into add_enums2

This commit is contained in:
Gavin Ridley 2020-01-21 13:13:50 -05:00 committed by GitHub
commit 7df7fc280b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
46 changed files with 1014 additions and 694 deletions

View file

@ -10,7 +10,9 @@
#include "openmc/random_lcg.h"
#include "openmc/settings.h"
#include "openmc/simulation.h"
#include "openmc/tallies/derivative.h"
#include "openmc/tallies/tally.h"
#include "openmc/track_output.h"
#include <algorithm> // for copy
#include <array>
@ -100,8 +102,25 @@ void run_particle_restart()
}
init_particle_seeds(particle_seed, p.seeds_);
// Force calculation of cross-sections by setting last energy to zero
if (settings::run_CE) {
for (auto& micro : p.neutron_xs_) micro.last_E = 0.0;
}
// Prepare to write out particle track.
if (p.write_track_) add_particle_track(p);
// Every particle starts with no accumulated flux derivative.
if (!model::active_tallies.empty()) {
p.flux_derivs_.resize(model::tally_derivs.size(), 0.0);
std::fill(p.flux_derivs_.begin(), p.flux_derivs_.end(), 0.0);
}
// Allocate space for tally filter matches
p.filter_matches_.resize(model::tally_filters.size());
// Transport neutron
p.transport();
transport_history_based_single_particle(p);
// Write output if particle made it
print_particle(&p);