write_block_array Function

private function write_block_array(self, filenames, names, name) result(error)

Arguments

TypeIntentOptionalAttributesName
class(vtm_file), intent(inout) :: self
character, intent(in) :: filenames(1:)
character, intent(in), optional :: names(1:)
character, intent(in), optional :: name

Return Value integer(kind=I4P)


Contents

Source Code


Source Code

  function write_block_array(self, filenames, names, name) result(error)
  !< Write one block dataset (array input).
  !<
  !<#### Example of usage: 3 files blocks
  !<```fortran
  !< error = vtm%write_block(filenames=['file_1.vts', 'file_2.vts', 'file_3.vtu'], name='my_block')
  !<```
  !<
  !<#### Example of usage: 3 files blocks with custom name
  !<```fortran
  !< error = vtm%write_block(filenames=['file_1.vts', 'file_2.vts', 'file_3.vtu'], &
  !<                         names=['block-bar', 'block-foo', 'block-baz'], name='my_block')
  !<```
  class(vtm_file), intent(inout)        :: self          !< VTM file.
  character(*),    intent(in)           :: filenames(1:) !< File names of VTK files grouped into current block.
  character(*),    intent(in), optional :: names(1:)     !< Auxiliary names attributed to each files.
  character(*),    intent(in), optional :: name          !< Block name
  integer(I4P)                          :: error         !< Error status.

  error = self%xml_writer%write_parallel_open_block(name=name)
  error = self%xml_writer%write_parallel_block_files(filenames=filenames, names=names)
  error = self%xml_writer%write_parallel_close_block()
  endfunction write_block_array