Use neighbor lists for reflective & periodic BCs

This commit is contained in:
Sterling Harper 2018-11-24 10:29:25 -05:00
parent e358f6d90a
commit 36d85dde4f
2 changed files with 7 additions and 7 deletions

View file

@ -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

View file

@ -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
! ==========================================================================