Quick fix to efill code

This commit is contained in:
Alex Selimov 2020-05-27 14:37:30 -04:00
parent aef9da49be
commit 43025d0b67

View File

@ -18,6 +18,7 @@ module mode_create
logical :: dup_flag, dim_flag, efill logical :: dup_flag, dim_flag, efill
real(kind=dp), allocatable :: r_lat(:,:,:), r_atom_lat(:,:) real(kind=dp), allocatable :: r_lat(:,:,:), r_atom_lat(:,:)
integer, allocatable :: elat(:)
public public
contains contains
@ -149,14 +150,7 @@ module mode_create
end do end do
end do end do
curr_esize=esize call add_element(element_type, elat(i), 1, 1, r_node_temp)
do ei = 1, esize_nums
if(i <= esize_index(ei)) then
call add_element(element_type, curr_esize, 1, 1, r_node_temp)
exit
end if
curr_esize=curr_esize-2
end do
end do end do
end if end if
end if end if
@ -439,7 +433,7 @@ module mode_create
lat_ele_num = 0 lat_ele_num = 0
lat_atom_num = 0 lat_atom_num = 0
curr_esize=esize - 2*(esize_nums-1) curr_esize=esize - 2*(esize_nums-1)
allocate(r_lat(3,8,numlatpoints/curr_esize)) allocate(r_lat(3,8,numlatpoints/curr_esize), elat(numlatpoints/curr_esize))
curr_esize=esize curr_esize=esize
do ei = 1, esize_nums do ei = 1, esize_nums
@ -481,7 +475,7 @@ module mode_create
if(all(node_in_bd)) then if(all(node_in_bd)) then
lat_ele_num = lat_ele_num+1 lat_ele_num = lat_ele_num+1
r_lat(:,:,lat_ele_num) = temp_nodes(:,1,:) r_lat(:,:,lat_ele_num) = temp_nodes(:,1,:)
elat(lat_ele_num) = curr_esize
!Now set all the lattice points contained within an element to false !Now set all the lattice points contained within an element to false
do o = minval(temp_lat(3,:)), maxval(temp_lat(3,:)) do o = minval(temp_lat(3,:)), maxval(temp_lat(3,:))
do n = minval(temp_lat(2,:)), maxval(temp_lat(2,:)) do n = minval(temp_lat(2,:)), maxval(temp_lat(2,:))
@ -495,7 +489,6 @@ module mode_create
end do end do
end do end do
end do end do
esize_index(ei) = lat_ele_num
curr_esize=curr_esize-2 curr_esize=curr_esize-2
end do end do
!Now figure out how many lattice points could not be contained in elements !Now figure out how many lattice points could not be contained in elements