ResPart_set_Final Subroutine

private impure subroutine ResPart_set_Final(this)

Finalizes the ResPart_set type. This subourtine replaces the inheritted lagrangian_final.

Type Bound

ResPart_set

Arguments

Type IntentOptional Attributes Name
class(ResPart_set), intent(inout) :: this

Set of resolved partilces


Calls

proc~~respart_set_final~~CallsGraph proc~respart_set_final ResPart_set%ResPart_set_Final none~finalize~26 marker_set%Finalize proc~respart_set_final->none~finalize~26 proc~lagrangian_set_freempitype lagrangian_set%lagrangian_set_FreeMPIType proc~respart_set_final->proc~lagrangian_set_freempitype none~finalize~26->proc~respart_set_final mpi_type_free mpi_type_free proc~lagrangian_set_freempitype->mpi_type_free

Called by

proc~~respart_set_final~~CalledByGraph proc~respart_set_final ResPart_set%ResPart_set_Final none~finalize~26 marker_set%Finalize proc~respart_set_final->none~finalize~26 none~finalize~25 ResPart_set%Finalize none~finalize~25->proc~respart_set_final none~finalize~26->proc~respart_set_final none~finalize~27 solid_obj%Finalize none~finalize~27->proc~respart_set_final proc~cdifs_obj_final cdifs_obj%cdifs_obj_Final proc~cdifs_obj_final->none~finalize~25 proc~grans_obj_final grans_obj%grans_obj_Final proc~grans_obj_final->none~finalize~25 proc~solid_set_final solid_set%solid_set_Final proc~solid_set_final->none~finalize~27

Source Code

    impure subroutine ResPart_set_Final(this)
      !> Finalizes the ResPart_set type.
      ! This subourtine replaces the inheritted lagrangian_final.
      class(ResPart_set), intent(inout) :: this                                !! Set of resolved partilces

      ! Remove all centroids and deallocate
      this%count_= 0
      this%count = 0
      if(allocated(this%p))          deallocate(this%p)
      if(allocated(this%count_proc)) deallocate(this%count_proc)

      ! Deallocate additional child-type arrays
      if(allocated(this%ranks))      deallocate(this%ranks)
      if(allocated(this%lookup))     deallocate(this%lookup)

      ! Finalize IB
      call this%ib%Finalize()

      ! Nullify pointers
      this%parallel => null()
      this%block    => null()

      ! Free MPI Type
      call this%FreeMPIType()

      ! Turn off flag
      this%is_initialized = .false.

      return
    end subroutine ResPart_set_Final