Write the grid information in the output file
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(nodetype), | intent(in), | dimension(-2:imx+3,-2:jmx+3,-2:kmx+3) | :: | nodes |
subroutine write_grid(nodes)
!< Write the grid information in the output file
implicit none
type(nodetype), dimension(-2:imx+3,-2:jmx+3,-2:kmx+3), intent(in) :: nodes
! write grid point coordinates
DebugCall("write_grid")
write(OUT_FILE_UNIT, fmt='(a, i0, a, i0, a, i0)') &
'DIMENSIONS ', imx, ' ', jmx, ' ', kmx
write(OUT_FILE_UNIT, fmt='(a, i0, a)') &
'POINTS ', imx*jmx*kmx, ' DOUBLE'
do k = 1, kmx
do j = 1, jmx
do i = 1, imx
write(OUT_FILE_UNIT, fmt='(f0.16, a, f0.16, a, f0.16)') &
nodes(i, j, k)%x, ' ', nodes(i, j, k)%y, ' ', nodes(i, j, k)%z
end do
end do
end do
write(OUT_FILE_UNIT, *)
end subroutine write_grid