write_grid Subroutine

private subroutine write_grid(nodes)

Write the grid information in the output file

Arguments

Type IntentOptional AttributesName
type(nodetype), intent(in), dimension(-2:imx+3,-2:jmx+3,-2:kmx+3):: nodes

Calls

proc~~write_grid~2~~CallsGraph proc~write_grid~2 write_grid debugcall debugcall proc~write_grid~2->debugcall

Called by

proc~~write_grid~2~~CalledByGraph proc~write_grid~2 write_grid proc~write_file~2 write_file proc~write_file~2->proc~write_grid~2

Contents

Source Code


Source Code

    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