Extract surface points and store them in a string vector str(ind)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(nodetype), | intent(in), | dimension(-2:imx+3,-2:jmx+3,-2:kmx+3) | :: | nodes |
subroutine surface_points(nodes)
!< Extract surface points and store them
!< in a string vector str(ind)
implicit none
type(nodetype), dimension(-2:imx+3,-2:jmx+3,-2:kmx+3), intent(in) :: nodes
integer :: OL
integer :: i, j, k, ind
integer :: im=1, ix=1
integer :: jm=1, jx=1
integer :: km=1, kx=1
DebugCall('surface_points')
ind = 0
do OL = 1,6
if (NO_SLIP_flag(OL) == 1 )then
select case (OL)
case (1)
km = 1
jm = 1
im = 1
kx = kmx
jx = jmx
ix = 1
case (2)
km = 1
jm = 1
im = imx
kx = kmx
jx = jmx
ix = imx
case (3)
km = 1
jm = 1
im = 1
kx = kmx
jx = 1
ix = imx
case (4)
km = 1
jm = jmx
im = 1
kx = kmx
jx = jmx
ix = imx
case (5)
km = 1
jm = 1
im = 1
kx = 1
jx = jmx
ix = imx
case (6)
km = kmx
jm = 1
im = 1
kx = kmx
jx = jmx
ix = imx
case DEFAULT
Fatal_error
km = 1
jm = 1
im = 1
kx = -1
jx = -1
ix = -1
end select
do k = km,kx
do j = jm,jx
do i = im,ix
ind = ind + 1
wall_x(ind) = nodes(i, j, k )%x
wall_y(ind) = nodes(i, j, k )%y
wall_z(ind) = nodes(i, j, k )%z
write(str(ind),'(3(f0.16, 4x))') wall_x(ind), wall_y(ind), wall_z(ind)
end do
end do
end do
end if
end do
end subroutine surface_points