Free_DomainDecomposition_t Subroutine

public subroutine Free_DomainDecomposition_t(this)

Arguments

TypeIntentOptionalAttributesName
class(DomainDecomposition_t), intent(inout) :: this

Calls

proc~~free_domaindecomposition_t~~CallsGraph proc~free_domaindecomposition_t Free_DomainDecomposition_t proc~releasempi ReleaseMPI proc~free_domaindecomposition_t->proc~releasempi mpi_finalized mpi_finalized proc~releasempi->mpi_finalized mpi_finalize mpi_finalize proc~releasempi->mpi_finalize

Contents


Source Code

  subroutine Free_DomainDecomposition_t(this)
    implicit none
    class(DomainDecomposition_t),intent(inout) :: this

    if(associated(this%offSetElem)) then
      deallocate(this%offSetElem)
    endif
    if(associated(this%elemToRank)) then
      deallocate(this%elemToRank)
    endif

    if(allocated(this%requests)) deallocate(this%requests)
    if(allocated(this%stats)) deallocate(this%stats)

    ! Guard against a second Free, and against freeing a decomposition that was
    ! never initialized, both of which would corrupt the live-decomposition count.
    if(this%initialized) then
      call ReleaseMPI(this%ownsMpi,this%rankId,this%nRanks)
      this%initialized = .false.
    endif

  endsubroutine Free_DomainDecomposition_t