From cd5e400fe23128b004b0e5e3abae04790de658ac Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Thu, 22 Sep 2011 16:25:22 -0400 Subject: [PATCH] Added cell_born attribute on Particle type. --- src/particle_header.f90 | 1 + src/physics.f90 | 3 +++ src/source.f90 | 1 + src/tally.f90 | 2 +- 4 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/particle_header.f90 b/src/particle_header.f90 index 3e3451988a..d8af8e0dff 100644 --- a/src/particle_header.f90 +++ b/src/particle_header.f90 @@ -26,6 +26,7 @@ module particle_header ! Indices for various arrays integer :: cell ! index for current cell + integer :: cell_born ! index for cell particle was born in integer :: universe ! index for current universe integer :: lattice ! index for current lattice integer :: surface ! index for current surface diff --git a/src/physics.f90 b/src/physics.f90 index 9f50ab1d79..35e49bd4a5 100644 --- a/src/physics.f90 +++ b/src/physics.f90 @@ -49,6 +49,9 @@ contains "Could not locate cell for particle at: ", p % xyz call fatal_error(msg) end if + + ! set birth cell attribute + p % cell_born = p % cell end if if (verbosity >= 9) then diff --git a/src/source.f90 b/src/source.f90 index 7e459d8185..1744de30f8 100644 --- a/src/source.f90 +++ b/src/source.f90 @@ -172,6 +172,7 @@ contains p % wgt = ONE p % alive = .true. p % cell = 0 + p % cell_born = 0 p % universe = 0 p % lattice = 0 p % surface = 0 diff --git a/src/tally.f90 b/src/tally.f90 index 6c2aa06bb8..7454ff0872 100644 --- a/src/tally.f90 +++ b/src/tally.f90 @@ -297,7 +297,7 @@ contains ! determine next bornin bin if (t % n_bornin_bins > 0) then - ! bornin_bin = get_next_bin(MAP_BORNIN, p % bornin, i) + bornin_bin = get_next_bin(MAP_BORNIN, p % cell_born, i) if (bornin_bin == NO_BIN_FOUND) cycle else bornin_bin = 1