From 36d85dde4f5854642c74aced1f59f35130ea4191 Mon Sep 17 00:00:00 2001 From: Sterling Harper Date: Sat, 24 Nov 2018 10:29:25 -0500 Subject: [PATCH] Use neighbor lists for reflective & periodic BCs --- src/geometry.F90 | 8 ++++---- src/tracking.F90 | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/geometry.F90 b/src/geometry.F90 index 9c8c4df4a0..91ed6bbdc5 100644 --- a/src/geometry.F90 +++ b/src/geometry.F90 @@ -89,13 +89,13 @@ contains ! as it's within the geometry !=============================================================================== - subroutine find_cell(p, found, search_surf) + subroutine find_cell(p, found, use_neighbor_lists) type(Particle), intent(inout) :: p logical, intent(inout) :: found - integer, optional, intent(in) :: search_surf + logical, optional, intent(in) :: use_neighbor_lists - if (present(search_surf)) then - found = find_cell_c(p, logical(.true., kind=C_BOOL)) + if (present(use_neighbor_lists)) then + found = find_cell_c(p, logical(use_neighbor_lists, kind=C_BOOL)) else found = find_cell_c(p, logical(.false., kind=C_BOOL)) end if diff --git a/src/tracking.F90 b/src/tracking.F90 index cb83a368ee..283d69b7cc 100644 --- a/src/tracking.F90 +++ b/src/tracking.F90 @@ -403,7 +403,7 @@ contains ! the lower universes. p % n_coord = 1 - call find_cell(p, found) + call find_cell(p, found, .true.) if (.not. found) then call particle_mark_as_lost(p, "Couldn't find particle after reflecting& & from surface " // trim(to_str(surf % id())) // ".") @@ -458,7 +458,7 @@ contains ! Figure out what cell particle is in now p % n_coord = 1 - call find_cell(p, found) + call find_cell(p, found, .true.) if (.not. found) then call particle_mark_as_lost(p, "Couldn't find particle after hitting & &periodic boundary on surface " // trim(to_str(surf % id())) & @@ -495,7 +495,7 @@ contains end if #endif - call find_cell(p, found, p % surface) + call find_cell(p, found, .true.) if (found) return ! ==========================================================================