write_geo_strg_data3_rank1_R8P Function

private function write_geo_strg_data3_rank1_R8P(self, n, x, y, z) result(error)

Arguments

TypeIntentOptionalAttributesName
class(xml_writer_abstract), intent(inout) :: self
integer(kind=I4P), intent(in) :: n
real(kind=R8P), intent(in) :: x(1:)
real(kind=R8P), intent(in) :: y(1:)
real(kind=R8P), intent(in) :: z(1:)

Return Value integer(kind=I4P)


Contents


Source Code

   function write_geo_strg_data3_rank1_R8P(self, n, x, y, z) result(error)
   !< Write mesh with **StructuredGrid** topology (data 3, rank 1, R8P).
   class(xml_writer_abstract), intent(inout) :: self  !< Writer.
   integer(I4P),               intent(in)    :: n     !< Number of nodes.
   real(R8P),                  intent(in)    :: x(1:) !< X coordinates.
   real(R8P),                  intent(in)    :: y(1:) !< Y coordinates.
   real(R8P),                  intent(in)    :: z(1:) !< Z coordinates.
   integer(I4P)                              :: error !< Error status.

   if ((n/=size(x, dim=1)).or.(n/=size(y, dim=1)).or.(n/=size(z, dim=1))) then
      self%error = 1
      return
   endif
   call self%write_start_tag(name='Points')
   error = self%write_dataarray(data_name='Points', x=x, y=y, z=z)
   call self%write_end_tag(name='Points')
   error = self%error
   endfunction write_geo_strg_data3_rank1_R8P