SetElemToRank_DomainDecomposition Subroutine

public subroutine SetElemToRank_DomainDecomposition(this, nElem)

Arguments

TypeIntentOptionalAttributesName
class(DomainDecomposition), intent(inout) :: this
integer, intent(in) :: nElem

Calls

proc~~setelemtorank_domaindecomposition~~CallsGraph proc~setelemtorank_domaindecomposition SetElemToRank_DomainDecomposition hipmalloc hipmalloc proc~setelemtorank_domaindecomposition->hipmalloc gpucheck gpucheck proc~setelemtorank_domaindecomposition->gpucheck proc~domaindecomp DomainDecomp proc~setelemtorank_domaindecomposition->proc~domaindecomp proc~elemtorank ElemToRank proc~setelemtorank_domaindecomposition->proc~elemtorank hipmemcpy hipmemcpy proc~setelemtorank_domaindecomposition->hipmemcpy

Contents


Source Code

  subroutine SetElemToRank_DomainDecomposition(this,nElem)
    implicit none
    class(DomainDecomposition),intent(inout) :: this
    integer,intent(in) :: nElem
    ! Local
    integer :: iel

    this%nElem = nElem

    allocate(this%elemToRank(1:nelem))
    call gpuCheck(hipMalloc(this%elemToRank_gpu,sizeof(this%elemToRank)))

    call DomainDecomp(nElem, &
                      this%nRanks, &
                      this%offSetElem)

    do iel = 1,nElem
      call ElemToRank(this%nRanks, &
                      this%offSetElem, &
                      iel, &
                      this%elemToRank(iel))
    enddo
    call gpuCheck(hipMemcpy(this%elemToRank_gpu,c_loc(this%elemToRank),sizeof(this%elemToRank),hipMemcpyHostToDevice))

  endsubroutine SetElemToRank_DomainDecomposition