|
|
|
@ -28,7 +28,7 @@ module elements
|
|
|
|
|
integer :: atom_types = 0
|
|
|
|
|
|
|
|
|
|
!Variables for creating elements based on primitive cells
|
|
|
|
|
real(kind=dp) :: cubic_cell(3,8), fcc_cell(3,8), fcc_mat(3,3), fcc_inv(3,3)
|
|
|
|
|
real(kind=dp) :: cubic_cell(3,8), fcc_cell(3,8), fcc_mat(3,3), fcc_inv(3,3), bcc_cell(3,8), bcc_mat(3,3), bcc_inv(3,3)
|
|
|
|
|
integer :: cubic_faces(4,6)
|
|
|
|
|
|
|
|
|
|
!Below are lattice type arrays which provide information on the general form of the elements.
|
|
|
|
@ -87,7 +87,27 @@ module elements
|
|
|
|
|
0.0_dp, 0.5_dp, 0.5_dp, &
|
|
|
|
|
0.5_dp, 0.0_dp, 0.5_dp /), &
|
|
|
|
|
shape(fcc_mat))
|
|
|
|
|
|
|
|
|
|
!Initialize the bcc primitive cell
|
|
|
|
|
bcc_cell = reshape((/ 0.0_dp, 0.0_dp, 0.0_dp, &
|
|
|
|
|
0.5_dp, -0.5_dp, 0.5_dp, &
|
|
|
|
|
1.0_dp, 0.0_dp, 1.0_dp, &
|
|
|
|
|
0.5_dp, 0.5_dp, 0.5_dp, &
|
|
|
|
|
-0.5_dp, 0.5_dp, 0.5_dp, &
|
|
|
|
|
0.0_dp, 0.0_dp, 1.0_dp, &
|
|
|
|
|
0.5_dp, 0.5_dp, 1.5_dp, &
|
|
|
|
|
0.0_dp, 1.0_dp, 1.0_dp /), &
|
|
|
|
|
shape(bcc_cell))
|
|
|
|
|
|
|
|
|
|
bcc_mat = reshape((/ 0.5_dp, -0.5_dp, 0.5_dp, &
|
|
|
|
|
0.5_dp, 0.5_dp, 0.5_dp, &
|
|
|
|
|
-0.5_dp, 0.5_dp, 0.5_dp /), &
|
|
|
|
|
shape(bcc_mat))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
call matrix_inverse(fcc_mat,3,fcc_inv)
|
|
|
|
|
call matrix_inverse(bcc_mat,3,bcc_inv)
|
|
|
|
|
|
|
|
|
|
max_basisnum = 0
|
|
|
|
|
basisnum(:) = 0
|
|
|
|
@ -130,6 +150,9 @@ module elements
|
|
|
|
|
end if
|
|
|
|
|
cell_mat(:, 1:8) = fcc_cell + adjustVar(:,1:8)
|
|
|
|
|
cell_mat(:,1:8) = lapa * ((esize-1)*matmul(orient_mat, cell_mat(:,1:8)))
|
|
|
|
|
case('bcc')
|
|
|
|
|
cell_mat(:,1:8) = bcc_cell
|
|
|
|
|
cell_mat(:,1:8) = lapa* ((esize-1)*matmul(orient_mat, cell_mat(:,1:8)))
|
|
|
|
|
case default
|
|
|
|
|
print *, "Element type ", trim(ele_type), " currently not accepted"
|
|
|
|
|
stop
|
|
|
|
@ -327,6 +350,8 @@ module elements
|
|
|
|
|
select case(trim(adjustl(element_types(i))))
|
|
|
|
|
case('fcc')
|
|
|
|
|
ng_node(i) = 8
|
|
|
|
|
case('bcc')
|
|
|
|
|
ng_node(i) = 8
|
|
|
|
|
end select
|
|
|
|
|
|
|
|
|
|
if(ng_node(i) > max_ng_node) max_ng_node = ng_node(i)
|
|
|
|
@ -372,7 +397,7 @@ module elements
|
|
|
|
|
end select
|
|
|
|
|
|
|
|
|
|
select case(trim(adjustl(type)))
|
|
|
|
|
case('fcc')
|
|
|
|
|
case('fcc','bcc')
|
|
|
|
|
allocate(a_shape(8))
|
|
|
|
|
!Now loop over all the possible sites
|
|
|
|
|
do it = 1, esize
|
|
|
|
|