write_pvts Subroutine

subroutine write_pvts(filename, parts_filename)

Arguments

TypeIntentOptionalAttributesName
character, intent(in) :: filename
character, intent(in) :: parts_filename(:)

Called by

proc~~write_pvts~~CalledByGraph proc~write_pvts write_pvts program~vtk_fortran_write_pvts vtk_fortran_write_pvts program~vtk_fortran_write_pvts->proc~write_pvts

Contents

Source Code


Source Code

   subroutine write_pvts(filename, parts_filename)
   !< Write PVTS.

   character(*), intent(in) :: filename          !< Output file name.
   character(*), intent(in) :: parts_filename(:) !< Parts file name.
   type(pvtk_file)          :: a_pvtk_file       !< A parallel (partioned) VTK file.
   integer(I4P)             :: error             !< Status error.

   error = a_pvtk_file%initialize(filename=filename, mesh_topology='PStructuredGrid', mesh_kind="Float64", &
                                  nx1=nx1, nx2=nx2, ny1=ny1, ny2=ny2, nz1=nz1, nz2=nz2)
   error = a_pvtk_file%xml_writer%write_dataarray(location='node', action='open')
   error = a_pvtk_file%xml_writer%write_parallel_dataarray(data_name='int32_scalar', &
                                                           data_type='Int32', &
                                                           number_of_components=1)
   error = a_pvtk_file%xml_writer%write_dataarray(location='node', action='close')
   error = a_pvtk_file%xml_writer%write_parallel_geo(source=parts_filename(1), &
                                                     nx1=nx1, nx2=nx2_p(1), ny1=ny1, ny2=ny2, nz1=nz1, nz2=nz2)
   error = a_pvtk_file%xml_writer%write_parallel_geo(source=parts_filename(2), &
                                                     nx1=nx2_p(1), nx2=nx2_p(2), ny1=ny1, ny2=ny2, nz1=nz1, nz2=nz2)
   error = a_pvtk_file%finalize()
   endsubroutine write_pvts