AnisoMortarExchange_MappedVector3D Subroutine

public subroutine AnisoMortarExchange_MappedVector3D(this, mesh)

GPU implementation of the vector anisotropic mortar exchange; the kernels treat the (variable, direction) pairs as 3*nvar independent trace lines.

Arguments

TypeIntentOptionalAttributesName
class(MappedVector3D), intent(inout) :: this
type(Mesh3D), intent(inout) :: mesh

Calls

proc~~anisomortarexchange_mappedvector3d~~CallsGraph proc~anisomortarexchange_mappedvector3d AnisoMortarExchange_MappedVector3D proc~allocateanisomortarbuff_mappedvector3d AllocateAnisoMortarBuff_MappedVector3D proc~anisomortarexchange_mappedvector3d->proc~allocateanisomortarbuff_mappedvector3d interface~anisomortargather_3d_gpu AnisoMortarGather_3D_gpu proc~anisomortarexchange_mappedvector3d->interface~anisomortargather_3d_gpu interface~anisomortarflip_3d_gpu AnisoMortarFlip_3D_gpu proc~anisomortarexchange_mappedvector3d->interface~anisomortarflip_3d_gpu interface~anisomortarscatter_3d_gpu AnisoMortarScatter_3D_gpu proc~anisomortarexchange_mappedvector3d->interface~anisomortarscatter_3d_gpu interface~hipmalloc hipMalloc proc~allocateanisomortarbuff_mappedvector3d->interface~hipmalloc proc~gpucheck gpuCheck proc~allocateanisomortarbuff_mappedvector3d->proc~gpucheck

Contents


Source Code

  subroutine AnisoMortarExchange_MappedVector3D(this,mesh)
    !! GPU implementation of the vector anisotropic mortar exchange; the kernels treat
    !! the (variable, direction) pairs as 3*nvar independent trace lines.
    implicit none
    class(MappedVector3D),intent(inout) :: this
    type(Mesh3D),intent(inout) :: mesh
    ! Local
    integer :: offset

    offset = mesh%decomp%offsetElem(mesh%decomp%rankId+1)
    call AllocateAnisoMortarBuff_MappedVector3D(this,mesh)

    if(mesh%decomp%mpiEnabled) then
      call this%MPIAnisoMortarExchangeAsync(mesh)
    endif

    call AnisoMortarGather_3D_gpu(this%anisoMortarBuff_gpu,this%boundary_gpu, &
                                  mesh%anisoMortarInfo_gpu,mesh%decomp%elemToRank_gpu, &
                                  mesh%decomp%rankId,offset,this%interp%N,3*this%nvar, &
                                  mesh%nAnisoMortars,this%nelem)

    if(mesh%decomp%mpiEnabled) then
      call mesh%decomp%FinalizeMPIExchangeAsync()
      call AnisoMortarFlip_3D_gpu(this%anisoMortarBuff_gpu,mesh%anisoMortarInfo_gpu, &
                                  mesh%decomp%elemToRank_gpu,mesh%decomp%rankId, &
                                  this%interp%N,3*this%nvar,mesh%nAnisoMortars)
    endif

    call AnisoMortarScatter_3D_gpu(this%extBoundary_gpu,this%anisoMortarBuff_gpu, &
                                   this%interp%mortarR_gpu,this%interp%mortarP_gpu, &
                                   mesh%anisoMortarInfo_gpu,mesh%decomp%elemToRank_gpu, &
                                   mesh%decomp%rankId,offset,this%interp%N,3*this%nvar, &
                                   mesh%nAnisoMortars,this%nelem)

  endsubroutine AnisoMortarExchange_MappedVector3D