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


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