Working planar vacancy cluster algorithm
This commit is contained in:
parent
d0e6253d64
commit
8fc91f4dd2
6 changed files with 116 additions and 4 deletions
17
src/box.f90
17
src/box.f90
|
@ -85,4 +85,21 @@ module box
|
|||
return
|
||||
end subroutine grow_box
|
||||
|
||||
|
||||
subroutine in_sub_box(r, which_sub_box)
|
||||
!This returns which sub_box a point is in. It returns the first sub_box with boundaries which
|
||||
!contain the point.
|
||||
real(kind=dp), dimension(3), intent(in) :: r
|
||||
integer, intent(out) :: which_sub_box
|
||||
|
||||
integer :: i
|
||||
|
||||
do i = 1, sub_box_num
|
||||
if( in_block_bd(r, sub_box_bd(:,i))) then
|
||||
which_sub_box = i
|
||||
exit
|
||||
end if
|
||||
end do
|
||||
return
|
||||
end subroutine in_sub_box
|
||||
end module box
|
Loading…
Add table
Add a link
Reference in a new issue