Fix to mode merge box definition

master
Alex Selimov 5 years ago
parent e9521f43f3
commit 92671ea0b2

@ -130,8 +130,9 @@ module mode_merge
integer :: i, ibasis, inod integer :: i, ibasis, inod
real(kind=dp), dimension(3) :: current_shift real(kind=dp), dimension(3) :: current_shift
character(len=3) :: alldims
alldims = 'xyz'
!Calculate the current shift which is the filenum-1 multiplied by the user specified shift !Calculate the current shift which is the filenum-1 multiplied by the user specified shift
current_shift = (filenum-1)*shift_vec current_shift = (filenum-1)*shift_vec
@ -154,11 +155,15 @@ module mode_merge
!If we don't include the wrap command then we have to increase the size of the box !If we don't include the wrap command then we have to increase the size of the box
if(.not.(wrap_flag)) then if(.not.(wrap_flag)) then
do i = 1,3 do i = 1,3
if (alldims(i:i) /= trim(adjustl(dim))) then
if (current_shift(i) < -lim_zero) then if (current_shift(i) < -lim_zero) then
box_bd(2*i-1) = box_bd(2*i-1) - current_shift(i) box_bd(2*i-1) = box_bd(2*i-1) - current_shift(i)
else if (current_shift(i) > lim_zero) then else if (current_shift(i) > lim_zero) then
box_bd(2*i) = box_bd(2*i) + current_shift(i) box_bd(2*i) = box_bd(2*i) + current_shift(i)
end if end if
else if (alldims(i:i) == trim(adjustl(dim))) then
box_bd(2*i) = box_bd(2*i) + current_shift(i)
end if
end do end do
end if end if

Loading…
Cancel
Save