mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 22:26:08 -04:00
formatting cleanup
This commit is contained in:
parent
a7a7ceed12
commit
c60a7e569f
5 changed files with 10 additions and 10 deletions
|
|
@ -184,7 +184,7 @@ create_fission_sites(Particle* p, int i_nuclide, const Reaction* rx)
|
|||
Particle::Bank* site;
|
||||
if(use_fission_bank)
|
||||
{
|
||||
int idx;
|
||||
int64_t idx;
|
||||
#pragma omp atomic capture
|
||||
idx = simulation::fission_bank_length++;
|
||||
if( idx >= simulation::fission_bank_max )
|
||||
|
|
|
|||
|
|
@ -109,7 +109,6 @@ create_fission_sites(Particle* p)
|
|||
// Begin banking the source neutrons
|
||||
// First, if our bank is full then don't continue
|
||||
if (nu == 0) return;
|
||||
|
||||
|
||||
// Initialize the counter of delayed neutrons encountered for each delayed
|
||||
// group.
|
||||
|
|
@ -131,7 +130,7 @@ create_fission_sites(Particle* p)
|
|||
Particle::Bank* site;
|
||||
if(use_fission_bank)
|
||||
{
|
||||
int idx;
|
||||
int64_t idx;
|
||||
#pragma omp atomic capture
|
||||
idx = simulation::fission_bank_length++;
|
||||
if( idx >= simulation::fission_bank_max )
|
||||
|
|
|
|||
|
|
@ -394,7 +394,9 @@ void finalize_generation()
|
|||
global_tally_leakage = 0.0;
|
||||
|
||||
if (settings::run_mode == RUN_MODE_EIGENVALUE) {
|
||||
// If using shared memory, sort the fission bank so as to allow for reproducibility
|
||||
// If using shared memory, stable sort the fission bank (by parent IDs)
|
||||
// so as to allow for reproducibility regardless of which order particles
|
||||
// are run in.
|
||||
#ifdef _OPENMP
|
||||
std::stable_sort(simulation::fission_bank,
|
||||
simulation::fission_bank + simulation::fission_bank_length);
|
||||
|
|
@ -558,7 +560,7 @@ void free_memory_simulation()
|
|||
|
||||
void transport_history_based_single_particle(Particle& p)
|
||||
{
|
||||
while(true) {
|
||||
while (true) {
|
||||
p.event_calculate_xs();
|
||||
p.event_advance();
|
||||
if( p.collision_distance_ > p.boundary_.distance )
|
||||
|
|
|
|||
|
|
@ -115,8 +115,8 @@ apply_derivative_to_score(const Particle* p, int i_tally, int i_nuclide,
|
|||
// where (1/f * d_f/d_p) is the (logarithmic) flux derivative and p is the
|
||||
// perturbated variable.
|
||||
|
||||
const auto& deriv = model::tally_derivs[tally.deriv_];
|
||||
const auto& flux_deriv = p->flux_derivs_[tally.deriv_];
|
||||
const auto& deriv {model::tally_derivs[tally.deriv_]};
|
||||
const auto flux_deriv = p->flux_derivs_[tally.deriv_];
|
||||
|
||||
// Handle special cases where we know that d_c/d_p must be zero.
|
||||
if (score_bin == SCORE_FLUX) {
|
||||
|
|
@ -618,8 +618,7 @@ void score_collision_derivative(Particle* p)
|
|||
|
||||
const Material& material {*model::materials[p->material_]};
|
||||
|
||||
//for (auto& deriv : model::tally_derivs) {
|
||||
for (int idx = 0; idx < model::tally_derivs.size(); idx++) {
|
||||
for (auto idx = 0; idx < model::tally_derivs.size(); idx++) {
|
||||
const auto& deriv = model::tally_derivs[idx];
|
||||
auto& flux_deriv = p->flux_derivs_[idx];
|
||||
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ void finalize_particle_track(Particle& p)
|
|||
write_attribute(file_id, "version", VERSION_TRACK);
|
||||
write_attribute(file_id, "n_particles", p.tracks_.size());
|
||||
write_attribute(file_id, "n_coords", n_coords);
|
||||
for (int i = 1; i <= p.tracks_.size(); ++i) {
|
||||
for (auto i = 1; i <= p.tracks_.size(); ++i) {
|
||||
const auto& t {p.tracks_[i-1]};
|
||||
size_t n = t.size();
|
||||
xt::xtensor<double, 2> data({n,3});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue