Type | Intent | Optional | 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 |
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