mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 14:15:42 -04:00
moved shared fission bank and event based functions around. Created new event files for event-based logic.
This commit is contained in:
parent
8aaa97a0bd
commit
e60dd30079
10 changed files with 324 additions and 279 deletions
28
src/bank.cpp
28
src/bank.cpp
|
|
@ -18,10 +18,10 @@ namespace simulation {
|
|||
|
||||
std::vector<Particle::Bank> source_bank;
|
||||
std::vector<Particle::Bank> fission_bank;
|
||||
//std::vector<Particle::Bank> secondary_bank;
|
||||
#ifdef _OPENMP
|
||||
std::vector<Particle::Bank> master_fission_bank;
|
||||
#endif
|
||||
|
||||
Particle::Bank* shared_fission_bank;
|
||||
int shared_fission_bank_length {0};
|
||||
int shared_fission_bank_max;
|
||||
|
||||
} // namespace simulation
|
||||
|
||||
|
|
@ -32,13 +32,19 @@ std::vector<Particle::Bank> master_fission_bank;
|
|||
void free_memory_bank()
|
||||
{
|
||||
simulation::source_bank.clear();
|
||||
#pragma omp parallel
|
||||
{
|
||||
simulation::fission_bank.clear();
|
||||
}
|
||||
#ifdef _OPENMP
|
||||
simulation::master_fission_bank.clear();
|
||||
#endif
|
||||
simulation::fission_bank.clear();
|
||||
}
|
||||
|
||||
void init_shared_fission_bank(int max)
|
||||
{
|
||||
simulation::shared_fission_bank_max = max;
|
||||
simulation::shared_fission_bank = new Particle::Bank[max];
|
||||
}
|
||||
|
||||
void free_shared_fission_bank(void)
|
||||
{
|
||||
delete[] simulation::shared_fission_bank;
|
||||
simulation::shared_fission_bank_length = 0;
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue