Working remesh command and remesh max command
This commit is contained in:
parent
5b925122df
commit
d670bb5083
2 changed files with 60 additions and 35 deletions
17
src/io.f90
17
src/io.f90
|
@ -310,6 +310,9 @@ module io
|
|||
20 format('SCALARS lattice_type float', /&
|
||||
'LOOKUP_TABLE default')
|
||||
|
||||
21 format('SCALARS esize float', /&
|
||||
'LOOKUP_TABLE default')
|
||||
|
||||
!First we write the vtk file containing the atoms
|
||||
open(unit=11, file='atoms_'//trim(adjustl(file)), action='write', status='replace',position='rewind')
|
||||
|
||||
|
@ -358,6 +361,10 @@ module io
|
|||
do i = 1, ele_num
|
||||
write(11, '(i16)') lat_ele(i)
|
||||
end do
|
||||
write(11,21)
|
||||
do i = 1, ele_num
|
||||
write(11, '(i16)') size_ele(i)
|
||||
end do
|
||||
close(11)
|
||||
end subroutine
|
||||
|
||||
|
@ -624,8 +631,13 @@ module io
|
|||
!Read in the box boundary and grow the current active box bd
|
||||
read(11, *) temp_box_bd(:)
|
||||
|
||||
print *, "displace", displace
|
||||
do i = 1, 3
|
||||
newdisplace(i) = displace(i) - temp_box_bd(2*i-1)
|
||||
if (displace(i) > lim_zero) then
|
||||
newdisplace(i) = displace(i) - temp_box_bd(2*i-1)
|
||||
else
|
||||
newdisplace=displace(i)
|
||||
end if
|
||||
temp_box_bd(2*i-1) = temp_box_bd(2*i-1) + newdisplace(i)
|
||||
temp_box_bd(2*i) = temp_box_bd(2*i) + newdisplace(i)
|
||||
end do
|
||||
|
@ -717,7 +729,8 @@ module io
|
|||
!Read the atoms
|
||||
do i = 1, in_atoms
|
||||
read(11,*) j, type, sbox, r(:)
|
||||
call add_atom(new_type_to_type(type), sbox, r+newdisplace )
|
||||
r = r+newdisplace
|
||||
call add_atom(new_type_to_type(type), sbox, r)
|
||||
end do
|
||||
|
||||
!Read the elements
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue