change box definition

master
Alex Selimov 5 years ago
parent 170e8b76fd
commit b97986bf04

@ -27,6 +27,7 @@ module mode_create
integer, intent(out) :: arg_pos integer, intent(out) :: arg_pos
integer :: i, ibasis, inod integer :: i, ibasis, inod
! real(kind = dp) :: lattice_vec(3), lattice_space(
real(kind=dp), allocatable :: r_node_temp(:,:,:) real(kind=dp), allocatable :: r_node_temp(:,:,:)
print *, '-----------------------Mode Create---------------------------' print *, '-----------------------Mode Create---------------------------'
@ -68,8 +69,10 @@ module mode_create
!Find the new maxlen !Find the new maxlen
maxbd = maxval(matmul(orient,matmul(fcc_mat,box_lat_vert)),2) maxbd = maxval(matmul(orient,matmul(fcc_mat,box_lat_vert)),2)
do i = 1, 3 do i = 1, 3
box_bd(2*i) = maxval(box_vert(i,:)) - 0.25_dp*lattice_space(i) ! box_bd(2*i) = maxval(box_vert(i,:)) - 0.25_dp*lattice_space(i)
box_bd(2*i-1) = origin(i)-0.25_dp*lattice_space(i) ! box_bd(2*i-1) = origin(i)-0.25_dp*lattice_space(i)
box_bd(2*i) = maxval(box_vert(i,:))
box_bd(2*i-1) = origin(i)
end do end do
@ -124,8 +127,6 @@ module mode_create
"element type" "element type"
stop 3 stop 3
end select end select
!Now that it is built multiply by the lattice parameter
box_bd = box_bd*lattice_parameter
print *, "Using mode create, ", lat_ele_num, " elements are created and ", lat_atom_num*basisnum(1), & print *, "Using mode create, ", lat_ele_num, " elements are created and ", lat_atom_num*basisnum(1), &
" atoms are created." " atoms are created."
@ -153,6 +154,13 @@ module mode_create
end if end if
end if end if
!Now redefine box to ensure periodicity
call def_new_box
do i = 1, 3
end do
!The last thing we do is setup the sub_box_boundaries !The last thing we do is setup the sub_box_boundaries
call alloc_sub_box(1) call alloc_sub_box(1)
sub_box_num = 1 sub_box_num = 1

Loading…
Cancel
Save