mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 21:55:41 -04:00
Apply formatting fixes from code review
Co-Authored-By: Paul Romano <paul.k.romano@gmail.com>
This commit is contained in:
parent
3c408c8c13
commit
2ec02d6472
7 changed files with 10 additions and 10 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -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]
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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'
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue