mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 05:35:49 -04:00
Write all tracks to a single file
This commit is contained in:
parent
2e9560a72c
commit
365aa0b0eb
6 changed files with 130 additions and 62 deletions
|
|
@ -82,6 +82,11 @@ int openmc_simulation_init()
|
|||
// Allocate source, fission and surface source banks.
|
||||
allocate_banks();
|
||||
|
||||
// Create track file if needed
|
||||
if (!settings::track_identifiers.empty() || settings::write_all_tracks) {
|
||||
open_track_file();
|
||||
}
|
||||
|
||||
// If doing an event-based simulation, intialize the particle buffer
|
||||
// and event queues
|
||||
if (settings::event_based) {
|
||||
|
|
@ -152,6 +157,11 @@ int openmc_simulation_finalize()
|
|||
mat->mat_nuclide_index_.clear();
|
||||
}
|
||||
|
||||
// Close track file if open
|
||||
if (!settings::track_identifiers.empty() || settings::write_all_tracks) {
|
||||
close_track_file();
|
||||
}
|
||||
|
||||
// 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