Separated wrap option to reduce opy and pasted code. Fixed warnings and added wrapping when inserting a dislocation or loop
This commit is contained in:
parent
636ae9421b
commit
dc42b7b925
11 changed files with 55 additions and 46 deletions
|
@ -41,6 +41,8 @@ module elements
|
|||
integer :: basis_type(10,10)
|
||||
real(kind=dp) :: lapa(10)
|
||||
|
||||
!Additional module level variables we need
|
||||
logical :: wrap_flag
|
||||
public
|
||||
contains
|
||||
|
||||
|
@ -313,7 +315,7 @@ module elements
|
|||
real(kind=dp), dimension(3, max_basisnum*max_esize**3), intent(out) :: r_interp !Interpolated atomic positions
|
||||
|
||||
!Internal variables
|
||||
integer :: i, it, is, ir, ibasis, inod, ia, bnum, lat_type_temp
|
||||
integer :: it, is, ir, ibasis, inod, ia, bnum, lat_type_temp
|
||||
real(kind=dp), allocatable :: a_shape(:)
|
||||
real(kind=dp) :: t, s, r
|
||||
|
||||
|
@ -390,7 +392,7 @@ module elements
|
|||
integer, intent(in) :: num
|
||||
integer, intent(inout), dimension(num) :: index
|
||||
|
||||
integer :: i, j
|
||||
integer :: i
|
||||
|
||||
call heapsort(index)
|
||||
|
||||
|
@ -413,7 +415,7 @@ module elements
|
|||
integer, intent(in) :: num
|
||||
integer, intent(inout), dimension(num) :: index
|
||||
|
||||
integer :: i, j
|
||||
integer :: i
|
||||
|
||||
call heapsort(index)
|
||||
|
||||
|
@ -436,5 +438,15 @@ module elements
|
|||
end if
|
||||
ele_num = ele_num - 1
|
||||
end do
|
||||
|
||||
end subroutine delete_elements
|
||||
|
||||
subroutine wrap_atoms
|
||||
!This subroutine wraps atoms back into the simulation cell if they have exited for any reason
|
||||
integer :: i
|
||||
do i = 1, atom_num
|
||||
call apply_periodic(r_atom(:,i))
|
||||
end do
|
||||
end subroutine wrap_atoms
|
||||
|
||||
end module elements
|
Loading…
Add table
Add a link
Reference in a new issue