mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-26 21:25:36 -04:00
Move cross section caches into Particle class
This commit is contained in:
parent
522b6be8eb
commit
8a8b7b2c0a
17 changed files with 495 additions and 535 deletions
|
|
@ -78,13 +78,6 @@ int openmc_simulation_init()
|
|||
mat->init_nuclide_index();
|
||||
}
|
||||
|
||||
// Create cross section caches
|
||||
#pragma omp parallel
|
||||
{
|
||||
simulation::micro_xs = new NuclideMicroXS[data::nuclides.size()];
|
||||
simulation::micro_photon_xs = new ElementMicroXS[data::elements.size()];
|
||||
}
|
||||
|
||||
// Reset global variables -- this is done before loading state point (as that
|
||||
// will potentially populate k_generation and entropy)
|
||||
simulation::current_batch = 0;
|
||||
|
|
@ -133,13 +126,6 @@ int openmc_simulation_finalize()
|
|||
mat->mat_nuclide_index_.clear();
|
||||
}
|
||||
|
||||
// Clear cross section caches
|
||||
#pragma omp parallel
|
||||
{
|
||||
delete[] simulation::micro_xs;
|
||||
delete[] simulation::micro_photon_xs;
|
||||
}
|
||||
|
||||
// Increment total number of generations
|
||||
simulation::total_gen += simulation::current_batch*settings::gen_per_batch;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue