mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 14:15:42 -04:00
Fix writing final position of each particle to track file
This commit is contained in:
parent
8b270dd59b
commit
452a24c8ce
1 changed files with 5 additions and 1 deletions
|
|
@ -337,6 +337,11 @@ void Particle::event_revive_from_secondary()
|
|||
|
||||
// Check for secondary particles if this particle is dead
|
||||
if (!alive()) {
|
||||
// Write final position for this particle
|
||||
if (write_track()) {
|
||||
write_particle_track(*this);
|
||||
}
|
||||
|
||||
// If no secondary particles, break out of event loop
|
||||
if (secondary_bank().empty())
|
||||
return;
|
||||
|
|
@ -359,7 +364,6 @@ void Particle::event_death()
|
|||
|
||||
// Finish particle track output.
|
||||
if (write_track()) {
|
||||
write_particle_track(*this);
|
||||
finalize_particle_track(*this);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue