write_geo_unst_data1_rank2_R4P Function

private function write_geo_unst_data1_rank2_R4P(self, np, nc, xyz) result(error)

Arguments

TypeIntentOptionalAttributesName
class(xml_writer_abstract), intent(inout) :: self
integer(kind=I4P), intent(in) :: np
integer(kind=I4P), intent(in) :: nc
real(kind=R4P), intent(in) :: xyz(1:,1:)

Return Value integer(kind=I4P)


Contents


Source Code

   function write_geo_unst_data1_rank2_R4P(self, np, nc, xyz) result(error)
   !< Write mesh with **UnstructuredGrid** topology (data 1, rank 2, R4P).
   class(xml_writer_abstract), intent(inout) :: self       !< Writer.
   integer(I4P),               intent(in)    :: np         !< Number of points.
   integer(I4P),               intent(in)    :: nc         !< Number of cells.
   real(R4P),                  intent(in)    :: xyz(1:,1:) !< X, y, z coordinates [1:3,:].
   integer(I4P)                              :: error      !< Error status.

   if (np/=size(xyz, dim=2)) then
      self%error = 1
      return
   endif
   call self%write_start_tag(name='Points')
   error = self%write_dataarray(data_name='Points', x=xyz)
   call self%write_end_tag(name='Points')
   error = self%error
   endfunction write_geo_unst_data1_rank2_R4P