|
|
@ -211,17 +211,17 @@ module elements
|
|
|
|
call move_alloc(temp_int, lat_ele)
|
|
|
|
call move_alloc(temp_int, lat_ele)
|
|
|
|
|
|
|
|
|
|
|
|
allocate(temp_int(n+ele_num+buffer_size))
|
|
|
|
allocate(temp_int(n+ele_num+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
|
|
|
|
temp_int(ele_size+1:) = 0
|
|
|
|
call move_alloc(temp_int, tag_ele)
|
|
|
|
call move_alloc(temp_int, tag_ele)
|
|
|
|
|
|
|
|
|
|
|
|
allocate(temp_int(n+ele_num+buffer_size))
|
|
|
|
allocate(temp_int(n+ele_num+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
|
|
|
|
temp_int(ele_size+1:) = 0
|
|
|
|
call move_alloc(temp_int, size_ele)
|
|
|
|
call move_alloc(temp_int, size_ele)
|
|
|
|
|
|
|
|
|
|
|
|
allocate(temp_int(n+ele_num+buffer_size))
|
|
|
|
allocate(temp_int(n+ele_num+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
|
|
|
|
temp_int(ele_size+1:) = 0
|
|
|
|
call move_alloc(temp_int, sbox_ele)
|
|
|
|
call move_alloc(temp_int, sbox_ele)
|
|
|
|
|
|
|
|
|
|
|
@ -282,8 +282,8 @@ module elements
|
|
|
|
size_ele(ele_num) = size
|
|
|
|
size_ele(ele_num) = size
|
|
|
|
lat_ele(ele_num) = lat
|
|
|
|
lat_ele(ele_num) = lat
|
|
|
|
sbox_ele(ele_num) = sbox
|
|
|
|
sbox_ele(ele_num) = sbox
|
|
|
|
r_node(:,:,:,ele_num) = r(:,:,:)
|
|
|
|
r_node(:,:,:,ele_num) = r(:,:,:)
|
|
|
|
node_num = node_num + ng_node(lat)
|
|
|
|
node_num = node_num + ng_node(lat)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
end subroutine add_element
|
|
|
|
end subroutine add_element
|
|
|
@ -669,17 +669,17 @@ module elements
|
|
|
|
esize = size_ele(ie)
|
|
|
|
esize = size_ele(ie)
|
|
|
|
select case(iface)
|
|
|
|
select case(iface)
|
|
|
|
case(1)
|
|
|
|
case(1)
|
|
|
|
pos = (/ real(esize-1,dp)/2.0_dp, real(esize-1,dp)/2.0_dp, -10.0_dp**-2.0_dp /)
|
|
|
|
pos = (/ real(esize-1,dp)/2.0_dp, real(esize-1,dp)/2.0_dp, -10.0_dp**(-2.0_dp) /)
|
|
|
|
case(2)
|
|
|
|
case(2)
|
|
|
|
pos = (/ real(esize-1,dp)/2.0_dp, -10.0_dp**-2.0_dp, real(esize-1,dp)/2.0_dp /)
|
|
|
|
pos = (/ real(esize-1,dp)/2.0_dp, -10.0_dp**(-2.0_dp), real(esize-1,dp)/2.0_dp /)
|
|
|
|
case(3)
|
|
|
|
case(3)
|
|
|
|
pos = (/ (esize-1)+10.0_dp**-2.0_dp, real(esize-1,dp)/2.0_dp, real(esize-1,dp)/2.0_dp /)
|
|
|
|
pos = (/ (esize-1)+10.0_dp**(-2.0_dp), real(esize-1,dp)/2.0_dp, real(esize-1,dp)/2.0_dp /)
|
|
|
|
case(4)
|
|
|
|
case(4)
|
|
|
|
pos = (/ real(esize-1,dp)/2.0_dp, (esize-1)+10.0_dp**-2.0_dp, real(esize-1,dp)/2.0_dp /)
|
|
|
|
pos = (/ real(esize-1,dp)/2.0_dp, (esize-1)+10.0_dp**(-2.0_dp), real(esize-1,dp)/2.0_dp /)
|
|
|
|
case(5)
|
|
|
|
case(5)
|
|
|
|
pos = (/ -10.0_dp**-2.0_dp, real(esize-1,dp)/2.0_dp, real(esize-1,dp)/2.0_dp /)
|
|
|
|
pos = (/ -10.0_dp**(-2.0_dp), real(esize-1,dp)/2.0_dp, real(esize-1,dp)/2.0_dp /)
|
|
|
|
case(6)
|
|
|
|
case(6)
|
|
|
|
pos = (/ real(esize-1,dp)/2.0_dp, real(esize-1,dp)/2.0_dp, (esize-1)+10.0_dp**-2.0_dp /)
|
|
|
|
pos = (/ real(esize-1,dp)/2.0_dp, real(esize-1,dp)/2.0_dp, (esize-1)+10.0_dp**(-2.0_dp) /)
|
|
|
|
end select
|
|
|
|
end select
|
|
|
|
|
|
|
|
|
|
|
|
!Now transform it to real space and adjust it to the position of the element in the first node.
|
|
|
|
!Now transform it to real space and adjust it to the position of the element in the first node.
|
|
|
@ -736,20 +736,24 @@ module elements
|
|
|
|
|
|
|
|
|
|
|
|
end subroutine lattice_map
|
|
|
|
end subroutine lattice_map
|
|
|
|
|
|
|
|
|
|
|
|
subroutine get_interp_pos(i,j,k, ie, r)
|
|
|
|
subroutine get_interp_pos(i,j,k, ie, rout)
|
|
|
|
!This returns the position of an interpolated basis from an element ie.
|
|
|
|
!This returns the position of an interpolated basis from an element ie.
|
|
|
|
!i, j, k should be in natural coordinates
|
|
|
|
!i, j, k should be in natural coordinates
|
|
|
|
|
|
|
|
|
|
|
|
integer, intent(in) :: i, j, k, r, s, t, ie, inod -=
|
|
|
|
integer, intent(in) :: i, j, k
|
|
|
|
real(kind=dp), dimension(3,max_basisnum), intent(out) :: r
|
|
|
|
real(kind=dp), dimension(3,max_basisnum), intent(out) :: rout
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
integer :: ie, ibasis, inod
|
|
|
|
|
|
|
|
real(kind=dp) :: a_shape(8), r, s, t
|
|
|
|
|
|
|
|
|
|
|
|
r = (1.0_dp*(i-1)-(size_ele(ie)-1)/2)/(1.0_dp*(size_ele(ie)-1)/2)
|
|
|
|
r = (1.0_dp*(i-1)-(size_ele(ie)-1)/2)/(1.0_dp*(size_ele(ie)-1)/2)
|
|
|
|
s = (1.0_dp*(j-1)-(size_ele(ie)-1)/2)/(1.0_dp*(size_ele(ie)-1)/2)
|
|
|
|
s = (1.0_dp*(j-1)-(size_ele(ie)-1)/2)/(1.0_dp*(size_ele(ie)-1)/2)
|
|
|
|
t = (1.0_dp*(k-1)-(size_ele(ie)-1)/2)/(1.0_dp*(size_ele(ie)-1)/2)
|
|
|
|
t = (1.0_dp*(k-1)-(size_ele(ie)-1)/2)/(1.0_dp*(size_ele(ie)-1)/2)
|
|
|
|
r(:) = 0
|
|
|
|
rout(:,:) = 0
|
|
|
|
do ibasis = 1, basisnum(lat_ele(ie))
|
|
|
|
do ibasis = 1, basisnum(lat_ele(ie))
|
|
|
|
do inod = 1, ng_node(lat_ele(ie))
|
|
|
|
do inod = 1, ng_node(lat_ele(ie))
|
|
|
|
r(:,ibasis) = r(:,ibasis) + a_shape(inod) * r_node(:,ibasis,inod,ie)
|
|
|
|
call rhombshape(r,s,t,a_shape)
|
|
|
|
|
|
|
|
rout(:,ibasis) = rout(:,ibasis) + a_shape(inod) * r_node(:,ibasis,inod,ie)
|
|
|
|
end do
|
|
|
|
end do
|
|
|
|
end do
|
|
|
|
end do
|
|
|
|
|
|
|
|
|
|
|
|