Current working changes to option-slip-plane

This commit is contained in:
Alex Selimov 2020-10-27 13:23:00 -04:00
parent fa38875296
commit b9ce916e42
3 changed files with 27 additions and 10 deletions

View file

@ -201,24 +201,25 @@ module elements
!First check to make sure if it is allocated
if (allocated(size_ele)) then
!Figure out the size of the atom and element arrays
ele_size = size(size_ele)
!Check if we need to grow the ele_size, if so grow all the variables
if ( n+ele_size > size(size_ele)) then
if ( n+ele_num > size(size_ele)) then
allocate(temp_int(n+ele_size+buffer_size))
temp_int(1:ele_size) = lat_ele
temp_int(1:ele_size) = lat_ele(1:ele_size)
temp_int(ele_size+1:) = 0
call move_alloc(temp_int, lat_ele)
allocate(temp_int(n+ele_size+buffer_size))
temp_int(1:ele_size) = tag_ele
temp_int(1:ele_size) = tag_ele(1:ele_size)
temp_int(ele_size+1:) = 0
call move_alloc(temp_int, tag_ele)
allocate(temp_int(n+ele_size+buffer_size))
temp_int(1:ele_size) = size_ele
temp_int(1:ele_size) = size_ele(1:ele_size)
temp_int(ele_size+1:) = 0
call move_alloc(temp_int, size_ele)
@ -278,6 +279,7 @@ module elements
integer :: newtag
ele_num = ele_num + 1
node_num = node_num + ng_node(lat)
if (tag==0) then
newtag = ele_num !If we don't assign a tag then pass the tag as the ele_num
@ -293,7 +295,6 @@ module elements
lat_ele(ele_num) = lat
sbox_ele(ele_num) = sbox
r_node(:,:,:,ele_num) = r(:,:,:)
node_num = node_num + ng_node(lat)
end subroutine add_element