mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 14:15:42 -04:00
Small fixes for #313 (hex_lattice)
This commit is contained in:
parent
62e9c6e5d3
commit
2cbedf924a
2 changed files with 6 additions and 9 deletions
|
|
@ -156,11 +156,7 @@ contains
|
|||
integer, intent(in) :: i_xyz(3)
|
||||
logical :: is_valid
|
||||
|
||||
! TODO can this be replaced with
|
||||
! is_valid = (all(i_xyz > 0 .and. i_xyz <= this % n_cells)) ?
|
||||
is_valid = (i_xyz(1) > 0 .and. i_xyz(1) <= this % n_cells(1) .and. &
|
||||
&i_xyz(2) > 0 .and. i_xyz(2) <= this % n_cells(2) .and. &
|
||||
&i_xyz(3) > 0 .and. i_xyz(3) <= this % n_cells(3))
|
||||
is_valid = (all(i_xyz > 0 .and. i_xyz <= this % n_cells))
|
||||
end function valid_inds_rect
|
||||
|
||||
!===============================================================================
|
||||
|
|
@ -170,11 +166,12 @@ contains
|
|||
integer, intent(in) :: i_xyz(3)
|
||||
logical :: is_valid
|
||||
|
||||
is_valid = (i_xyz(1) > 0 .and. i_xyz(1) < 2*this % n_rings .and. &
|
||||
&i_xyz(2) > 0 .and. i_xyz(2) < 2*this % n_rings .and. &
|
||||
is_valid = (all(i_xyz > 0) .and. &
|
||||
&i_xyz(1) < 2*this % n_rings .and. &
|
||||
&i_xyz(2) < 2*this % n_rings .and. &
|
||||
&i_xyz(1) + i_xyz(2) > this % n_rings .and. &
|
||||
&i_xyz(1) + i_xyz(2) < 3*this % n_rings .and. &
|
||||
&i_xyz(3) > 0 .and. i_xyz(3) <= this % n_axial)
|
||||
&i_xyz(3) <= this % n_axial)
|
||||
end function valid_inds_hex
|
||||
|
||||
!===============================================================================
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@ contains
|
|||
|
||||
last_cell = p % coord % cell
|
||||
p % coord % cell = NONE
|
||||
if (any(lattice_translation /= (/0, 0, 0/))) then
|
||||
if (any(lattice_translation /= 0)) then
|
||||
! Particle crosses lattice boundary
|
||||
p % surface = NONE
|
||||
call cross_lattice(p, lattice_translation)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue