|
|
|
@ -63,10 +63,17 @@ module mode_create
|
|
|
|
|
do i = 1, 8
|
|
|
|
|
box_vert(:,i) = duplicate(:)*esize*lattice_space(:)*cubic_cell(:,i) + (origin(:)/lattice_parameter)
|
|
|
|
|
end do
|
|
|
|
|
!Now get the rotated box vertex positions in lattice space. Should be integer units
|
|
|
|
|
!Now get the rotated box vertex positions in lattice space. Should be integer units and get the new maxlen
|
|
|
|
|
select case(trim(adjustl(element_type)))
|
|
|
|
|
case('fcc')
|
|
|
|
|
box_lat_vert = int(matmul(fcc_inv, matmul(orient_inv, box_vert)))+1
|
|
|
|
|
!Find the new maxlen
|
|
|
|
|
maxbd = maxval(matmul(orient,matmul(fcc_mat,box_lat_vert)),2)
|
|
|
|
|
case('bcc')
|
|
|
|
|
box_lat_vert = int(matmul(bcc_inv, matmul(orient_inv, box_vert)))+1
|
|
|
|
|
maxbd = maxval(matmul(orient,matmul(bcc_mat,box_lat_vert)),2)
|
|
|
|
|
end select
|
|
|
|
|
|
|
|
|
|
!Find the new maxlen
|
|
|
|
|
do i = 1, 3
|
|
|
|
|
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)
|
|
|
|
@ -83,7 +90,12 @@ module mode_create
|
|
|
|
|
box_vert(:,i) = (cubic_cell(:,i)*box_len(:) + origin(:))/lattice_parameter
|
|
|
|
|
end do
|
|
|
|
|
!Now get the rotated box vertex positions in lattice space. Should be integer units
|
|
|
|
|
select case(trim(adjustl(element_type)))
|
|
|
|
|
case('fcc')
|
|
|
|
|
box_lat_vert = int(matmul(fcc_inv, matmul(orient_inv, box_vert)))+1
|
|
|
|
|
case('bcc')
|
|
|
|
|
box_lat_vert = int(matmul(bcc_inv, matmul(orient_inv, box_vert)))+1
|
|
|
|
|
end select
|
|
|
|
|
|
|
|
|
|
!Now get the box_bd in lattice units
|
|
|
|
|
do i = 1, 3
|
|
|
|
@ -117,8 +129,9 @@ module mode_create
|
|
|
|
|
!Call the build function with the correct transformation matrix
|
|
|
|
|
select case(trim(adjustl(element_type)))
|
|
|
|
|
case('fcc')
|
|
|
|
|
|
|
|
|
|
call build_with_rhomb(box_lat_vert, fcc_mat)
|
|
|
|
|
case('bcc')
|
|
|
|
|
call build_with_rhomb(box_lat_vert, bcc_mat)
|
|
|
|
|
case default
|
|
|
|
|
print *, "Element type ", trim(adjustl(element_type)), " not accepted in mode create, please specify a supported ", &
|
|
|
|
|
"element type"
|
|
|
|
@ -270,13 +283,20 @@ module mode_create
|
|
|
|
|
lattice_space(i) = 0.5_dp * lattice_space(i)
|
|
|
|
|
|
|
|
|
|
!Check if one direction is 112
|
|
|
|
|
else if ((is_equal(abs(orient(i,1)), abs(orient(i,2))).and.(is_equal(abs(orient(i,3)),2.0_dp*abs(orient(i,1))))).or.&
|
|
|
|
|
else if((is_equal(abs(orient(i,1)), abs(orient(i,2))).and.(is_equal(abs(orient(i,3)),2.0_dp*abs(orient(i,1))))).or.&
|
|
|
|
|
(is_equal(abs(orient(i,2)), abs(orient(i,3))).and.(is_equal(abs(orient(i,1)),2.0_dp*abs(orient(i,2))))).or.&
|
|
|
|
|
(is_equal(abs(orient(i,3)), abs(orient(i,1))).and.(is_equal(abs(orient(i,2)),2.0_dp*abs(orient(i,3))))))&
|
|
|
|
|
then
|
|
|
|
|
|
|
|
|
|
lattice_space(i) = 0.5_dp * lattice_space(i)
|
|
|
|
|
end if
|
|
|
|
|
end do
|
|
|
|
|
|
|
|
|
|
case('bcc')
|
|
|
|
|
do i = 1, 3
|
|
|
|
|
!Check if the direction is 111
|
|
|
|
|
if((is_equal(abs(orient(i,1)),abs(orient(i,2)))).and.(is_equal(abs(orient(i,2)),abs(orient(i,3))))) then
|
|
|
|
|
lattice_space(i) = 0.5_dp * lattice_space(i)
|
|
|
|
|
end if
|
|
|
|
|
end do
|
|
|
|
|
end select
|
|
|
|
|