Working bcc crystal structure when viewing in .lmp or .vtk format
This commit is contained in:
parent
acd902db4b
commit
3a59b23be7
@ -92,14 +92,15 @@ module elements
|
||||
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.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.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 /), &
|
||||
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))
|
||||
|
||||
|
||||
@ -148,6 +149,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
|
||||
|
@ -162,7 +162,9 @@ module io
|
||||
write_num = atom_num
|
||||
do i = 1,ele_num
|
||||
if(type_ele(i) == 'fcc') write_num = write_num + size_ele(i)**3
|
||||
if(type_ele(i) == 'bcc') write_num = write_num + size_ele(i)**3
|
||||
end do
|
||||
|
||||
!Write total number of atoms + elements
|
||||
write(11, '(i16, a)') write_num, ' atoms'
|
||||
!Write number of atom types
|
||||
@ -196,7 +198,7 @@ module io
|
||||
do i = 1, ele_num
|
||||
call interpolate_atoms(type_ele(i), size_ele(i), lat_ele(i), r_node(:,:,:,i), type_interp, r_interp)
|
||||
select case(trim(adjustl(type_ele(i))))
|
||||
case('fcc')
|
||||
case('fcc','bcc')
|
||||
do iatom = 1, basisnum(lat_ele(i))*size_ele(i)**3
|
||||
interp_num = interp_num+1
|
||||
call apply_periodic(r_interp(:,iatom))
|
||||
@ -339,6 +341,7 @@ module io
|
||||
end do
|
||||
close(11)
|
||||
|
||||
!Now we write the vtk file for the elements
|
||||
open(unit=11, file='cg_'//trim(adjustl(file)), action='write', status='replace',position='rewind')
|
||||
write(11,1)
|
||||
write(11,2)
|
||||
@ -357,6 +360,7 @@ module io
|
||||
write(11,5) ele_num
|
||||
do i = 1, ele_num
|
||||
if(trim(adjustl(type_ele(i))) == 'fcc') write(11, '(i16)') 12
|
||||
if(trim(adjustl(type_ele(i))) == 'bcc') write(11, '(i16)') 12
|
||||
end do
|
||||
write(11,12) ele_num
|
||||
write(11,20)
|
||||
|
Loading…
x
Reference in New Issue
Block a user