mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 21:55:41 -04:00
Add a new bank type surf_src_bank for surface source banking
This commit is contained in:
parent
cfed9cda8e
commit
209394082e
3 changed files with 8 additions and 0 deletions
|
|
@ -18,6 +18,8 @@ namespace simulation {
|
|||
|
||||
extern std::vector<Particle::Bank> source_bank;
|
||||
|
||||
extern std::vector<Particle::Bank> surf_src_bank;
|
||||
|
||||
extern SharedArray<Particle::Bank> fission_bank;
|
||||
|
||||
extern std::vector<int64_t> progeny_per_particle;
|
||||
|
|
|
|||
|
|
@ -17,6 +17,8 @@ namespace simulation {
|
|||
|
||||
std::vector<Particle::Bank> source_bank;
|
||||
|
||||
std::vector<Particle::Bank> surf_src_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
|
||||
|
|
@ -37,6 +39,7 @@ std::vector<int64_t> progeny_per_particle;
|
|||
void free_memory_bank()
|
||||
{
|
||||
simulation::source_bank.clear();
|
||||
simulation::surf_src_bank.clear();
|
||||
simulation::fission_bank.clear();
|
||||
simulation::progeny_per_particle.clear();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -283,8 +283,11 @@ void allocate_banks()
|
|||
{
|
||||
// Allocate source bank
|
||||
simulation::source_bank.resize(simulation::work_per_rank);
|
||||
|
||||
// Allocate fission bank
|
||||
init_fission_bank(3*simulation::work_per_rank);
|
||||
|
||||
simulation::surf_src_bank.resize(simulation::work_per_rank);
|
||||
}
|
||||
|
||||
void initialize_batch()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue