mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-29 06:35:48 -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
|
|
@ -71,13 +71,6 @@ void run_particle_restart()
|
|||
// Set verbosity high
|
||||
settings::verbosity = 10;
|
||||
|
||||
// Create cross section caches
|
||||
#pragma omp parallel
|
||||
{
|
||||
simulation::micro_xs = new NuclideMicroXS[data::nuclides.size()];
|
||||
simulation::micro_photon_xs = new ElementMicroXS[data::elements.size()];
|
||||
}
|
||||
|
||||
// Initialize the particle to be tracked
|
||||
Particle p;
|
||||
|
||||
|
|
@ -105,13 +98,6 @@ void run_particle_restart()
|
|||
|
||||
// Write output if particle made it
|
||||
print_particle(&p);
|
||||
|
||||
// Clear cross section caches
|
||||
#pragma omp parallel
|
||||
{
|
||||
delete[] simulation::micro_xs;
|
||||
delete[] simulation::micro_photon_xs;
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace openmc
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue