Working bcc crystal structure when viewing in .lmp or .vtk format
This commit is contained in:
parent
acd902db4b
commit
3a59b23be7
2 changed files with 14 additions and 6 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue