tem_derive_sparta Subroutine

public subroutine tem_derive_sparta(origin, derived, nElems, elemPropertyBits, prpBit, comm, nParts)

Arguments

Type IntentOptional Attributes Name
type(tem_sparta_type), intent(in) :: origin
type(tem_sparta_type), intent(inout) :: derived
integer, intent(in) :: nElems
integer(kind=long_k), intent(in) :: elemPropertyBits(nElems)
integer, intent(in) :: prpBit
integer, intent(in) :: comm
integer, intent(in) :: nParts

Calls

proc~~tem_derive_sparta~~CallsGraph proc~tem_derive_sparta tem_derive_sparta proc~tem_set_sparta tem_set_sparta proc~tem_derive_sparta->proc~tem_set_sparta mpi_alltoall mpi_alltoall proc~tem_set_sparta->mpi_alltoall

Source Code

  subroutine tem_derive_sparta( origin, derived, nElems, elemPropertyBits, prpBit, &
    &                           comm, nParts )
    type( tem_sparta_type ), intent(in)  :: origin
    type( tem_sparta_type ), intent(inout) :: derived
    integer, intent(in) :: nElems
    integer(kind=long_k), intent(in) :: elemPropertyBits(nElems)
    integer, intent(in) :: prpBit, comm, nParts

    integer :: send_count(0:nParts-1), iPart, offset, iElem

    do iPart = 0, nParts - 1
      offset = origin%send_index(iPart)
      send_count(iPart) = 0
      do iElem = 1, origin%send_count(iPart)
        if (btest( elemPropertyBits( iElem+offset ), prpBit ) ) then
          send_count(iPart) = send_count(iPart) + 1
        end if
      end do ! iElem
    end do

    call tem_set_sparta( derived, comm, nParts, send_count )

  end subroutine tem_derive_sparta