mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 21:55:41 -04:00
address PR comments
This commit is contained in:
parent
f0e1110e01
commit
061156e79a
35 changed files with 110 additions and 114 deletions
10
src/bank.cpp
10
src/bank.cpp
|
|
@ -16,15 +16,15 @@ namespace openmc {
|
|||
|
||||
namespace simulation {
|
||||
|
||||
vector<ParticleBank> source_bank;
|
||||
vector<SourceSite> source_bank;
|
||||
|
||||
SharedArray<ParticleBank> surf_source_bank;
|
||||
SharedArray<SourceSite> surf_source_bank;
|
||||
|
||||
// The fission bank is allocated as a SharedArray, rather than a vector, as it will
|
||||
// be shared by all threads in the simulation. It will be allocated to a fixed
|
||||
// maximum capacity in the init_fission_bank() function. Then, Elements will be
|
||||
// added to it by using SharedArray's special thread_safe_append() function.
|
||||
SharedArray<ParticleBank> fission_bank;
|
||||
SharedArray<SourceSite> fission_bank;
|
||||
|
||||
// Each entry in this vector corresponds to the number of progeny produced
|
||||
// this generation for the particle located at that index. This vector is
|
||||
|
|
@ -80,8 +80,8 @@ void sort_fission_bank()
|
|||
// We need a scratch vector to make permutation of the fission bank into
|
||||
// sorted order easy. Under normal usage conditions, the fission bank is
|
||||
// over provisioned, so we can use that as scratch space.
|
||||
ParticleBank* sorted_bank;
|
||||
vector<ParticleBank> sorted_bank_holder;
|
||||
SourceSite* sorted_bank;
|
||||
vector<SourceSite> sorted_bank_holder;
|
||||
|
||||
// If there is not enough space, allocate a temporary vector and point to it
|
||||
if (simulation::fission_bank.size() > simulation::fission_bank.capacity() / 2) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue