hvs_vtk_closePVD Subroutine

public subroutine hvs_vtk_closePVD(vtk_file)

This routine closes PVD file

Arguments

Type IntentOptional Attributes Name
type(hvs_vtk_file_type), intent(inout) :: vtk_file

The file description to open.


Contents

Source Code


Source Code

  subroutine hvs_vtk_closePVD(vtk_file)
    ! --------------------------------------------------------------------------!
    !> The file description to open.
    type(hvs_vtk_file_type), intent(inout) :: vtk_file
    ! --------------------------------------------------------------------------!
    character(len=PathLen) :: headerline
    character :: linebreak
    ! --------------------------------------------------------------------------!
    if ( vtk_file%write_pvd ) then
      linebreak = new_line('x')

      write(headerline,'(a)') '</Collection>'
      write(vtk_file%pvdunit) trim(headerline)//linebreak

      write(headerline,'(a)') '</VTKFile>'
      write(vtk_file%pvdunit) trim(headerline)//linebreak
      close(vtk_file%pvdunit)
    end if
  end subroutine hvs_vtk_closePVD