| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Mesh3D), | intent(inout) | :: | this |
subroutine Free_Mesh3D(this)
implicit none
class(Mesh3D),intent(inout) :: this
this%nElem = 0
this%nSides = 0
this%nNodes = 0
this%nCornerNodes = 0
this%nUniqueSides = 0
this%nUniqueNodes = 0
this%nBCs = 0
deallocate(this%elemInfo)
deallocate(this%sideInfo)
deallocate(this%nodeCoords)
deallocate(this%globalNodeIDs)
deallocate(this%CGNSCornerMap)
deallocate(this%sideMap)
deallocate(this%CGNSSideMap)
deallocate(this%BCType)
deallocate(this%BCNames)
if(associated(this%mortarInfo)) then
deallocate(this%mortarInfo)
this%mortarInfo => null()
endif
this%nMortars = 0
if(associated(this%anisoMortarInfo)) then
deallocate(this%anisoMortarInfo)
this%anisoMortarInfo => null()
endif
this%nAnisoMortars = 0
if(allocated(this%elemMaterial)) deallocate(this%elemMaterial)
if(allocated(this%materialNames)) deallocate(this%materialNames)
this%nMaterials = 0
this%nLayers = 0
call this%decomp%Free()
call gpuCheck(hipFree(this%sideInfo_gpu))
if(c_associated(this%mortarInfo_gpu)) then
call gpuCheck(hipFree(this%mortarInfo_gpu))
this%mortarInfo_gpu = c_null_ptr
endif
if(c_associated(this%anisoMortarInfo_gpu)) then
call gpuCheck(hipFree(this%anisoMortarInfo_gpu))
this%anisoMortarInfo_gpu = c_null_ptr
endif
endsubroutine Free_Mesh3D