Free_ECAdvection2D Subroutine

public subroutine Free_ECAdvection2D(this)

Free EC Advection 2D, including GPU BC arrays.

Arguments

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

Calls

proc~~free_ecadvection2d~~CallsGraph proc~free_ecadvection2d Free_ECAdvection2D interface~hipfree hipFree proc~free_ecadvection2d->interface~hipfree proc~gpucheck gpuCheck proc~free_ecadvection2d->proc~gpucheck proc~free_ecdgmodel2d_t Free_ECDGModel2D_t proc~free_ecadvection2d->proc~free_ecdgmodel2d_t proc~free_dgmodel2d_t Free_DGModel2D_t proc~free_ecdgmodel2d_t->proc~free_dgmodel2d_t

Contents

Source Code


Source Code

  subroutine Free_ECAdvection2D(this)
    !! Free EC Advection 2D, including GPU BC arrays.
    implicit none
    class(ECAdvection2D),intent(inout) :: this
    ! Local
    type(BoundaryCondition),pointer :: bc

    bc => this%hyperbolicBCs%head
    do while(associated(bc))
      if(c_associated(bc%elements_gpu)) call gpuCheck(hipFree(bc%elements_gpu))
      if(c_associated(bc%sides_gpu)) call gpuCheck(hipFree(bc%sides_gpu))
      bc%elements_gpu = c_null_ptr
      bc%sides_gpu = c_null_ptr
      bc => bc%next
    enddo

    call Free_ECDGModel2D_t(this)

  endsubroutine Free_ECAdvection2D