Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(xml_writer_abstract), | intent(inout) | :: | self | |||
character, | intent(in) | :: | data_name | |||
character, | intent(in) | :: | data_type | |||
integer(kind=I4P), | intent(in), | optional | :: | number_of_components |
function write_parallel_dataarray(self, data_name, data_type, number_of_components) result(error)
!< Write parallel (partitioned) VTK-XML dataarray info.
class(xml_writer_abstract), intent(inout) :: self !< Writer.
character(*), intent(in) :: data_name !< Data name.
character(*), intent(in) :: data_type !< Type of dataarray.
integer(I4P), intent(in), optional :: number_of_components !< Number of dataarray components.
integer(I4P) :: error !< Error status.
type(string) :: buffer !< Buffer string.
if (present(number_of_components)) then
buffer = 'type="'//trim(adjustl(data_type))//'" Name="'//trim(adjustl(data_name))//&
'" NumberOfComponents="'//trim(str(number_of_components, .true.))//'"'
else
buffer = 'type="'//trim(adjustl(data_type))//'" Name="'//trim(adjustl(data_name))//'"'
endif
call self%write_self_closing_tag(name='PDataArray', attributes=buffer%chars())
error = self%error
endfunction write_parallel_dataarray