Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(xml_writer_abstract), | intent(inout) | :: | self | |||
character, | intent(in) | :: | source | |||
integer(kind=I4P), | intent(in), | optional | :: | nx1 | ||
integer(kind=I4P), | intent(in), | optional | :: | nx2 | ||
integer(kind=I4P), | intent(in), | optional | :: | ny1 | ||
integer(kind=I4P), | intent(in), | optional | :: | ny2 | ||
integer(kind=I4P), | intent(in), | optional | :: | nz1 | ||
integer(kind=I4P), | intent(in), | optional | :: | nz2 |
function write_parallel_geo(self, source, nx1, nx2, ny1, ny2, nz1, nz2) result(error)
!< Write parallel (partitioned) VTK-XML geo source file.
class(xml_writer_abstract), intent(inout) :: self !< Writer.
character(*), intent(in) :: source !< Source file name containing the piece data.
integer(I4P), intent(in), optional :: nx1 !< Initial node of x axis.
integer(I4P), intent(in), optional :: nx2 !< Final node of x axis.
integer(I4P), intent(in), optional :: ny1 !< Initial node of y axis.
integer(I4P), intent(in), optional :: ny2 !< Final node of y axis.
integer(I4P), intent(in), optional :: nz1 !< Initial node of z axis.
integer(I4P), intent(in), optional :: nz2 !< Final node of z axis.
integer(I4P) :: error !< Error status.
type(string) :: buffer !< Buffer string.
select case (self%topology%chars())
case('PRectilinearGrid', 'PStructuredGrid')
buffer = 'Extent="'// &
trim(str(n=nx1))//' '//trim(str(n=nx2))//' '// &
trim(str(n=ny1))//' '//trim(str(n=ny2))//' '// &
trim(str(n=nz1))//' '//trim(str(n=nz2))//'" Source="'//trim(adjustl(source))//'"'
case('PUnstructuredGrid')
buffer = 'Source="'//trim(adjustl(source))//'"'
endselect
call self%write_self_closing_tag(name='Piece', attributes=buffer%chars())
error = self%error
endfunction write_parallel_geo