From 2ec02d64722cc638eac6eba1ef1c33fcc52cb76c Mon Sep 17 00:00:00 2001 From: John Tramm Date: Tue, 3 Dec 2019 10:36:01 -0600 Subject: [PATCH] Apply formatting fixes from code review Co-Authored-By: Paul Romano --- include/openmc/mgxs.h | 2 +- include/openmc/scattdata.h | 4 ++-- include/openmc/secondary_nbody.h | 2 +- openmc/lib/math.py | 2 +- src/eigenvalue.cpp | 2 +- src/physics.cpp | 4 ++-- src/source.cpp | 4 ++-- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/include/openmc/mgxs.h b/include/openmc/mgxs.h index c14e4c1c4..f32415a24 100644 --- a/include/openmc/mgxs.h +++ b/include/openmc/mgxs.h @@ -166,7 +166,7 @@ class Mgxs { //! @param mu Sampled cosine of the change-in-angle. //! @param wgt Weight of the particle to be adjusted. //! @param prn_seeds Array of pseudorandom stream seeds - //! @param stream Pseudorandom stream index + //! @param stream Pseudorandom stream index void sample_scatter(int gin, int& gout, double& mu, double& wgt, uint64_t* prn_seeds, int stream); diff --git a/include/openmc/scattdata.h b/include/openmc/scattdata.h index 4a52ef922..fb5d4cd7a 100644 --- a/include/openmc/scattdata.h +++ b/include/openmc/scattdata.h @@ -66,7 +66,7 @@ class ScattData { //! @param mu Sampled cosine of the change-in-angle. //! @param wgt Weight of the particle to be adjusted. //! @param prn_seeds Array of pseudorandom stream seeds - //! @param stream Pseudorandom stream index + //! @param stream Pseudorandom stream index virtual void sample(int gin, int& gout, double& mu, double& wgt, uint64_t* prn_seeds, int stream) = 0; @@ -113,7 +113,7 @@ class ScattData { //! @param gout Sampled outgoing energy group. //! @param i_gout Sampled outgoing energy group index. //! @param prn_seeds Array of pseudorandom stream seeds - //! @param stream Pseudorandom stream index + //! @param stream Pseudorandom stream index void sample_energy(int gin, int& gout, int& i_gout, uint64_t* prn_seeds, int stream); diff --git a/include/openmc/secondary_nbody.h b/include/openmc/secondary_nbody.h index bd50bceb4..0f8695c2e 100644 --- a/include/openmc/secondary_nbody.h +++ b/include/openmc/secondary_nbody.h @@ -27,7 +27,7 @@ public: //! \param[inout] prn_seeds Array of pseudorandom seeds //! \param[in] stream Pseudorandom stream index void sample(double E_in, double& E_out, double& mu, uint64_t* prn_seeds, - int stream) const override; + int stream) const override; private: int n_bodies_; //!< Number of particles distributed double mass_ratio_; //!< Total mass of particles [neutron mass] diff --git a/openmc/lib/math.py b/openmc/lib/math.py index 1d0265e03..f1997b351 100644 --- a/openmc/lib/math.py +++ b/openmc/lib/math.py @@ -1,4 +1,4 @@ -from ctypes import (c_int, c_double, POINTER, c_uint64) +from ctypes import c_int, c_double, POINTER, c_uint64 import numpy as np from numpy.ctypeslib import ndpointer diff --git a/src/eigenvalue.cpp b/src/eigenvalue.cpp index fdfab2ef0..4d4ac420e 100644 --- a/src/eigenvalue.cpp +++ b/src/eigenvalue.cpp @@ -116,7 +116,7 @@ void synchronize_bank() // Create pseudorandom number streams uint64_t prn_seeds[N_STREAMS]; // seeds - int stream = STREAM_TRACKING; // current RNG stream + int stream = STREAM_TRACKING; // current RNG stream // Make sure all processors start at the same point for random sampling. Then // skip ahead in the sequence using the starting index in the 'global' diff --git a/src/physics.cpp b/src/physics.cpp index d3c4c4ded..84b318f84 100644 --- a/src/physics.cpp +++ b/src/physics.cpp @@ -133,9 +133,9 @@ void sample_neutron_reaction(Particle* p) // Advance URR seed stream 'N' times after energy changes if (p->E_ != p->E_last_) { - p->stream_ = STREAM_URR_PTABLE; + p->stream_ = STREAM_URR_PTABLE; advance_prn_seed(data::nuclides.size(), p->prn_seeds_, p->stream_); - p->stream_ = STREAM_TRACKING; + p->stream_ = STREAM_TRACKING; } // Play russian roulette if survival biasing is turned on diff --git a/src/source.cpp b/src/source.cpp index 64b46b5f1..320034735 100644 --- a/src/source.cpp +++ b/src/source.cpp @@ -270,7 +270,7 @@ void initialize_source() // initialize random number seed int64_t id = simulation::total_gen*settings::n_particles + simulation::work_index[mpi::rank] + i + 1; - uint64_t prn_seeds[N_STREAMS]; + uint64_t prn_seeds[N_STREAMS]; set_particle_seed(id, prn_seeds); // sample external source distribution @@ -334,7 +334,7 @@ void fill_source_bank_fixedsource() // initialize random number seed int64_t id = (simulation::total_gen + overall_generation()) * settings::n_particles + simulation::work_index[mpi::rank] + i + 1; - uint64_t prn_seeds[N_STREAMS]; + uint64_t prn_seeds[N_STREAMS]; set_particle_seed(id, prn_seeds); // sample external source distribution