Support track file writing for particle restart runs. (#2957)

Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
This commit is contained in:
Patrick Shriwise 2024-04-24 17:14:17 -05:00 committed by GitHub
parent f543c007a3
commit 7936b8a59c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 40 additions and 1 deletions

View file

@ -87,8 +87,10 @@ void run_particle_restart()
read_particle_restart(p, previous_run_mode);
// write track if that was requested on command line
if (settings::write_all_tracks)
if (settings::write_all_tracks) {
open_track_file();
p.write_track() = true;
}
// Set all tallies to 0 for now (just tracking errors)
model::tallies.clear();
@ -123,6 +125,10 @@ void run_particle_restart()
// Write output if particle made it
print_particle(p);
if (settings::write_all_tracks) {
close_track_file();
}
}
} // namespace openmc