diff --git a/include/openmc/bank.h b/include/openmc/bank.h index 7c74125c3..c20ae6fba 100644 --- a/include/openmc/bank.h +++ b/include/openmc/bank.h @@ -18,6 +18,8 @@ namespace simulation { extern std::vector source_bank; +extern std::vector surf_src_bank; + extern SharedArray fission_bank; extern std::vector progeny_per_particle; diff --git a/src/bank.cpp b/src/bank.cpp index 6053937b5..0fe3b7c44 100644 --- a/src/bank.cpp +++ b/src/bank.cpp @@ -17,6 +17,8 @@ namespace simulation { std::vector source_bank; +std::vector 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 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(); } diff --git a/src/simulation.cpp b/src/simulation.cpp index 1e35adeee..845ee5031 100644 --- a/src/simulation.cpp +++ b/src/simulation.cpp @@ -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()