Free_Lagrange Subroutine

public subroutine Free_Lagrange(this)

Frees all memory (host and device) associated with an instance of the Lagrange class

Arguments

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

Lagrange class instance


Calls

proc~~free_lagrange~~CallsGraph proc~free_lagrange Free_Lagrange interface~hipfree hipFree proc~free_lagrange->interface~hipfree proc~gpucheck gpuCheck proc~free_lagrange->proc~gpucheck

Contents

Source Code


Source Code

  subroutine Free_Lagrange(this)
    !! Frees all memory (host and device) associated with an instance of the Lagrange class
    implicit none
    class(Lagrange),intent(inout) :: this
    !! Lagrange class instance

    deallocate(this%controlPoints)
    deallocate(this%targetPoints)
    deallocate(this%bWeights)
    deallocate(this%qWeights)
    deallocate(this%iMatrix)
    deallocate(this%dMatrix)
    deallocate(this%dgMatrix)
    deallocate(this%bMatrix)

    call gpuCheck(hipFree(this%iMatrix_gpu))
    call gpuCheck(hipFree(this%dMatrix_gpu))
    call gpuCheck(hipFree(this%dgMatrix_gpu))
    call gpuCheck(hipFree(this%bMatrix_gpu))
    call gpuCheck(hipFree(this%qWeights_gpu))

  endsubroutine Free_Lagrange