From deb7ce9ce79230103fd7564ca073491e925cee3b Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Mon, 8 Jun 2015 20:02:06 +0700 Subject: [PATCH] Fix handling of reflective boundary conditions --- src/geometry.F90 | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/src/geometry.F90 b/src/geometry.F90 index 72293aeff3..dc8c4adc3f 100644 --- a/src/geometry.F90 +++ b/src/geometry.F90 @@ -220,7 +220,6 @@ contains i_xyz = lat % get_indices(p % coord(j) % xyz + TINY_BIT * p % coord(j) % uvw) ! Create new level of coordinates - call p % coord(j + 1) % reset() p % coord(j + 1) % xyz = lat % get_local_xyz(p % coord(j) % xyz, i_xyz) p % coord(j + 1) % uvw = p % coord(j) % uvw @@ -486,15 +485,13 @@ contains ! boundary, it is necessary to redetermine the particle's coordinates in ! the lower universes. - if (p % n_coord > 1) then - p % n_coord = 1 - call p % coord(2:) % reset() - call find_cell(p, found) - if (.not. found) then - call handle_lost_particle(p, "Couldn't find particle after reflecting& - & from surface.") - return - end if + p % n_coord = 1 + call p % coord(2:) % reset() + call find_cell(p, found) + if (.not. found) then + call handle_lost_particle(p, "Couldn't find particle after reflecting& + & from surface.") + return end if ! Set previous coordinate going slightly past surface crossing