SideExchange_MappedScalar2D Subroutine

public subroutine SideExchange_MappedScalar2D(this, mesh)

Arguments

TypeIntentOptionalAttributesName
class(MappedScalar2D), intent(inout) :: this
type(Mesh2D), intent(inout) :: mesh

Contents


Source Code

  subroutine SideExchange_MappedScalar2D(this,mesh)
    implicit none
    class(MappedScalar2D),intent(inout) :: this
    type(Mesh2D),intent(inout) :: mesh
    ! Local
    integer :: offset

    offset = mesh%decomp%offsetElem(mesh%decomp%rankId+1)
    if(mesh%decomp%mpiEnabled) then
      call this%MPIExchangeAsync(mesh)
    endif

    ! Do the side exchange internal to this mpi process
    call SideExchange_2D_gpu(this%extboundary_gpu, &
                             this%boundary_gpu,mesh%sideinfo_gpu,mesh%decomp%elemToRank_gpu, &
                             mesh%decomp%rankid,offset,this%interp%N,this%nvar,this%nelem)

    if(mesh%decomp%mpiEnabled) then
      call mesh%decomp%FinalizeMPIExchangeAsync()
      ! Apply side flips for data exchanged with MPI
      call ApplyFlip_2D_gpu(this%extboundary_gpu,mesh%sideInfo_gpu, &
                            mesh%decomp%elemToRank_gpu,mesh%decomp%rankId, &
                            offset,this%interp%N,this%nVar,this%nElem)
    endif

  endsubroutine SideExchange_MappedScalar2D