mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-29 06:35:48 -04:00
refactor of prn() interface and python interface changes
This commit is contained in:
parent
2ec02d6472
commit
638172e68d
53 changed files with 494 additions and 534 deletions
|
|
@ -125,16 +125,15 @@ std::vector<VolumeCalculation::Result> VolumeCalculation::execute() const
|
|||
std::vector<std::vector<int>> hits(n);
|
||||
Particle p;
|
||||
|
||||
uint64_t prn_seeds[N_STREAMS];
|
||||
int stream = STREAM_VOLUME;
|
||||
|
||||
// Sample locations and count hits
|
||||
#pragma omp for
|
||||
for (size_t i = i_start; i < i_end; i++) {
|
||||
set_particle_seed(iterations * n_samples_ + i, prn_seeds);
|
||||
uint64_t prn_seed;
|
||||
int64_t id = iterations * n_samples_ + i;
|
||||
init_seed(id, &prn_seed, STREAM_VOLUME);
|
||||
|
||||
p.n_coord_ = 1;
|
||||
Position xi {prn(prn_seeds, stream), prn(prn_seeds, stream), prn(prn_seeds, stream)};
|
||||
Position xi {prn(&prn_seed), prn(&prn_seed), prn(&prn_seed)};
|
||||
p.r() = lower_left_ + xi*(upper_right_ - lower_left_);
|
||||
p.u() = {0.5, 0.5, 0.5};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue