lagrangian_set_Final Subroutine

private impure subroutine lagrangian_set_Final(this)

Finalizes the structure and frees memory.

Type Bound

lagrangian_set

Arguments

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

A set of Lagrangian objects


Calls

proc~~lagrangian_set_final~~CallsGraph proc~lagrangian_set_final lagrangian_set%lagrangian_set_Final proc~lagrangian_set_freempitype lagrangian_set%lagrangian_set_FreeMPIType proc~lagrangian_set_final->proc~lagrangian_set_freempitype mpi_type_free mpi_type_free proc~lagrangian_set_freempitype->mpi_type_free

Source Code

    impure subroutine lagrangian_set_Final(this)
      !> Finalizes the structure and frees memory.
      implicit none
      class(lagrangian_set), intent(inout) :: this                             !! A set of Lagrangian objects

      this%count_= 0
      this%count = 0
      ! Deallocate arrays
      if(allocated(this%p))          deallocate(this%p)
      if(allocated(this%count_proc)) deallocate(this%count_proc)

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

      ! Free MPI Type
      call this%FreeMPIType()

      ! Turn off flag
      this%is_initialized = .false.

      return
    end subroutine lagrangian_set_Final