Release the persistent requests, buffers and the duplicate communicator. Collective over the communicator the map was built on.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(SetInterface3D_t), | intent(inout) | :: | this |
subroutine Free_SetInterface3D_t(this)
!! Release the persistent requests, buffers and the duplicate communicator.
!! Collective over the communicator the map was built on.
implicit none
class(SetInterface3D_t),intent(inout) :: this
! Local
integer :: c,ierror
if(allocated(this%requests)) then
do c = 1,size(this%requests)
call mpi_request_free(this%requests(c),ierror)
enddo
deallocate(this%requests)
endif
if(allocated(this%nvarOfSet)) deallocate(this%nvarOfSet)
if(allocated(this%setFaceStart)) deallocate(this%setFaceStart)
if(allocated(this%faceSet)) deallocate(this%faceSet)
if(allocated(this%faceElem)) deallocate(this%faceElem)
if(allocated(this%faceSide)) deallocate(this%faceSide)
if(allocated(this%faceFlip)) deallocate(this%faceFlip)
if(allocated(this%facePartnerSet)) deallocate(this%facePartnerSet)
if(allocated(this%facePartnerRank)) deallocate(this%facePartnerRank)
if(allocated(this%facePartnerElem)) deallocate(this%facePartnerElem)
if(allocated(this%facePartnerSide)) deallocate(this%facePartnerSide)
if(allocated(this%faceSideId)) deallocate(this%faceSideId)
if(allocated(this%facePartnerFace)) deallocate(this%facePartnerFace)
if(associated(this%outbox)) deallocate(this%outbox)
if(associated(this%ghost)) deallocate(this%ghost)
if(allocated(this%nbrRank)) deallocate(this%nbrRank)
if(allocated(this%nbrFaceStart)) deallocate(this%nbrFaceStart)
if(allocated(this%nbrFace)) deallocate(this%nbrFace)
if(allocated(this%sendStart)) deallocate(this%sendStart)
if(allocated(this%recvStart)) deallocate(this%recvStart)
if(allocated(this%sendBuf)) deallocate(this%sendBuf)
if(allocated(this%recvBuf)) deallocate(this%recvBuf)
if(this%comm /= MPI_COMM_NULL) call mpi_comm_free(this%comm,ierror)
this%nSets = 0
this%nFaces = 0
this%nNbr = 0
endsubroutine Free_SetInterface3D_t