mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 14:15:42 -04:00
Use neighbor lists for reflective & periodic BCs
This commit is contained in:
parent
e358f6d90a
commit
36d85dde4f
2 changed files with 7 additions and 7 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
! ==========================================================================
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue