tem_reduction_spatial_toChunk Subroutine

public subroutine tem_reduction_spatial_toChunk(me, chunk, nChunkElems)

Transfer reduction results to array chunk

Arguments

Type IntentOptional Attributes Name
type(tem_reduction_spatial_type), intent(in) :: me(:)
real(kind=rk), intent(inout) :: chunk(:)
integer, intent(out) :: nChunkElems

Number of element after spatial reduction = 1


Called by

proc~~tem_reduction_spatial_tochunk~~CalledByGraph proc~tem_reduction_spatial_tochunk tem_reduction_spatial_toChunk proc~hvs_ascii_dump_elem_data hvs_ascii_dump_elem_data proc~hvs_ascii_dump_elem_data->proc~tem_reduction_spatial_tochunk proc~hvs_ascii_dump_point_data hvs_ascii_dump_point_data proc~hvs_ascii_dump_point_data->proc~tem_reduction_spatial_tochunk proc~hvs_output_write hvs_output_write proc~hvs_output_write->proc~hvs_ascii_dump_elem_data proc~hvs_output_write->proc~hvs_ascii_dump_point_data proc~tem_tracker tem_tracker proc~tem_tracker->proc~hvs_output_write

Source Code

  subroutine tem_reduction_spatial_toChunk( me, chunk, nChunkElems )
    ! ---------------------------------------------------------------------------
    !>
    type(tem_reduction_spatial_type), intent(in) :: me(:)
    !>
    real(kind=rk), intent(inout) :: chunk(:)
    !> Number of element after spatial reduction = 1
    integer, intent(out) :: nChunkElems
    ! ---------------------------------------------------------------------------
    integer :: iReduce, iPos, iComp
    ! ---------------------------------------------------------------------------

    nChunkElems = 1
    iPos = 0
    do iReduce = 1, size( me )
      do iComp = 1, me(iReduce)%nComponents
        chunk( iPos+iComp ) = me(iReduce)%val( iComp )
      enddo
      iPos = iPos + me(iReduce)%nComponents
    enddo

  end subroutine tem_reduction_spatial_toChunk