Frees data: removes ghost objects and frees neighbor lists.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(collision_obj), | intent(inout) | :: | this |
Collision utility |
impure subroutine collision_obj_Sanitize(this) !> Frees data: removes ghost objects and frees neighbor lists. implicit none class(collision_obj), intent(inout) :: this !! Collision utility ! Work variables integer :: i,j,k if (associated(this%IB)) then call this%IB%Recycle() ! Free list if (allocated(this%IBneighbors)) then associate (lo => this%cblock%lo, hi=>this%cblock%hi, ngc =>this%cblock%ngc) do k=lo(3)-ngc,hi(3)+ngc do j=lo(2)-ngc,hi(2)+ngc do i=lo(1)-ngc,hi(1)+ngc call this%IBneighbors(i,j,k)%Free() end do end do end do end associate end if end if if (associated(this%RP)) then ! Remove Ghost Objects call this%RP%Recycle() ! Free list if (allocated(this%RPneighbors)) then associate (lo => this%cblock%lo, hi=>this%cblock%hi, ngc =>this%cblock%ngc) do k=lo(3)-ngc,hi(3)+ngc do j=lo(2)-ngc,hi(2)+ngc do i=lo(1)-ngc,hi(1)+ngc call this%RPneighbors(i,j,k)%Free() end do end do end do end associate end if end if if (associated(this%PP)) then call this%PP%Recycle() ! Free list if (allocated(this%PPneighbors)) then associate (lo => this%cblock%lo, hi=>this%cblock%hi, ngc =>this%cblock%ngc) do k=lo(3)-ngc,hi(3)+ngc do j=lo(2)-ngc,hi(2)+ngc do i=lo(1)-ngc,hi(1)+ngc call this%PPneighbors(i,j,k)%Free() end do end do end do end associate end if end if return end subroutine collision_obj_Sanitize