mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 21:55:41 -04:00
Support track file writing for particle restart runs. (#2957)
Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
This commit is contained in:
parent
f543c007a3
commit
7936b8a59c
2 changed files with 40 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue