Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(type_output_overall), | intent(inout) | :: | self | |||
type(type_input), | intent(in) | :: | input | |||
type(type_dp_3d), | intent(in) | :: | coordinate | |||
type(type_domain), | intent(inout) | :: | domain |
module subroutine initialize_output_overall_vtk(self, input, coordinate, domain) implicit none class(type_output_overall), intent(inout) :: self type(type_input), intent(in) :: input type(type_dp_3d), intent(in) :: coordinate type(type_domain), intent(inout) :: domain integer(int32) :: i, j, idx, total self%vtk%num_points = input%geometry%vtk%num_points self%vtk%num_cells = input%geometry%vtk%num_total_cells call self%vtk%coordinate%initialize(self%vtk%num_points) self%vtk%coordinate = input%geometry%vtk%POINTS call allocate_array(self%vtk%offsets, self%vtk%num_cells) call allocate_array(self%vtk%cell_types, self%vtk%num_cells) do i = 1, self%vtk%num_cells self%vtk%offsets(i) = input%geometry%vtk%CELLS(i)%num_nodes_in_cell self%vtk%cell_types(i) = input%geometry%vtk%CELLS(i)%cell_type end do total = sum(self%vtk%offsets(:)) call allocate_array(self%vtk%connectivities, total) idx = 0 do i = 1, self%vtk%num_cells do j = 1, input%geometry%vtk%CELLS(i)%num_nodes_in_cell idx = idx + 1 self%vtk%connectivities(idx) = input%geometry%vtk%CELLS(i)%connectivity(j) - 1 end do end do if (associated(self%write_fields)) nullify (self%write_fields) self%write_fields => output_overall_vtk_fields if (associated(self%write_cell)) nullify (self%write_cell) self%write_cell => output_overall_vtk_cell end subroutine initialize_output_overall_vtk