mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 22:26:08 -04:00
Fix bug in reimplementation of neighbor_lists.
This commit is contained in:
parent
7661c8902f
commit
0927f25300
1 changed files with 8 additions and 4 deletions
|
|
@ -903,13 +903,17 @@ contains
|
|||
do i = 1, n_surfaces
|
||||
! Copy positive neighbors to Surface instance
|
||||
j = neighbor_pos(i)%size()
|
||||
allocate(surfaces(i)%obj%neighbor_pos(j))
|
||||
surfaces(i)%obj%neighbor_pos(:) = neighbor_pos(i)%data(1:j)
|
||||
if (j > 0) then
|
||||
allocate(surfaces(i)%obj%neighbor_pos(j))
|
||||
surfaces(i)%obj%neighbor_pos(:) = neighbor_pos(i)%data(1:j)
|
||||
end if
|
||||
|
||||
! Copy negative neighbors to Surface instance
|
||||
j = neighbor_neg(i)%size()
|
||||
allocate(surfaces(i)%obj%neighbor_neg(j))
|
||||
surfaces(i)%obj%neighbor_neg(:) = neighbor_neg(i)%data(1:j)
|
||||
if (j > 0) then
|
||||
allocate(surfaces(i)%obj%neighbor_neg(j))
|
||||
surfaces(i)%obj%neighbor_neg(:) = neighbor_neg(i)%data(1:j)
|
||||
end if
|
||||
end do
|
||||
|
||||
end subroutine neighbor_lists
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue