Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(xml_writer_abstract), | intent(inout) | :: | self | |||
character, | intent(in) | :: | filenames(:) | |||
character, | intent(in), | optional | :: | names(:) |
function write_parallel_block_files_array(self, filenames, names) result(error)
!< Write list of files that belong to the current block (list passed as rank 1 array).
!<
!<#### Example of usage: 3 files blocks
!<```fortran
!< error = vtm%write_files_list_of_block(filenames=['file_1.vts','file_2.vts','file_3.vtu'])
!<```
!<
!<#### Example of usage: 3 files blocks with custom name
!<```fortran
!< error = vtm%write_files_list_of_block(filenames=['file_1.vts','file_2.vts','file_3.vtu'],&
!< names=['block-bar','block-foo','block-baz'])
!<```
class(xml_writer_abstract), intent(inout) :: self !< Writer.
character(*), intent(in) :: filenames(:) !< List of VTK-XML wrapped file names.
character(*), intent(in), optional :: names(:) !< List names attributed to wrapped files.
integer(I4P) :: error !< Error status.
integer(I4P) :: f !< File counter.
if (present(names)) then
if (size(names, dim=1)==size(filenames, dim=1)) then
do f=1, size(filenames, dim=1)
call self%write_self_closing_tag(name='DataSet', &
attributes='index="'//trim(str(f-1, .true.))// &
'" file="'//trim(adjustl(filenames(f)))// &
'" name="'//trim(adjustl(names(f)))//'"')
enddo
endif
else
do f=1,size(filenames, dim=1)
call self%write_self_closing_tag(name='DataSet', &
attributes='index="'//trim(str(f-1, .true.))// &
'" file="'//trim(adjustl(filenames(f)))//'"')
enddo
endif
error = self%error
endfunction write_parallel_block_files_array