Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(type_output_overall), | intent(inout) | :: | self | |||
character(len=*), | intent(in) | :: | file_name | |||
character(len=*), | intent(in) | :: | variable_name | |||
integer(kind=int32), | intent(in) | :: | variable(:) |
subroutine output_overall_vtu_cell(self, file_name, variable_name, variable) implicit none class(type_output_overall), intent(inout) :: self character(*), intent(in) :: file_name character(*), intent(in) :: variable_name integer(int32), intent(in) :: variable(:) type(vtk_file) :: vtu integer(int32) :: status integer(int32) :: iN, iE, idx, i status = vtu%initialize(format='ascii', filename=trim(self%dir_output_field)//trim(file_name)//trim(self%file_extension), & mesh_topology='UnstructuredGrid') ! Write data status = vtu%xml_writer%write_piece(np=self%vtk%num_points, & nc=self%vtk%num_cells) status = vtu%xml_writer%write_geo(np=self%vtk%num_points, & nc=self%vtk%num_cells, & x=self%vtk%coordinate%x, & y=self%vtk%coordinate%y, & z=self%vtk%coordinate%z) status = vtu%xml_writer%write_connectivity(nc=self%vtk%num_cells, & connectivity=self%VTK%connectivities, & offset=self%vtk%offsets, & cell_type=self%vtk%cell_types) status = vtu%xml_writer%write_dataarray(location='cell', action='open') status = vtu%xml_writer%write_dataarray(data_name=variable_name, x=variable) status = vtu%xml_writer%write_dataarray(location='cell', action='close') status = vtu%xml_writer%write_piece() status = vtu%finalize() end subroutine output_overall_vtu_cell