|
|
|
@ -211,17 +211,17 @@ module elements
|
|
|
|
|
call move_alloc(temp_int, lat_ele)
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
call move_alloc(temp_int, tag_ele)
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
call move_alloc(temp_int, size_ele)
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
call move_alloc(temp_int, sbox_ele)
|
|
|
|
|
|
|
|
|
@ -669,17 +669,17 @@ module elements
|
|
|
|
|
esize = size_ele(ie)
|
|
|
|
|
select case(iface)
|
|
|
|
|
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)
|
|
|
|
|
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)
|
|
|
|
|
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)
|
|
|
|
|
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)
|
|
|
|
|
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)
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
!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
|
|
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
!i, j, k should be in natural coordinates
|
|
|
|
|
|
|
|
|
|
integer, intent(in) :: i, j, k, r, s, t, ie, inod -=
|
|
|
|
|
real(kind=dp), dimension(3,max_basisnum), intent(out) :: r
|
|
|
|
|
integer, intent(in) :: i, j, k
|
|
|
|
|
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)
|
|
|
|
|
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)
|
|
|
|
|
r(:) = 0
|
|
|
|
|
rout(:,:) = 0
|
|
|
|
|
do ibasis = 1, basisnum(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
|
|
|
|
|
|
|
|
|
|